From 15355429467bb9256e4bca46b09c1da661307a56 Mon Sep 17 00:00:00 2001 From: Dan Field Date: Wed, 3 May 2023 18:49:22 -0700 Subject: [PATCH] Make run_tests.py assert that the ios test dylib is at least as new as libFlutter.dylib (flutter/engine#41720) This would have helped me figure out why I wasn't getting the same failures as on CI more quickly. --- engine/src/flutter/testing/run_tests.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/engine/src/flutter/testing/run_tests.py b/engine/src/flutter/testing/run_tests.py index d03e7aa406..f800a47454 100755 --- a/engine/src/flutter/testing/run_tests.py +++ b/engine/src/flutter/testing/run_tests.py @@ -622,13 +622,22 @@ def ensure_ios_tests_are_built(ios_out_dir): message.append( 'gn --ios --unoptimized --runtime-mode=debug --no-lto --simulator' ) - message.append('autoninja -C %s ios_test_flutter' % ios_out_dir) + message.append('ninja -C %s ios_test_flutter' % ios_out_dir) final_message = "%s or %s doesn't exist. Please run the following commands: \n%s" % ( ios_out_dir, ios_test_lib, '\n'.join(message) ) assert os.path.exists(tmp_out_dir ) and os.path.exists(ios_test_lib), final_message + ios_test_lib_time = os.path.getmtime(ios_test_lib) + flutter_dylib = os.path.join(tmp_out_dir, 'libFlutter.dylib') + flutter_dylib_time = os.path.getmtime(flutter_dylib) + + final_message = '%s is older than %s. Please run the following commands: \n%s' % ( + ios_test_lib, flutter_dylib, '\n'.join(message) + ) + assert flutter_dylib_time <= ios_test_lib_time, final_message + def assert_expected_xcode_version(): """Checks that the user has a version of Xcode installed"""