Skip to content

Commit b95c0fd

Browse files
committed
tasks: remove some redundancy
1 parent 35348bb commit b95c0fd

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

tasks.py

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,6 @@ def get_os_filename_string():
1818
assert 0, "error: FileCheck.py could not detect OS"
1919

2020

21-
def get_filecheck_py_exec():
22-
cwd = os.getcwd()
23-
return 'python \\"{cwd}/filecheck/FileCheck.py\\"'.format(cwd=cwd)
24-
25-
26-
def get_filecheck_tester_exec():
27-
cwd = os.getcwd()
28-
os_string = get_os_filename_string()
29-
30-
template = '\\"{cwd}/tests/integration/tools/FileCheck/FileCheck-9.0.1-{os_string}\\"'
31-
return template.format(cwd=cwd, os_string=os_string)
32-
33-
3421
def get_filecheck_llvm_path(filecheck_exec):
3522
cwd = os.getcwd()
3623
os_string = get_os_filename_string()
@@ -41,6 +28,11 @@ def get_filecheck_llvm_path(filecheck_exec):
4128
)
4229

4330

31+
def get_filecheck_py_exec():
32+
cwd = os.getcwd()
33+
return 'python \\"{cwd}/filecheck/FileCheck.py\\"'.format(cwd=cwd)
34+
35+
4436
def formatted_command(string):
4537
return re.sub('\\s+', ' ', string).strip()
4638

@@ -53,7 +45,7 @@ def run_lit_tests(c, filecheck_exec, llvm_only):
5345
cwd = os.getcwd()
5446

5547
llvm_only_value = "1" if llvm_only else ""
56-
filecheck_tester_exec = get_filecheck_tester_exec()
48+
filecheck_tester_exec = get_filecheck_llvm_path(FILECHECK_LLVM_9_EXEC)
5749

5850
command = formatted_command("""
5951
lit

0 commit comments

Comments
 (0)