1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-27 09:59:04 +00:00

Display the test name before running it.

This makes it easier to identify a test that hangs.
This commit is contained in:
henri
2013-06-15 12:33:31 +00:00
parent a493296c54
commit 9bfe6e46cc

View File

@@ -60,12 +60,14 @@ int main(int ac, char **av) {
const struct test_case *current = TestCases[i];
const char *name = get_test_name(current);
printf("%-48s", name);
fflush(stdout);
rc = test_case_run(current);
if (rc) {
printf(TEST_FAILED " %s (%s)\n", name, strerror(-rc));
printf(TEST_FAILED " (%s)\n", strerror(-rc));
break;
}
printf(TEST_OK " %s\n", name);
printf(TEST_OK "\n");
}
return rc;
}