Esempio n. 1
0
def run_test(lang_dir, output_dir, key, cmd="./main"):
    md_file = Path(output_dir, f"{key}.md")
    json_file = Path(output_dir, f"{key}.json")
    with ChDir(lang_dir):
        cmd = f"{HYPERFINE} -m {MIN_RUNS} --warmup {WARMUP_NUM} '{cmd}' --export-markdown '{md_file}' --export-json '{json_file}'"
        print("#", cmd)
        os.system(cmd)
Esempio n. 2
0
def call_make(key, lang_dir, out_file):
    with ChDir(lang_dir):
        os.system("make clean")
        cmd = f"make {key}"
        print("#", cmd)
        os.system(cmd)
        #
        if out_file != "--":
            assert (os.path.isfile(out_file))
Esempio n. 3
0
def call_make_clean(lang_dir):
    with ChDir(lang_dir):
        os.system("make clean")
Esempio n. 4
0
def call_strip(cmd, lang_dir):
    with ChDir(lang_dir):
        print("#", cmd)
        os.system(cmd)