MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / main

Function main

test/diff/diff_files/generate_tests.py:280–301  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

278 fout.write(str.encode(cmake))
279
280def main():
281
282 if len(sys.argv) != 2:
283 print_usage()
284 return 1
285
286 diff_tool = sys.argv[1]
287 if not os.path.exists(diff_tool):
288 print("No such file: {}".format(diff_tool))
289 print_usage()
290 return 1
291
292 diff_tool = os.path.realpath(diff_tool)
293 os.chdir(os.path.dirname(__file__))
294
295 test_names = sorted([f[:-11] for f in glob.glob("*_src.spvasm")])
296
297 test_files = generate_tests(diff_tool, test_names)
298
299 generate_cmake(test_files)
300
301 return 0
302
303if __name__ == '__main__':
304 sys.exit(main())

Callers 1

generate_tests.pyFile · 0.70

Calls 4

generate_testsFunction · 0.85
generate_cmakeFunction · 0.85
formatMethod · 0.80
print_usageFunction · 0.70

Tested by

no test coverage detected