From 721e672c897616e53f95b9deca7f8769024c19d5 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Tue, 27 Aug 2019 15:15:18 +0200 Subject: add srcdir to globalvars --- src/globalvars.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/globalvars.py b/src/globalvars.py index 23ffa8a..9a7e958 100644 --- a/src/globalvars.py +++ b/src/globalvars.py @@ -11,9 +11,14 @@ verbosity = 0 """Dict holding the allocators to compare""" allocators = {} +"""Directory of allocbench sources""" +srcdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) + +"""Source directory for all benchmarks""" +benchsrcdir = os.path.join(srcdir, "benchmarks") + """Root directory of allocbench""" -allocbenchdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) -allocbenchdir = os.path.dirname(allocbenchdir) +allocbenchdir = os.path.dirname(srcdir) """Path of the build directory""" builddir = os.path.join(allocbenchdir, "build") @@ -21,9 +26,6 @@ builddir = os.path.join(allocbenchdir, "build") """Directory were the benchmark results are stored""" resdir = None -"""Source directory for all benchmarks""" -benchsrcdir = os.path.join(allocbenchdir, "src", "benchmarks") - """List of available benchmarks""" benchmarks = [e[:-3] for e in os.listdir(os.path.join(allocbenchdir, benchsrcdir)) if e[-3:] == ".py" and e != "__init__.py"] -- cgit v1.2.3