Commit 18c9aa0d by Jamie Madill Committed by Commit Bot

Run test spec update as part of codegen.

Test specs now will be updated when the Chromium build files change. It will be automatically included as part of the Chromium->ANGLE roll. Bug: angleproject:5114 Change-Id: If99c2a20033d417a5999295f425a3bb203f5da3a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2860962 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarYuly Novikov <ynovikov@chromium.org>
parent a16aea95
...@@ -3,6 +3,10 @@ ...@@ -3,6 +3,10 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
"""Script to generate the test spec JSON files. Calls Chromium's generate_buildbot_json. """Script to generate the test spec JSON files. Calls Chromium's generate_buildbot_json.
=== NOTE: DO NOT RUN THIS SCRIPT DIRECTLY. ===
Run scripts/run_code_generation.py instead to update necessary hashes.
""" """
import os import os
...@@ -12,8 +16,8 @@ import subprocess ...@@ -12,8 +16,8 @@ import subprocess
d = os.path.dirname d = os.path.dirname
THIS_DIR = d(os.path.abspath(__file__)) THIS_DIR = d(os.path.abspath(__file__))
TESTING_DIR = os.path.join(d(d(THIS_DIR)), 'testing', 'buildbot') TESTING_BBOT_DIR = os.path.join(d(d(THIS_DIR)), 'testing', 'buildbot')
sys.path.insert(0, TESTING_DIR) sys.path.insert(0, TESTING_BBOT_DIR)
import generate_buildbot_json import generate_buildbot_json
...@@ -39,7 +43,25 @@ MIXINS_PYL_TEMPLATE = """\ ...@@ -39,7 +43,25 @@ MIXINS_PYL_TEMPLATE = """\
{mixin_data} {mixin_data}
""" """
if __name__ == '__main__': # pragma: no cover
def main():
if len(sys.argv) > 1:
gen_bb_json = os.path.join(TESTING_BBOT_DIR, 'generate_buildbot_json.py')
mixins_pyl = os.path.join(TESTING_BBOT_DIR, 'mixins.pyl')
inputs = [
'test_suite_exceptions.pyl', 'test_suites.pyl', 'variants.pyl', 'waterfalls.pyl',
gen_bb_json, mixins_pyl
]
outputs = ['angle.json', 'mixins.pyl']
if sys.argv[1] == 'inputs':
print(','.join(inputs))
elif sys.argv[1] == 'outputs':
print(','.join(outputs))
else:
print('Invalid script parameters')
return 1
return 0
chromium_args = generate_buildbot_json.BBJSONGenerator.parse_args(sys.argv[1:]) chromium_args = generate_buildbot_json.BBJSONGenerator.parse_args(sys.argv[1:])
chromium_generator = generate_buildbot_json.BBJSONGenerator(chromium_args) chromium_generator = generate_buildbot_json.BBJSONGenerator(chromium_args)
chromium_generator.load_configuration_files() chromium_generator.load_configuration_files()
...@@ -85,4 +107,8 @@ if __name__ == '__main__': # pragma: no cover ...@@ -85,4 +107,8 @@ if __name__ == '__main__': # pragma: no cover
f.write(generated_mixin_pyl) f.write(generated_mixin_pyl)
f.close() f.close()
sys.exit(angle_generator.main()) return angle_generator.main()
if __name__ == '__main__': # pragma: no cover
sys.exit(main())
{
"infra/specs/angle.json":
"0726b06598519056f8a5c8734f0ece69",
"infra/specs/generate_test_spec_json.py":
"e1c8a771f751adad715d7bea900fc8e1",
"infra/specs/mixins.pyl":
"9e823fc9ff27db9fc49eae7ac1615ab6",
"infra/specs/test_suite_exceptions.pyl":
"aad1a4aed801277cc531733deab221b5",
"infra/specs/test_suites.pyl":
"75d1ccce3ffded215b002dc0bab41773",
"infra/specs/variants.pyl":
"8cfcaa99fa07ad2a2d5d14f220fd5037",
"infra/specs/waterfalls.pyl":
"2c37af604e70b11d1d1c5a7d48394a46",
"testing/buildbot/generate_buildbot_json.py":
"c04d166b1cee26a4db52c1b1613c8462",
"testing/buildbot/mixins.pyl":
"740f76768734c647dac0e1fa1c16835d"
}
\ No newline at end of file
...@@ -129,6 +129,8 @@ generators = { ...@@ -129,6 +129,8 @@ generators = {
'src/common/spirv/gen_spirv_builder_and_parser.py', 'src/common/spirv/gen_spirv_builder_and_parser.py',
'Static builtins': 'Static builtins':
'src/compiler/translator/gen_builtin_symbols.py', 'src/compiler/translator/gen_builtin_symbols.py',
'Test spec JSON':
'infra/specs/generate_test_spec_json.py',
'uniform type': 'uniform type':
'src/common/gen_uniform_type_table.py', 'src/common/gen_uniform_type_table.py',
'Vulkan format': 'Vulkan format':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment