Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorMartin Hořeňovský2017-08-30 18:11:52 +0200
committerMartin Hořeňovský2017-08-30 18:11:52 +0200
commit97edf7ce65e8358c9a5dd18ae3adbcbe4c7e4e5c (patch)
treec8245ea433ed5c9c683abd84065dbe8521b06f81 /scripts
parent49a1408ff23a7b0d34818168f9eca114b23559a6 (diff)
downloadcatch3-97edf7ce65e8358c9a5dd18ae3adbcbe4c7e4e5c.tar.gz
Fix-up compilation benchmark script
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/benchmarkCompile.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/benchmarkCompile.py b/scripts/benchmarkCompile.py
index 685d1257..586c26ac 100755
--- a/scripts/benchmarkCompile.py
+++ b/scripts/benchmarkCompile.py
@@ -59,7 +59,7 @@ def compile_main():
return end_t - start_t
def compile_files():
- cpp_files = glob.glob('*.cpp')
+ cpp_files = glob.glob('tests*.cpp')
start_t = time.time()
subprocess.check_call([compiler_path, '-c'] + flags + cpp_files)
end_t = time.time()
@@ -114,7 +114,7 @@ parser.add_argument('benchmark_kind', nargs='?', default='all', choices=options,
parser.add_argument('-I', '--catch-header', default='catch.hpp', help = 'Path to catch.hpp, default: catch.hpp')
parser.add_argument('-c', '--compiler', default='g++', help = 'Compiler to use, default: g++')
-parser.add_argument('-f', '--flags', nargs='*', help = 'Flags to be passed to the compiler')
+parser.add_argument('-f', '--flags', help = 'Flags to be passed to the compiler. Pass as "," separated list')
# Allow creating files only, without running the whole thing
parser.add_argument('-g', '--generate-files', action='store_true', help='Generate test files and quit')
@@ -137,7 +137,7 @@ if args.generate_files:
os.chdir(dir_name)
if args.flags:
- flags = args.flags
+ flags = args.flags.split(',')
print('Time needed for ...')
if args.benchmark_kind in ('all', 'main'):