Browse Source

allow to give only a part as parameter to `./test`

Steffen Jaeckel 8 years ago
parent
commit
b03b93099d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      tests/test.c

+ 1 - 1
tests/test.c

@@ -351,7 +351,7 @@ int main(int argc, char **argv)
 
 
    dur = epoch_usec();
    dur = epoch_usec();
    for (i = 0; i < sizeof(test_functions)/sizeof(test_functions[0]); ++i) {
    for (i = 0; i < sizeof(test_functions)/sizeof(test_functions[0]); ++i) {
-      if (single_test && strcmp(test_functions[i].name, single_test)) {
+      if (single_test && strstr(test_functions[i].name, single_test) == NULL) {
         continue;
         continue;
       }
       }
       dots = fn_len - strlen(test_functions[i].name);
       dots = fn_len - strlen(test_functions[i].name);