Skip to content

Commit 8b9d315

Browse files
authored
[SYCLomatic #2921] Update tests to merge of all the yamls to MainSourceFiles.yaml (#928)
Signed-off-by: Jiang, Zhiwei <[email protected]>
1 parent 6f0c38b commit 8b9d315

File tree

12 files changed

+10
-113
lines changed

12 files changed

+10
-113
lines changed

behavior_tests/behavior_tests.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@
7070
<test testName="ngt-invalid-yaml-for-header1" configFile="config/TEMPLATE_behavior_tests.xml" />
7171
<test testName="ngt-invalid-yaml-for-header2" configFile="config/TEMPLATE_behavior_tests.xml" />
7272
<test testName="ngt-invalid-yaml-for-header3" configFile="config/TEMPLATE_behavior_tests.xml" />
73-
<test testName="ngt-invalid-yaml-for-header4" configFile="config/TEMPLATE_behavior_tests_lin.xml" />
74-
<test testName="ngt-win-invalid-yaml-for-header4" configFile="config/TEMPLATE_behavior_tests_win.xml" />
7573
<test testName="ngt-invalid-json1" configFile="config/TEMPLATE_behavior_tests.xml" />
7674
<test testName="ngt-invalid-json2" configFile="config/TEMPLATE_behavior_tests.xml" />
7775
<test testName="ngt-invalid-json3" configFile="config/TEMPLATE_behavior_tests.xml" />

behavior_tests/src/bt-modified-yaml/do_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def setup_test():
1818
return True
1919

2020
def migrate_test():
21-
yml_file = os.path.join("out", "test.h.yaml")
21+
yml_file = os.path.join("out", "MainSourceFiles.yaml")
2222
test_file = os.path.join("out", "test.h")
2323
ret_str = ""
2424
ret = []

behavior_tests/src/bt-yaml-with-different-options1/do_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def migrate_test():
2121
call_subprocess(test_config.CT_TOOL + " test.cu --in-root . --out-root out --always-use-async-handler --assume-nd-range-dim=1 --comments --enable-ctad --no-dpcpp-extensions=enqueued_barriers --no-dry-pattern --process-all -p . --sycl-named-lambda --use-experimental-features=free-function-queries,nd_range_barrier --use-explicit-namespace=sycl,dpct --usm-level=none --cuda-include-path=" + test_config.include_path)
2222
call_subprocess(test_config.CT_TOOL + " test.cu --out-root out --cuda-include-path=" + test_config.include_path)
2323
return is_sub_string("\"--analysis-scope-path=\"", test_config.command_output) and \
24-
is_sub_string("--always-use-async-handler --comments --compilation-database=\"", test_config.command_output) and \
24+
is_sub_string("--always-use-async-handler --comments", test_config.command_output) and \
2525
is_sub_string("--enable-ctad --use-experimental-features=free-function-queries,nd_range_barrier --use-explicit-namespace=sycl,dpct --no-dpcpp-extensions=enqueued_barriers --assume-nd-range-dim=1 --no-dry-pattern --process-all --sycl-named-lambda --usm-level=none\".", test_config.command_output)
2626

2727
def build_test():

behavior_tests/src/bt-yaml-without-ct-version/do_test.py

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

2222
call_subprocess(test_config.CT_TOOL + " test.cu --out-root=out --cuda-include-path=" + test_config.include_path)
23-
return is_sub_string("Failed to load", test_config.command_output) and \
24-
is_sub_string("Migration continues with incremental migration disabled", test_config.command_output)
23+
return is_sub_string("Migration continues with incremental migration disabled", test_config.command_output)
2524

2625
def build_test():
2726
return True

behavior_tests/src/ngt-invalid-yaml-for-header1/do_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ def migrate_test():
2121
call_subprocess(test_config.CT_TOOL + ' hello.h --out-root=out --cuda-include-path=' + \
2222
os.environ['CUDA_INCLUDE_PATH'])
2323

24-
with open('out/hello.h.yaml', 'r') as f:
24+
with open('out/MainSourceFiles.yaml', 'r') as f:
2525
file_data = f.read()
2626

2727
file_data=file_data.replace('ConstantFlag', 'ConstantFla',1)
28-
with open('out/hello.h.yaml', 'w') as f:
28+
with open('out/MainSourceFiles.yaml', 'w') as f:
2929
f.write(file_data)
3030

3131
call_subprocess(test_config.CT_TOOL + ' hello.h --out-root=./out --cuda-include-path=' + \

behavior_tests/src/ngt-invalid-yaml-for-header2/do_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ def migrate_test():
2121
call_subprocess(test_config.CT_TOOL + ' hello.h --out-root=out --cuda-include-path=' + \
2222
os.environ['CUDA_INCLUDE_PATH'])
2323

24-
with open('out/hello.h.yaml', 'r') as f:
24+
with open('out/MainSourceFiles.yaml', 'r') as f:
2525
file_data = f.read()
2626

2727
file_data=file_data.replace('Offset', ' Offset',1)
28-
with open('out/hello.h.yaml', 'w') as f:
28+
with open('out/MainSourceFiles.yaml', 'w') as f:
2929
f.write(file_data)
3030

3131
call_subprocess(test_config.CT_TOOL + ' hello.h --out-root=./out --cuda-include-path=' + \

behavior_tests/src/ngt-invalid-yaml-for-header3/do_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ def migrate_test():
2222
call_subprocess(test_config.CT_TOOL + ' hello.h --out-root=out --cuda-include-path=' + \
2323
os.environ['CUDA_INCLUDE_PATH'])
2424
file_data=""
25-
with open('out/hello.h.yaml', 'r') as f:
25+
with open('out/MainSourceFiles.yaml', 'r') as f:
2626
file_data = f.read()
2727

2828
file_data = file_data.replace("- FilePath", "FilePath",1)
2929
print(file_data)
30-
with open('out/hello.h.yaml', 'w') as f:
30+
with open('out/MainSourceFiles.yaml', 'w') as f:
3131
f.write(file_data)
3232

3333
call_subprocess(test_config.CT_TOOL + ' hello.h --out-root=./out --cuda-include-path=' + \

behavior_tests/src/ngt-invalid-yaml-for-header4/do_test.py

Lines changed: 0 additions & 43 deletions
This file was deleted.

behavior_tests/src/ngt-invalid-yaml-for-header4/hello.h

Lines changed: 0 additions & 6 deletions
This file was deleted.

behavior_tests/src/ngt-win-invalid-yaml-for-header4/do_test.py

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)