]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
zstreamtest : run unit tests only during "normal" session
authorYann Collet <cyan@fb.com>
Fri, 29 Sep 2017 01:27:22 +0000 (18:27 -0700)
committerYann Collet <cyan@fb.com>
Fri, 29 Sep 2017 01:27:22 +0000 (18:27 -0700)
not during --mt, --newapi and --opaque
this avoids running them 4x during `make test`

tests/zstreamtest.c

index 6ae4ef96c2e11c26fb17a992eb906196a6089c54..16f51442594d30c770cf1cc17c74c159110020f0 100644 (file)
@@ -1614,9 +1614,9 @@ int main(int argc, const char** argv)
         /* Parsing commands. Aggregated commands are allowed */
         if (argument[0]=='-') {
 
-            if (!strcmp(argument, "--mt")) { selected_api=mt_api; continue; }
-            if (!strcmp(argument, "--newapi")) { selected_api=advanced_api; continue; }
-            if (!strcmp(argument, "--opaqueapi")) { selected_api=advanced_api; useOpaqueAPI = 1; continue; }
+            if (!strcmp(argument, "--mt")) { selected_api=mt_api; testNb += !testNb; continue; }
+            if (!strcmp(argument, "--newapi")) { selected_api=advanced_api; testNb += !testNb; continue; }
+            if (!strcmp(argument, "--opaqueapi")) { selected_api=advanced_api; testNb += !testNb; useOpaqueAPI = 1; continue; }
             if (!strcmp(argument, "--no-big-tests")) { bigTests=0; continue; }
 
             argument++;