-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathdo_test.py
More file actions
47 lines (37 loc) · 1.22 KB
/
do_test.py
File metadata and controls
47 lines (37 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# ====------ do_test.py---------- *- Python -* ----===##
#
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
#
# ===----------------------------------------------------------------------===#
import subprocess
import platform
import os
import sys
from test_config import CT_TOOL
from test_utils import *
def setup_test():
change_dir(test_config.current_test)
return True
def migrate_test():
data = []
ret = []
iter = 0
with open("compile_commands.json", 'r') as f:
data = f.readlines()
for line in data:
if iter == 1:
line = line.replace("directory_placeholder", os.getcwd().replace("\\", "\\\\"))
if "directory_placeholder" in line:
iter += 1
ret.append(line)
with open("compile_commands.json", 'w') as f:
f.writelines(ret)
call_subprocess(test_config.CT_TOOL + ' -p=./ --cuda-include-path=' + test_config.include_path)
return is_sub_string("Processed 1 file(s)", test_config.command_output)
def build_test():
return True
def run_test():
return True