Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 3222 → Rev 3386

/branches/network/uspace/app/tester/tester.c
78,6 → 78,22
 
static void run_safe_tests(void)
{
test_t *test;
unsigned int i = 0;
unsigned int n = 0;
 
printf("\n*** Running all safe tests ***\n\n");
 
for (test = tests; test->name != NULL; test++) {
if (test->safe) {
if (run_test(test))
i++;
else
n++;
}
}
 
printf("\nSafe tests completed, %u tests run, %u passed.\n\n", i + n, i);
}
 
static void list_tests(void)
91,8 → 107,17
printf("*\t\t\tRun all safe tests\n");
}
 
int main(void)
int main(int argc, char **argv)
{
printf("Number of arguments: %d\n", argc);
if (argv) {
printf("Arguments:");
while (*argv) {
printf(" '%s'", *argv++);
}
printf("\n");
}
 
while (1) {
char c;
test_t *test;
112,10 → 137,15
printf("Unknown test\n\n");
else
run_test(test);
} else if (c == '*')
} else if (c == '*') {
run_safe_tests();
else
} else if (c < 0) {
/* got EOF */
break;
} else {
printf("Invalid test\n\n");
}
}
}