Skip to content

Commit f08c6e0

Browse files
committed
fix windows
Signed-off-by: Ni, Wenhui <[email protected]>
1 parent cccf90e commit f08c6e0

File tree

160 files changed

+314
-300
lines changed

Some content is hidden

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

160 files changed

+314
-300
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, single_case_text)
24+
single_case_text.CT_TOOL + " test.cu --out-root=out --cuda-include-path=" + single_case_text.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
@@ -19,7 +19,7 @@ def setup_test(single_case_text):
1919

2020
def migrate_test(single_case_text):
2121

22-
call_subprocess(test_config.CT_TOOL + " --cuda-include-path=" + test_config.include_path + " " +
22+
call_subprocess(single_case_text.CT_TOOL + " --cuda-include-path=" + single_case_text.include_path + " " +
2323
os.path.join("cuda", "migrate_nonbuilding_code.cu"), single_case_text)
2424
return is_sub_string("unknown type name", single_case_text.print_text)
2525
def build_test(single_case_text):

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def migrate_test(single_case_text):
2424
# clean previous migration output
2525
if (os.path.exists("out")):
2626
shutil.rmtree("out")
27-
migrate_cmd = test_config.CT_TOOL + " --cuda-include-path=" + test_config.include_path + " " + os.path.join(
27+
migrate_cmd = single_case_text.CT_TOOL + " --cuda-include-path=" + single_case_text.include_path + " " + os.path.join(
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

behavior_tests/src/bt-analysis-scope-path2/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
# clean previous migration output
3131
if (os.path.exists("out")):
3232
shutil.rmtree("out")
33-
migrate_cmd = test_config.CT_TOOL + " --cuda-include-path=" + test_config.include_path + " " + os.path.join(
33+
migrate_cmd = single_case_text.CT_TOOL + " --cuda-include-path=" + single_case_text.include_path + " " + os.path.join(
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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def migrate_test(single_case_text):
2525
# clean previous migration output
2626
if (os.path.exists("out")):
2727
shutil.rmtree("out")
28-
migrate_cmd = test_config.CT_TOOL + " --cuda-include-path=" + test_config.include_path + " " + os.path.join(
28+
migrate_cmd = single_case_text.CT_TOOL + " --cuda-include-path=" + single_case_text.include_path + " " + os.path.join(
2929
"cuda",
3030
"call_device_func_outside.cu") + " --in-root=cuda" + " --out-root=out"
3131

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def migrate_test(single_case_text):
2929
if (os.path.exists("out")):
3030
shutil.rmtree("out")
3131

32-
migrate_cmd = test_config.CT_TOOL + " --cuda-include-path=" + test_config.include_path + " " + os.path.join(
32+
migrate_cmd = single_case_text.CT_TOOL + " --cuda-include-path=" + single_case_text.include_path + " " + os.path.join(
3333
"cuda",
3434
"call_device_func_outside.cu") + " --in-root=cuda" + " --out-root=out"
3535

behavior_tests/src/bt-autocomplete/do_test.py

Lines changed: 22 additions & 22 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", single_case_text)
22+
call_subprocess(single_case_text.CT_TOOL + " --autocomplete=--gen-build", single_case_text)
2323
reference = '--gen-build-script\n'
2424
res = res and (reference == single_case_text.print_text)
2525

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

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

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

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

44-
call_subprocess(test_config.CT_TOOL + " --autocomplete=--output-verbosity=", single_case_text)
44+
call_subprocess(single_case_text.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.print_text)
5050

51-
call_subprocess(test_config.CT_TOOL + " --autocomplete=-output-verbosity=", single_case_text)
51+
call_subprocess(single_case_text.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.print_text)
5757

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

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

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

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

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

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

83-
call_subprocess(test_config.CT_TOOL + " --autocomplete=--usm-level=#none,restricted#--use-explicit-namespace=#cl,sycl,", single_case_text)
83+
call_subprocess(single_case_text.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.print_text)
9090

91-
call_subprocess(test_config.CT_TOOL + " --autocomplete=--usm-level=#none,restricted#--use-explicit-namespace=#cl,sycl,s", single_case_text)
91+
call_subprocess(single_case_text.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.print_text)
9595

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

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

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

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

112-
call_subprocess(test_config.CT_TOOL + " --autocomplete=-", single_case_text)
112+
call_subprocess(single_case_text.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.print_text)
156156

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

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

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import platform
1111
import os
1212
import sys
13-
from test_config import CT_TOOL
13+
1414

1515
from test_utils import *
1616

@@ -22,7 +22,7 @@ def migrate_test(single_case_text):
2222
call_subprocess("intercept-build /usr/bin/make", single_case_text)
2323
in_root = ""
2424
extra_args = ""
25-
return call_subprocess(test_config.CT_TOOL + " --cuda-include-path=" + test_config.include_path + " " +
25+
return call_subprocess(single_case_text.CT_TOOL + " --cuda-include-path=" + single_case_text.include_path + " " +
2626
"-p .", single_case_text)
2727

2828
def build_test(single_case_text):

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import platform
1111
import os
1212
import sys
13-
from test_config import CT_TOOL
13+
1414

1515
from test_utils import *
1616

@@ -22,7 +22,7 @@ def migrate_test(single_case_text):
2222
call_subprocess("intercept-build /usr/bin/make", single_case_text)
2323
in_root = ""
2424
extra_args = ""
25-
call_subprocess(test_config.CT_TOOL + " --cuda-include-path=" + test_config.include_path + " " +
25+
call_subprocess(single_case_text.CT_TOOL + " --cuda-include-path=" + single_case_text.include_path + " " +
2626
"-p .", single_case_text)
2727
return False
2828
def build_test(single_case_text):

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ 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++", single_case_text)
21+
call_subprocess(single_case_text.CT_TOOL + " test.cu --out-root=out --cuda-include-path=" + single_case_text.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.print_text)
2323

2424
def build_test(single_case_text):

0 commit comments

Comments
 (0)