From 8c12b0494aa241bb6ddf3779a99d2f5d6ededf73 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Sat, 2 Feb 2019 14:45:21 +0100 Subject: rework build system #2: call make before executing any benchmark Make scans the project directory for Makefiles and executes them. The targets should be build by the new targets/Makefile. All included Makefiles are now "quiet" by default. --- src/benchmark.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/benchmark.py') diff --git a/src/benchmark.py b/src/benchmark.py index e4dbef2..67e8157 100644 --- a/src/benchmark.py +++ b/src/benchmark.py @@ -81,16 +81,20 @@ class Benchmark (object): self.results[target] = d def prepare(self, verbose=False): - os.environ["PATH"] += ":build/" + self.name def is_exe(fpath): return os.path.isfile(fpath) and os.access(fpath, os.X_OK) + os.environ["PATH"] += ":" + os.path.join("build", "benchmarks", + self.name) + for r in self.requirements: fpath, fname = os.path.split(r) + # Search for file if fpath: if not is_exe(r): return False + # Search in PATH else: found = False for path in os.environ["PATH"].split(os.pathsep): -- cgit v1.2.3