Skip to content
Snippets Groups Projects
Commit 4f649a5f authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

setup-base-dir: "populate" the benchmarks directory

parent e0c17e5a
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@
import stat
import sys
import subprocess
import glob
from pathlib import Path
......@@ -15,6 +16,14 @@
BIN_ENV_DIR = "bin-envs"
DATA_ENV_DIR = "data-envs"
BENCHMARK_DIR = "benchmarks"
DIRECTORIES = [
RESULT_DIR,
BIN_ENV_DIR,
DATA_ENV_DIR,
BENCHMARK_DIR,
]
SUITE_DIR = "suites"
......@@ -77,9 +86,8 @@
base_path = Path(path).absolute()
print("Creating folders")
base_path.mkdir(parents=True)
base_path.joinpath(RESULT_DIR).mkdir()
base_path.joinpath(BIN_ENV_DIR).mkdir()
base_path.joinpath(DATA_ENV_DIR).mkdir()
for d in DIRECTORIES:
base_path.joinpath(d).mkdir()
old_dir = os.curdir
os.chdir(base_path)
......@@ -90,6 +98,11 @@
print("Create symlinks to development Poulpe for suites")
source = (POULPE_DIR / SUITE_DIR).resolve()
os.symlink(source, SUITE_DIR)
bench = base_path / BENCHMARK_DIR
for p in glob.glob(str(base_path / 'suites' / '*' / 'benchmarks')):
b = Path(p).relative_to(base_path)
suite_name = b.name
os.symlink('..' / b, bench / suite_name)
finally:
os.chdir(old_dir)
......
......@@ -23,6 +23,9 @@
data-envs/
results/
suites@
$ ls -l benchmark-home/benchmarks/
total * (glob)
* benchmarks -> ../suites/hg/benchmarks (glob)
check `bin/` content
--------------------
......
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