Skip to content
Snippets Groups Projects
Commit 028b1d0b authored by Dominic Kempf's avatar Dominic Kempf
Browse files

Add the possiblity to specify benchmark execution wrapper

parent 2fc250b9
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,7 @@ import subprocess
def get_cmake_cache_entry(entry):
for line in open(os.path.join(get_option("project_basedir"), "CMakeCache.txt"), "r"):
match = re.match("{}:[INTERNAL|FILEPATH|BOOL|STRING|PATH]+=(.*)".format(entry), line)
match = re.match("{}:[INTERNAL|FILEPATH|BOOL|STRING|PATH|UNINITIALIZED]+=(.*)".format(entry), line)
if match:
return match.groups()[0]
......@@ -183,9 +183,16 @@ def autotune_realization(sf):
ret = subprocess.call(compiler_invocation(name, filename))
assert ret == 0
# Check whether the user specified an execution wrapper
call = []
wrapper = get_cmake_cache_entry("DUNE_PERFTOOL_BENCHMARK_WRAPPER")
if wrapper:
call.append(wrapper)
# Run the benchmark program
call.append(name)
devnull = open(os.devnull, 'w')
ret = subprocess.call([name], stdout=devnull, stderr=subprocess.STDOUT)
ret = subprocess.call(call, stdout=devnull, stderr=subprocess.STDOUT)
assert ret == 0
# Extract the result form the log file
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment