This repository was archived by the owner on Feb 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 43
43
44
44
ENCODING = 'UTF-8'
45
45
46
+ # This number must be updated when adding new golden tests to impeller.
47
+ _NUM_EXPECTED_GENERATED_IMPELLER_GOLDEN_FILES = 566
48
+
46
49
logger = logging .getLogger (__name__ )
47
50
logger_handler = logging .StreamHandler ()
48
51
@@ -1115,6 +1118,15 @@ def run_impeller_golden_tests(build_dir: str):
1115
1118
)
1116
1119
with tempfile .TemporaryDirectory (prefix = 'impeller_golden' ) as temp_dir :
1117
1120
run_cmd ([tests_path , '--working_dir=%s' % temp_dir ], cwd = build_dir )
1121
+ num_generated_files = len (os .listdir (temp_dir ))
1122
+ if num_generated_files != _NUM_EXPECTED_GENERATED_IMPELLER_GOLDEN_FILES :
1123
+ raise Exception (
1124
+ '`impeller_golden_tests` was expected to generate '
1125
+ f'{ _NUM_EXPECTED_GENERATED_IMPELLER_GOLDEN_FILES } files, '
1126
+ f'{ num_generated_files } were generated. If this is expected, update '
1127
+ '_NUM_EXPECTED_GENERATED_IMPELLER_GOLDEN_FILES.'
1128
+ )
1129
+
1118
1130
with DirectoryChange (harvester_path ):
1119
1131
run_cmd (['dart' , 'pub' , 'get' ])
1120
1132
bin_path = Path ('.' ).joinpath ('bin'
You can’t perform that action at this time.
0 commit comments