Skip to content

Commit 3e6ef0e

Browse files
committed
fix output and command record
Signed-off-by: Ni, Wenhui <[email protected]>
1 parent 999916c commit 3e6ef0e

File tree

122 files changed

+168
-168
lines changed

Some content is hidden

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

122 files changed

+168
-168
lines changed

behavior_tests/src/bad_input_1/do_test.py

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

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def migrate_test(single_case_text):
5050
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=",
53-
single_case_text.command_text)
53+
single_case_text.print_text)
5454

5555

5656
def build_test(single_case_text):

behavior_tests/src/bt-autocomplete/do_test.py

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,93 +21,93 @@ def migrate_test(single_case_text):
2121

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

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

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

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

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

4444
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'
49-
res = res and (reference == single_case_text.command_text)
49+
res = res and (reference == single_case_text.print_text)
5050

5151
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'
56-
res = res and (reference == single_case_text.command_text)
56+
res = res and (reference == single_case_text.print_text)
5757

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

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

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

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

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

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

8383
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'
89-
res = res and (reference == single_case_text.command_text)
89+
res = res and (reference == single_case_text.print_text)
9090

9191
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'
94-
res = res and (reference == single_case_text.command_text)
94+
res = res and (reference == single_case_text.print_text)
9595

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

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

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

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

112112
call_subprocess(test_config.CT_TOOL + " --autocomplete=-", single_case_text)
113113
opts = ['--always-use-async-handler\n',
@@ -152,15 +152,15 @@ def migrate_test(single_case_text):
152152
'--version\n',
153153
'-p\n']
154154
for opt in opts:
155-
res = res and (opt in single_case_text.command_text)
155+
res = res and (opt in single_case_text.print_text)
156156

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

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

165165
return res
166166

behavior_tests/src/bt-check-unexpected-message/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
call_subprocess(test_config.CT_TOOL + " test.cu --out-root=out --cuda-include-path=" + test_config.include_path + " --extra-arg=-xc++", single_case_text)
22-
return not is_sub_string("warning: '-x c' after last input file has no effect [-Wunused-command-line-argument]", single_case_text.command_text)
22+
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):
2525
return call_subprocess("icpx -fsycl out/test.dp.cpp", single_case_text)

behavior_tests/src/bt-empty-cdb-default-out-folder/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

2121
def migrate_test(single_case_text):
2222
call_subprocess(test_config.CT_TOOL + " -p=./ --cuda-include-path=" + test_config.include_path, single_case_text)
23-
return is_sub_string("Migration not necessary; no CUDA code detected", single_case_text.command_text)
23+
return is_sub_string("Migration not necessary; no CUDA code detected", single_case_text.print_text)
2424
def build_test(single_case_text):
2525
return True
2626
def run_test(single_case_text):

behavior_tests/src/bt-extra-arg/do_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ def setup_test(single_case_text):
2020

2121
def migrate_test(single_case_text):
2222
return (call_subprocess(test_config.CT_TOOL + " --extra-arg=\"--cuda-path=" + test_config.include_path + "\" vector_add.cu", single_case_text)
23-
and is_sub_string("Parsing", single_case_text.command_text)
24-
and is_sub_string("Analyzing", single_case_text.command_text)
25-
and is_sub_string("Migrating", single_case_text.command_text))
23+
and is_sub_string("Parsing", single_case_text.print_text)
24+
and is_sub_string("Analyzing", single_case_text.print_text)
25+
and is_sub_string("Migrating", single_case_text.print_text))
2626

2727
def build_test(single_case_text):
2828
return True

behavior_tests/src/bt-help/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 +" --help", single_case_text)
23-
return is_sub_string("USAGE", single_case_text.command_text)
23+
return is_sub_string("USAGE", single_case_text.print_text)
2424

2525
def build_test(single_case_text):
2626
return True

behavior_tests/src/bt-in-root-empty-process-all/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 + " --process-all --cuda-include-path=" + test_config.include_path + " --in-root=", single_case_text)
23-
return is_sub_string("Error: The option --process-all requires that the --in-root be specified explicitly", single_case_text.command_text)
23+
return is_sub_string("Error: The option --process-all requires that the --in-root be specified explicitly", single_case_text.print_text)
2424

2525
def build_test(single_case_text):
2626
return True

behavior_tests/src/bt-invalid-cuda-version/do_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def migrate_test(single_case_text):
2222
in_root = os.getcwd()
2323
test_case_path = os.path.join(in_root, "vector_add.cu")
2424
call_subprocess(test_config.CT_TOOL + " " + test_case_path + " --out-root=out --in-root=" + in_root + " --cuda-include-path=" + include_path, single_case_text)
25-
return is_sub_string("Error: The version of CUDA header files specified by --cuda-include-path is not supported. See Release Notes for supported versions.", single_case_text.command_text)
25+
return is_sub_string("Error: The version of CUDA header files specified by --cuda-include-path is not supported. See Release Notes for supported versions.", single_case_text.print_text)
2626

2727
def build_test(single_case_text):
2828
return True

behavior_tests/src/bt-kernel-function-limitation/do_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ def migrate_test(single_case_text):
2121

2222
call_subprocess(test_config.CT_TOOL + " --optimize-migration --out-root=./out kernel-func.cu --cuda-include-path=" + test_config.include_path, single_case_text)
2323

24-
ret = is_sub_string("Recursive functions cannot be called in SYCL device code", single_case_text.command_text)
25-
ret = is_sub_string("Virtual functions cannot be called in SYCL device code", single_case_text.command_text) and ret
24+
ret = is_sub_string("Recursive functions cannot be called in SYCL device code", single_case_text.print_text)
25+
ret = is_sub_string("Virtual functions cannot be called in SYCL device code", single_case_text.print_text) and ret
2626
return ret
2727
def build_test(single_case_text):
2828
return True

0 commit comments

Comments
 (0)