ww: keep generated test support file-scoped
This commit is contained in:
@@ -3245,13 +3245,17 @@ check_file(Checker *c, Node *file)
|
||||
* already emits the qualified call. wwstage twin in check.ww. */
|
||||
if (c->is_test) {
|
||||
int present = 0;
|
||||
/* The synthetic runner belongs to file->sourceid. An import in an
|
||||
* earlier module-reset section neither supplies nor uses its binding. */
|
||||
for (Node *u = file->list; u; u = u->next) {
|
||||
if (c->test_target != NULL && u->kind == N_USE
|
||||
&& !u->imported && u->usepath
|
||||
&& !u->imported && u->sourceid == file->sourceid
|
||||
&& u->usepath
|
||||
&& (strcmp(u->usepath, c->test_target) == 0
|
||||
|| strcmp(u->usepath, c->test_module) == 0))
|
||||
u->used = 1;
|
||||
if (u->kind == N_USE && !u->imported
|
||||
&& u->sourceid == file->sourceid
|
||||
&& u->usepath && strcmp(u->usepath, c->test_module) == 0) {
|
||||
present = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user