Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some fixes for Python scripts #4

Merged
merged 1 commit into from Sep 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion clangformat.py 100644 → 100755
@@ -1,3 +1,4 @@
#!/usr/bin/env python3
# ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
# run clang format over all files
#
Expand Down Expand Up @@ -56,4 +57,5 @@ def main( ):
return

# call the entry point
main( )
if __name__ == "__main__":
main()
8 changes: 5 additions & 3 deletions run_conformance_tests.py 100644 → 100755
@@ -1,3 +1,4 @@
#!/usr/bin/env python3
import os
import subprocess
import sys
Expand Down Expand Up @@ -104,6 +105,7 @@ def generate_cmake_call(cmake_exe, build_system_name, conformance_filter,
Generates a CMake call based on the input in a form accepted by
subprocess.call().
"""
import shlex
return [
cmake_exe,
'..',
Expand All @@ -113,7 +115,7 @@ def generate_cmake_call(cmake_exe, build_system_name, conformance_filter,
'-Dhost_device_name=' + host_names[1],
'-Dopencl_platform_name=' + opencl_names[0],
'-Dopencl_device_name=' + opencl_names[1],
] + additional_cmake_args.split()
] + shlex.split(additional_cmake_args)


def subprocess_call(parameter_list):
Expand Down Expand Up @@ -290,7 +292,7 @@ def update_xml_attribs(host_info_json, opencl_info_json, implementation_name,
return test_xml_root


def main(argv=sys.argv):
def main(argv=sys.argv[1:]):

# Parse and gather all the script args
(cmake_exe, build_system_name, build_system_call, conformance_filter,
Expand Down Expand Up @@ -332,7 +334,7 @@ def main(argv=sys.argv):
result_xml_root.append(stylesheet_xml_root[0])

# Get the xml results as a string and append them to the report header.
report = REPORT_HEADER + ET.tostring(result_xml_root)
report = REPORT_HEADER + ET.tostring(result_xml_root).decode("utf-8")

with open("conformance_report.xml", 'w') as final_conformance_report:
final_conformance_report.write(report)
Expand Down
2 changes: 1 addition & 1 deletion runtests.py 100644 → 100755
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python3
################################################################################
##
## SYCL 1.2.1 Conformance Test Suite
Expand Down
2 changes: 1 addition & 1 deletion tests/math_builtin_api/generate_math_builtin.py 100644 → 100755
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python3
################################################################################
##
## SYCL 1.2.1 Conformance Test Suite
Expand Down
1 change: 1 addition & 0 deletions tests/vector_alias/generate_vector_alias.py 100644 → 100755
@@ -1,3 +1,4 @@
#!/usr/bin/env python3
# ************************************************************************
#
# SYCL Conformance Test Suite
Expand Down
1 change: 1 addition & 0 deletions tests/vector_api/generate_vector_api.py 100644 → 100755
@@ -1,3 +1,4 @@
#!/usr/bin/env python3
# ************************************************************************
#
# SYCL Conformance Test Suite
Expand Down
1 change: 1 addition & 0 deletions tests/vector_constructors/generate_vector_constructors.py 100644 → 100755
@@ -1,3 +1,4 @@
#!/usr/bin/env python3
# ************************************************************************
#
# SYCL Conformance Test Suite
Expand Down
1 change: 1 addition & 0 deletions tests/vector_load_store/generate_vector_load_store.py 100644 → 100755
@@ -1,3 +1,4 @@
#!/usr/bin/env python3
# ************************************************************************
#
# SYCL Conformance Test Suite
Expand Down
1 change: 1 addition & 0 deletions tests/vector_operators/generate_vector_operators.py 100644 → 100755
@@ -1,3 +1,4 @@
#!/usr/bin/env python3
# ************************************************************************
#
# SYCL Conformance Test Suite
Expand Down
1 change: 1 addition & 0 deletions tests/vector_swizzle_assignment/generate_vector_swizzle_assignment.py 100644 → 100755
@@ -1,3 +1,4 @@
#!/usr/bin/env python3
# ************************************************************************
#
# SYCL Conformance Test Suite
Expand Down
1 change: 1 addition & 0 deletions tests/vector_swizzles/generate_vector_swizzles.py 100644 → 100755
@@ -1,3 +1,4 @@
#!/usr/bin/env python3
# ************************************************************************
#
# SYCL Conformance Test Suite
Expand Down
1 change: 1 addition & 0 deletions tests/vector_swizzles_opencl/generate_vector_swizzles_opencl.py 100644 → 100755
@@ -1,3 +1,4 @@
#!/usr/bin/env python3
# ************************************************************************
#
# SYCL Conformance Test Suite
Expand Down