Skip to content

Commit 999916c

Browse files
committed
fix features run fail
Signed-off-by: Ni, Wenhui <[email protected]>
1 parent ef265a1 commit 999916c

File tree

157 files changed

+235
-235
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

157 files changed

+235
-235
lines changed

behavior_tests/src/array_size_fold/do_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def setup_test(single_case_text):
2121

2222
def migrate_test(single_case_text):
2323
call_subprocess(
24-
test_config.CT_TOOL + " test.cu --out-root=out --cuda-include-path=" + test_config.include_path)
24+
test_config.CT_TOOL + " test.cu --out-root=out --cuda-include-path=" + test_config.include_path, single_case_text)
2525

2626
with open(os.path.join("out", "test.dp.cpp"), 'r') as f:
2727
ret_str = f.read()

behavior_tests/src/bad_input_1/do_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def setup_test(single_case_text):
2020
def migrate_test(single_case_text):
2121

2222
call_subprocess(test_config.CT_TOOL + " --cuda-include-path=" + test_config.include_path + " " +
23-
os.path.join("cuda", "migrate_nonbuilding_code.cu"))
23+
os.path.join("cuda", "migrate_nonbuilding_code.cu"), single_case_text)
2424
return is_sub_string("unknown type name", single_case_text.command_text)
2525
def build_test(single_case_text):
2626
return True

behavior_tests/src/bt-analysis-scope-path1/do_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,22 @@ def migrate_test(single_case_text):
2828
"cuda",
2929
"call_device_func_outside.cu") + " --in-root=cuda" + " --out-root=out"
3030
# migrate with implicit --analysis-scope-path which defaults to --in-root
31-
call_subprocess(migrate_cmd)
31+
call_subprocess(migrate_cmd, single_case_text)
3232
if (not os.path.exists(
3333
os.path.join("out", "call_device_func_outside.dp.cpp"))):
3434
return False
3535
shutil.rmtree("out")
3636

3737
# migrate with specified --analysis-scope-path which equals --in-root
38-
call_subprocess(migrate_cmd + " --analysis-scope-path=cuda")
38+
call_subprocess(migrate_cmd + " --analysis-scope-path=cuda", single_case_text)
3939
if (not os.path.exists(
4040
os.path.join("out", "call_device_func_outside.dp.cpp"))):
4141
return False
4242
shutil.rmtree("out")
4343

4444
# migrate with specified --analysis-scope-path which is the parent of --in-root
4545
call_subprocess(migrate_cmd + " --analysis-scope-path=" +
46-
os.path.join("cuda", ".."))
46+
os.path.join("cuda", ".."), single_case_text)
4747
if (not os.path.exists(
4848
os.path.join("out", "call_device_func_outside.dp.cpp"))):
4949
return False

behavior_tests/src/bt-analysis-scope-path2/do_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,20 @@ def migrate_test(single_case_text):
3434
"cuda",
3535
"call_device_func_outside.cu") + " --in-root=cuda" + " --out-root=out"
3636
# migrate with implicit --analysis-scope-path which defaults to --in-root
37-
call_subprocess(migrate_cmd)
37+
call_subprocess(migrate_cmd, single_case_text)
3838
if (not os.path.exists(
3939
os.path.join("out", "call_device_func_outside.dp.cpp"))):
4040
return False
4141

4242
# expect incremental migration with specified --analysis-scope-path which equals --in-root
43-
call_subprocess(migrate_cmd + " --analysis-scope-path=cuda")
43+
call_subprocess(migrate_cmd + " --analysis-scope-path=cuda", single_case_text)
4444
if (not os.path.exists(
4545
os.path.join("out", "call_device_func_outside.dp.cpp"))):
4646
return False
4747

4848
# not expect incremental migration with specified --analysis-scope-path which is the parent of --in-root
4949
call_subprocess(migrate_cmd + " --analysis-scope-path=" +
50-
os.path.join("cuda", ".."))
50+
os.path.join("cuda", ".."), single_case_text)
5151
return is_sub_string(
5252
f"use the same option set as in previous migration: \"--analysis-scope-path=",
5353
single_case_text.command_text)

behavior_tests/src/bt-analysis-scope-path3/do_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def migrate_test(single_case_text):
3030
"call_device_func_outside.cu") + " --in-root=cuda" + " --out-root=out"
3131

3232
call_subprocess(migrate_cmd + " --analysis-scope-path=" +
33-
os.path.join("cuda", ".."))
33+
os.path.join("cuda", ".."), single_case_text)
3434
expected_files = [
3535
os.path.join("out", "call_device_func_outside.dp.cpp"),
3636
]

behavior_tests/src/bt-analysis-scope-path4/do_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def migrate_test(single_case_text):
3333
"cuda",
3434
"call_device_func_outside.cu") + " --in-root=cuda" + " --out-root=out"
3535

36-
call_subprocess(migrate_cmd + " --analysis-scope-path=cuda_symlink")
36+
call_subprocess(migrate_cmd + " --analysis-scope-path=cuda_symlink", single_case_text)
3737
if (not os.path.exists(
3838
os.path.join("out", "call_device_func_outside.dp.cpp"))):
3939
return False

behavior_tests/src/bt-autocomplete/do_test.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,97 +19,97 @@ def setup_test(single_case_text):
1919
def migrate_test(single_case_text):
2020
res = True
2121

22-
call_subprocess(test_config.CT_TOOL + " --autocomplete=--gen-build")
22+
call_subprocess(test_config.CT_TOOL + " --autocomplete=--gen-build", single_case_text)
2323
reference = '--gen-build-script\n'
2424
res = res and (reference == single_case_text.command_text)
2525

26-
call_subprocess(test_config.CT_TOOL + " --autocomplete=-gen-build")
26+
call_subprocess(test_config.CT_TOOL + " --autocomplete=-gen-build", single_case_text)
2727
reference = '-gen-build-script\n'
2828
res = res and (reference == single_case_text.command_text)
2929

3030
call_subprocess(test_config.CT_TOOL + " --autocomplete=foo")
3131
reference = '\n'
3232
res = res and (reference == single_case_text.command_text)
3333

34-
call_subprocess(test_config.CT_TOOL + " --autocomplete=--output-verbosity=#d")
34+
call_subprocess(test_config.CT_TOOL + " --autocomplete=--output-verbosity=#d", single_case_text)
3535
reference = 'detailed\n' + \
3636
'diagnostics\n'
3737
res = res and (reference == single_case_text.command_text)
3838

39-
call_subprocess(test_config.CT_TOOL + " --autocomplete=-output-verbosity=#d")
39+
call_subprocess(test_config.CT_TOOL + " --autocomplete=-output-verbosity=#d", single_case_text)
4040
reference = 'detailed\n' + \
4141
'diagnostics\n'
4242
res = res and (reference == single_case_text.command_text)
4343

44-
call_subprocess(test_config.CT_TOOL + " --autocomplete=--output-verbosity=")
44+
call_subprocess(test_config.CT_TOOL + " --autocomplete=--output-verbosity=", single_case_text)
4545
reference = 'detailed\n' + \
4646
'diagnostics\n' + \
4747
'normal\n' + \
4848
'silent\n'
4949
res = res and (reference == single_case_text.command_text)
5050

51-
call_subprocess(test_config.CT_TOOL + " --autocomplete=-output-verbosity=")
51+
call_subprocess(test_config.CT_TOOL + " --autocomplete=-output-verbosity=", single_case_text)
5252
reference = 'detailed\n' + \
5353
'diagnostics\n' + \
5454
'normal\n' + \
5555
'silent\n'
5656
res = res and (reference == single_case_text.command_text)
5757

58-
call_subprocess(test_config.CT_TOOL + " --autocomplete=foo#bar##--enable-c")
58+
call_subprocess(test_config.CT_TOOL + " --autocomplete=foo#bar##--enable-c", single_case_text)
5959
reference = '--enable-ctad\n'
6060
res = res and (reference == single_case_text.command_text)
6161

62-
call_subprocess(test_config.CT_TOOL + " --autocomplete=foo#bar###--format-range=#a")
62+
call_subprocess(test_config.CT_TOOL + " --autocomplete=foo#bar###--format-range=#a", single_case_text)
6363
reference = 'all\n'
6464
res = res and (reference == single_case_text.command_text)
6565

66-
call_subprocess(test_config.CT_TOOL + " --autocomplete=--rule-file=")
66+
call_subprocess(test_config.CT_TOOL + " --autocomplete=--rule-file=", single_case_text)
6767
reference = '\n'
6868
res = res and (reference == single_case_text.command_text)
6969

70-
call_subprocess(test_config.CT_TOOL + " --autocomplete=--rule-file")
70+
call_subprocess(test_config.CT_TOOL + " --autocomplete=--rule-file", single_case_text)
7171
reference = '--rule-file\n'
7272
res = res and (reference == single_case_text.command_text)
7373

74-
call_subprocess(test_config.CT_TOOL + " --autocomplete=-p=")
74+
call_subprocess(test_config.CT_TOOL + " --autocomplete=-p=", single_case_text)
7575
reference = '\n'
7676
res = res and (reference == single_case_text.command_text)
7777

78-
call_subprocess(test_config.CT_TOOL + " --autocomplete=-p")
78+
call_subprocess(test_config.CT_TOOL + " --autocomplete=-p", single_case_text)
7979
reference = '-p\n' + \
8080
'-process-all\n'
8181
res = res and (reference == single_case_text.command_text)
8282

83-
call_subprocess(test_config.CT_TOOL + " --autocomplete=--usm-level=#none,restricted#--use-explicit-namespace=#cl,sycl,")
83+
call_subprocess(test_config.CT_TOOL + " --autocomplete=--usm-level=#none,restricted#--use-explicit-namespace=#cl,sycl,", single_case_text)
8484
reference = 'cl,sycl,cl\n' + \
8585
'cl,sycl,dpct\n' + \
8686
'cl,sycl,none\n' + \
8787
'cl,sycl,sycl\n' + \
8888
'cl,sycl,sycl-math\n'
8989
res = res and (reference == single_case_text.command_text)
9090

91-
call_subprocess(test_config.CT_TOOL + " --autocomplete=--usm-level=#none,restricted#--use-explicit-namespace=#cl,sycl,s")
91+
call_subprocess(test_config.CT_TOOL + " --autocomplete=--usm-level=#none,restricted#--use-explicit-namespace=#cl,sycl,s", single_case_text)
9292
reference = 'cl,sycl,sycl\n' + \
9393
'cl,sycl,sycl-math\n'
9494
res = res and (reference == single_case_text.command_text)
9595

96-
call_subprocess(test_config.CT_TOOL + " --autocomplete=")
96+
call_subprocess(test_config.CT_TOOL + " --autocomplete=", single_case_text)
9797
reference = '\n'
9898
res = res and (reference == single_case_text.command_text)
9999

100-
call_subprocess(test_config.CT_TOOL + " --autocomplete=,")
100+
call_subprocess(test_config.CT_TOOL + " --autocomplete=,", single_case_text)
101101
reference = '\n'
102102
res = res and (reference == single_case_text.command_text)
103103

104-
call_subprocess(test_config.CT_TOOL + " --autocomplete==")
104+
call_subprocess(test_config.CT_TOOL + " --autocomplete==", single_case_text)
105105
reference = '\n'
106106
res = res and (reference == single_case_text.command_text)
107107

108-
call_subprocess(test_config.CT_TOOL + " --autocomplete=,,")
108+
call_subprocess(test_config.CT_TOOL + " --autocomplete=,,", single_case_text)
109109
reference = '\n'
110110
res = res and (reference == single_case_text.command_text)
111111

112-
call_subprocess(test_config.CT_TOOL + " --autocomplete=-")
112+
call_subprocess(test_config.CT_TOOL + " --autocomplete=-", single_case_text)
113113
opts = ['--always-use-async-handler\n',
114114
'--analysis-scope-path\n',
115115
'--assume-nd-range-dim=\n',
@@ -154,11 +154,11 @@ def migrate_test(single_case_text):
154154
for opt in opts:
155155
res = res and (opt in single_case_text.command_text)
156156

157-
call_subprocess(test_config.CT_TOOL + " --autocomplete=##")
157+
call_subprocess(test_config.CT_TOOL + " --autocomplete=##", single_case_text)
158158
reference = '\n'
159159
res = res and (reference == single_case_text.command_text)
160160

161-
call_subprocess(test_config.CT_TOOL + " --autocomplete=#")
161+
call_subprocess(test_config.CT_TOOL + " --autocomplete=#", single_case_text)
162162
reference = '\n'
163163
res = res and (reference == single_case_text.command_text)
164164

behavior_tests/src/bt-cdb-default-out-folder/do_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def migrate_test(single_case_text):
2323
in_root = ""
2424
extra_args = ""
2525
return call_subprocess(test_config.CT_TOOL + " --cuda-include-path=" + test_config.include_path + " " +
26-
"-p .")
26+
"-p .", single_case_text)
2727

2828
def build_test(single_case_text):
2929
return True

behavior_tests/src/bt-check-conflict-insertion/do_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ def setup_test(single_case_text):
1919
return True
2020

2121
def migrate_test(single_case_text):
22-
call_subprocess("intercept-build /usr/bin/make")
22+
call_subprocess("intercept-build /usr/bin/make", single_case_text)
2323
in_root = ""
2424
extra_args = ""
2525
call_subprocess(test_config.CT_TOOL + " --cuda-include-path=" + test_config.include_path + " " +
26-
"-p .")
26+
"-p .", single_case_text)
2727
return False
2828
def build_test(single_case_text):
2929
return True

behavior_tests/src/bt-check-unexpected-message/do_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ def setup_test(single_case_text):
1818
return True
1919

2020
def migrate_test(single_case_text):
21-
call_subprocess(test_config.CT_TOOL + " test.cu --out-root=out --cuda-include-path=" + test_config.include_path + " --extra-arg=-xc++")
21+
call_subprocess(test_config.CT_TOOL + " test.cu --out-root=out --cuda-include-path=" + test_config.include_path + " --extra-arg=-xc++", single_case_text)
2222
return not is_sub_string("warning: '-x c' after last input file has no effect [-Wunused-command-line-argument]", single_case_text.command_text)
2323

2424
def build_test(single_case_text):
25-
return call_subprocess("icpx -fsycl out/test.dp.cpp")
25+
return call_subprocess("icpx -fsycl out/test.dp.cpp", single_case_text)
2626

2727
def run_test(single_case_text):
2828
return True

0 commit comments

Comments
 (0)