diff --git a/DEPS b/DEPS index 05a2c1e3133b8..c6caa639b1798 100644 --- a/DEPS +++ b/DEPS @@ -289,7 +289,7 @@ allowed_hosts = [ ] deps = { - 'src': 'https://github.com/flutter/buildroot.git' + '@' + 'a22a4ea15e0b9cbba9200014f90fcea16ecb896a', + 'src': 'https://github.com/flutter/buildroot.git' + '@' + 'bce07474ce354afc8ea6bb1b695cc86ef376260d', 'src/flutter/third_party/depot_tools': Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + '580b4ff3f5cd0dcaa2eacda28cefe0f45320e8f7', diff --git a/ci/builders/linux_fuchsia.json b/ci/builders/linux_fuchsia.json index 249ba44090d9e..e568471dc3ab3 100644 --- a/ci/builders/linux_fuchsia.json +++ b/ci/builders/linux_fuchsia.json @@ -405,6 +405,10 @@ "name": "run_tests test", "script": "flutter/testing/fuchsia/run_tests_test.py" }, + { + "name": "build_fuchsia_artifacts test", + "script": "flutter/tools/fuchsia/build_fuchsia_artifacts_test.py" + }, { "name": "x64 emulator based debug tests", "language": "python3", diff --git a/tools/fuchsia/build_fuchsia_artifacts.py b/tools/fuchsia/build_fuchsia_artifacts.py index 2dd10ea86ede3..e170a699555f5 100755 --- a/tools/fuchsia/build_fuchsia_artifacts.py +++ b/tools/fuchsia/build_fuchsia_artifacts.py @@ -178,10 +178,12 @@ def CopyToBucket(src, dst, product=False): def ReadTargetAPILevel(): - filename = os.path.join(os.path.dirname(__file__), 'target_api_level') + filename = os.path.join(os.path.dirname(__file__), '../../build/config/fuchsia/gn_configs.gni') with open(filename) as f: - api_level = f.read().rstrip('\n') - return api_level + for line in f: + if line.startswith('fuchsia_target_api_level'): + return line.split('=')[-1].strip() + assert False, 'No fuchsia_target_api_level found in //flutter/build/config/fuchsia/gn_configs.gni' def CopyVulkanDepsToBucket(src, dst, arch): diff --git a/tools/fuchsia/build_fuchsia_artifacts_test.py b/tools/fuchsia/build_fuchsia_artifacts_test.py new file mode 100755 index 0000000000000..466ca4339db82 --- /dev/null +++ b/tools/fuchsia/build_fuchsia_artifacts_test.py @@ -0,0 +1,18 @@ +#!/usr/bin/env vpython3 + +import unittest + +import build_fuchsia_artifacts + + +class BuildFuchsiaArtifactsTest(unittest.TestCase): + + def test_read_fuchsia_target_api_level(self): + # It's expected to update this test each time the fuchsia_target_api_level + # in //flutter/build/config/fuchsia/gn_configs.gni is changed, so it won't + # accidentally publishing the artifacts with a wrong api level suffix. + self.assertEqual(build_fuchsia_artifacts.ReadTargetAPILevel(), '16') + + +if __name__ == '__main__': + unittest.main() diff --git a/tools/fuchsia/target_api_level b/tools/fuchsia/target_api_level deleted file mode 100644 index b6a7d89c68e0c..0000000000000 --- a/tools/fuchsia/target_api_level +++ /dev/null @@ -1 +0,0 @@ -16 diff --git a/tools/gn b/tools/gn index 987184143a17c..4aec57d68159c 100755 --- a/tools/gn +++ b/tools/gn @@ -768,12 +768,6 @@ def to_gn_args(args): if args.target_os == 'fuchsia': gn_args['gn_configs_path'] = '//flutter/build/config/fuchsia/gn_configs.gni' gn_args['fuchsia_gn_sdk'] = '//flutter/tools/fuchsia/gn-sdk' - if args.fuchsia_target_api_level is not None: - gn_args['fuchsia_target_api_level'] = args.fuchsia_target_api_level - elif args.target_os == 'fuchsia': - # Read the default target api level from a file so we can update it with a roller - with open(os.path.join(os.path.dirname(__file__), 'fuchsia/target_api_level')) as file: - gn_args['fuchsia_target_api_level'] = int(file.read().strip()) # Flags for Dart features: if args.use_mallinfo2: @@ -1222,8 +1216,6 @@ def parse_args(args): ) parser.add_argument('--no-prebuilt-dart-sdk', dest='prebuilt_dart_sdk', action='store_false') - parser.add_argument('--fuchsia-target-api-level', dest='fuchsia_target_api_level') - # Flags for Dart features. parser.add_argument( '--use-mallinfo2',