From 62035d9c960049e188f1d593180f25e0bb8c9d8e Mon Sep 17 00:00:00 2001 From: Luca Farsi Date: Mon, 25 Nov 2024 18:21:45 +0000 Subject: Add --device-build flag to build_test_suites.py The flag will be used to differentiate device builds so we can do the appropriate BWYN logic. Also include DIST_DIR as a required env var. Bug: 378704055 Change-Id: I203645ab82d52024a713c41c6fdc806f8672f7cc Test: atest build_test_suites_test --- ci/build_test_suites_test.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ci/build_test_suites_test.py') diff --git a/ci/build_test_suites_test.py b/ci/build_test_suites_test.py index 26f4316f8c..503a5f46a3 100644 --- a/ci/build_test_suites_test.py +++ b/ci/build_test_suites_test.py @@ -78,6 +78,12 @@ class BuildTestSuitesTest(fake_filesystem_unittest.TestCase): with self.assert_raises_word(build_test_suites.Error, 'TOP'): build_test_suites.main([]) + def test_missing_dist_dir_env_var_raises(self): + del os.environ['DIST_DIR'] + + with self.assert_raises_word(build_test_suites.Error, 'DIST_DIR'): + build_test_suites.main([]) + def test_invalid_arg_raises(self): invalid_args = ['--invalid_arg'] @@ -121,6 +127,7 @@ class BuildTestSuitesTest(fake_filesystem_unittest.TestCase): 'TARGET_RELEASE': 'release', 'TARGET_PRODUCT': 'product', 'TOP': str(self.fake_top), + 'DIST_DIR': str(self.fake_top.joinpath('dist')), }) self.mock_subprocess_run.return_value = 0 -- cgit v1.2.3-59-g8ed1b