Browse Source

Add support for specifying multiple test types (#4719)

amichair 6 years ago
parent
commit
56198b8a8c
2 changed files with 4 additions and 3 deletions
  1. 1 0
      toolset/run-tests.py
  2. 3 3
      toolset/utils/benchmark_config.py

+ 1 - 0
toolset/run-tests.py

@@ -131,6 +131,7 @@ def main(argv=None):
             'all', 'json', 'db', 'query', 'cached_query', 'fortune', 'update',
             'plaintext'
         ],
+        nargs='+',
         default='all',
         help='which type of test to run')
     parser.add_argument(

+ 3 - 3
toolset/utils/benchmark_config.py

@@ -21,11 +21,11 @@ class BenchmarkConfig:
         types['plaintext'] = PlaintextTestType(self)
         types['cached_query'] = CachedQueryTestType(self)
 
-        # Turn type into a map instead of a string
-        if args.type == 'all':
+        # Turn type into a map instead of a list of strings
+        if 'all' in args.type:
             self.types = types
         else:
-            self.types = {args.type: types[args.type]}
+            self.types = {t: types[t] for t in args.type}
 
         self.duration = args.duration
         self.exclude = args.exclude