Skip to content

Commit c27fdb4

Browse files
committed
Only include the scene observatory test if the kernel file is present
1 parent 50967f0 commit c27fdb4

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

testing/dart/observatory/BUILD.gn

+4-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ tests = [
1313
]
1414

1515
if (impeller_enable_3d) {
16-
tests += [ "scene_reload_test.dart" ]
16+
# This test is in a subdirectory to avoid the `run_test.py` glob by default.
17+
# There is a special check to ensure the test's kernel file is present before
18+
# it's added to the list of tests.
19+
tests += [ "scene/scene_reload_test.dart" ]
1720
}
1821

1922
foreach(test, tests) {

testing/run_tests.py

+8
Original file line numberDiff line numberDiff line change
@@ -759,6 +759,14 @@ def gather_dart_tests(build_dir, test_filter):
759759
dart_observatory_tests = glob.glob(
760760
'%s/observatory/*_test.dart' % dart_tests_dir
761761
)
762+
# Only include the 3D scene observatory test if the kernel file has been built.
763+
# It'll only be built if Impeller Scene's framework integration is enabled.
764+
dart_scene_observatory_tests = '%s/observatory/scene/scene_reload_test.dart' % dart_tests_dir
765+
if os.path.isfile(
766+
os.path.join(build_dir, 'gen',
767+
os.path.basename(dart_scene_observatory_tests) + '.dill')):
768+
dart_observatory_tests += [dart_scene_observatory_tests]
769+
762770
dart_tests = glob.glob('%s/*_test.dart' % dart_tests_dir)
763771

764772
if 'release' not in build_dir:

0 commit comments

Comments
 (0)