change path of test.py

master
15750821961 3 years ago
parent 54b7837f80
commit f5f2a9a299

@ -3,7 +3,7 @@ import subprocess
import os import os
IRBuild_ptn = '"{}" "-emit-ir" "-o" "{}" "{}"' IRBuild_ptn = '"{}" "-emit-ir" "-o" "{}" "{}"'
ExeGen_ptn = '"clang" "{}" "-o" "{}" "{}" "../../../lib/lib.c"' ExeGen_ptn = '"clang" "{}" "-o" "{}" "{}" "../../lib/lib.c"'
Exe_ptn = '"{}"' Exe_ptn = '"{}"'
def eval(EXE_PATH, TEST_BASE_PATH, optimization): def eval(EXE_PATH, TEST_BASE_PATH, optimization):
@ -75,14 +75,14 @@ if __name__ == "__main__":
# you can only modify this to add your testcase # you can only modify this to add your testcase
TEST_DIRS = [ TEST_DIRS = [
'./Easy/', './test/',
] ]
# you can only modify this to add your testcase # you can only modify this to add your testcase
optimization = "-O0" # -O0 -O1 -O2 -O3 -O4(currently = -O3) -Ofast optimization = "-O0" # -O0 -O1 -O2 -O3 -O4(currently = -O3) -Ofast
for TEST_BASE_PATH in TEST_DIRS: for TEST_BASE_PATH in TEST_DIRS:
testcases = {} # { name: need_input } testcases = {} # { name: need_input }
EXE_PATH = os.path.abspath('../../../build/SysYFCompiler') EXE_PATH = os.path.abspath('../../build/SysYFCompiler')
testcase_list = list(map(lambda x: x.split('.'), os.listdir(TEST_BASE_PATH))) testcase_list = list(map(lambda x: x.split('.'), os.listdir(TEST_BASE_PATH)))
testcase_list.sort() testcase_list.sort()
for i in range(len(testcase_list)): for i in range(len(testcase_list)):
Loading…
Cancel
Save