Skip to content
Snippets Groups Projects
Commit 8c06d207 authored by Jammer, Tim's avatar Jammer, Tim
Browse files

fix usage of absolute path

parent 15f5fe83
No related branches found
No related tags found
No related merge requests found
...@@ -23,7 +23,7 @@ import matplotlib as mpl ...@@ -23,7 +23,7 @@ import matplotlib as mpl
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
import matplotlib.patches as mpatches import matplotlib.patches as mpatches
from scripts.MBButils import categorize from scripts.MBButils import categorize, parse_one_code
mpl.rcParams['hatch.linewidth'] = 4.5 # hatch linewidth mpl.rcParams['hatch.linewidth'] = 4.5 # hatch linewidth
...@@ -140,7 +140,7 @@ def extract_all_todo_from_logdir(tool, logdir): ...@@ -140,7 +140,7 @@ def extract_all_todo_from_logdir(tool, logdir):
def cmd_gencodes(level): def cmd_gencodes(level):
here = os.getcwd() here = os.getcwd()
if os.path.exists("/MBB/scripts/errors/"): if os.path.exists("./scripts/errors/"):
#level = 2 #level = 2
print(f"Generate level {level}") print(f"Generate level {level}")
subprocess.run(f'tar -xf real_world_data.csv.tar.gz', shell=True, check=True) subprocess.run(f'tar -xf real_world_data.csv.tar.gz', shell=True, check=True)
...@@ -150,39 +150,6 @@ def cmd_gencodes(level): ...@@ -150,39 +150,6 @@ def cmd_gencodes(level):
os.chdir(here) os.chdir(here)
# if os.path.exists("/MBI/scripts/original_MBI_generators/CollArgGenerator.py"): # Docker run
# print("Docker run")
# generators = glob.glob("/MBI/scripts/original_MBI_generators/*Generator.py")
# dir = "/MBI/gencodes"
# elif os.path.exists("../../scripts/original_MBI_generators/CollArgGenerator.py"): # Local run, from logs dir
# print("Local run, from tools' logs dir")
# generators = glob.glob(f"{os.getcwd()}/../../scripts/original_MBI_generators/*Generator.py")
# dir = "../../gencodes/"
# elif os.path.exists("scripts/original_MBI_generators/CollArgGenerator.py"): # Local run, from main dir
# print("Local run, from MBI main dir")
# generators = glob.glob(f"{os.getcwd()}/scripts/original_MBI_generators/*Generator.py")
# dir = "gencodes/"
# else:
# raise Exception("Cannot find the codes' original_MBI_generators. Please report that bug.")
# subprocess.run(f"rm -rf {dir} ; mkdir {dir}", shell=True, check=True)
# here = os.getcwd()
# os.chdir(dir)
# print(f"Generate the codes (in {os.getcwd()}): ", end='')
# for generator in generators:
# m = re.match("^.*?/([^/]*)Generator.py$", generator)
# if m:
# print(m.group(1), end=", ")
# else:
# print(generator, end=", ")
# subprocess.run(f'../scripts/ensure_python3 {generator}', shell=True, check=True)
# print("\nTest count: ", end='')
# sys.stdout.flush()
# subprocess.run("ls *.c|wc -l", shell=True, check=True)
# subprocess.run("for n in *.c ; do cat -n $n > $n.txt ; done", shell=True, check=True)
# os.chdir(here)
######################## ########################
# cmd_build(): what to do when '-c build' is used (building the tool, discarding the cache) # cmd_build(): what to do when '-c build' is used (building the tool, discarding the cache)
######################## ########################
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment