From a342dfb8137ab586265d7c3e614b8d5b6ca0140f Mon Sep 17 00:00:00 2001 From: Dan Field Date: Wed, 3 May 2023 17:14:55 -0700 Subject: [PATCH 1/4] Make run_tests.py assert that the ios test dylib is at least as new as libfFlutter.dylib This would have helped me figure out why I wasn't getting the same failures as on CI more quickly. --- testing/run_tests.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/testing/run_tests.py b/testing/run_tests.py index d03e7aa406d56..19667042dc66b 100755 --- a/testing/run_tests.py +++ b/testing/run_tests.py @@ -629,6 +629,14 @@ def ensure_ios_tests_are_built(ios_out_dir): 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""" From 64942a538bdb8effe879f61d38dc636f81efc7bc Mon Sep 17 00:00:00 2001 From: Dan Field Date: Wed, 3 May 2023 17:15:42 -0700 Subject: [PATCH 2/4] Update run_tests.py --- testing/run_tests.py | 1 + 1 file changed, 1 insertion(+) diff --git a/testing/run_tests.py b/testing/run_tests.py index 19667042dc66b..6f79d3083cc5a 100755 --- a/testing/run_tests.py +++ b/testing/run_tests.py @@ -638,6 +638,7 @@ def ensure_ios_tests_are_built(ios_out_dir): ) 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""" version_output = subprocess.check_output(['xcodebuild', '-version']) From da3c2b637ef90882b16598384a90721f8c5ed981 Mon Sep 17 00:00:00 2001 From: Dan Field Date: Wed, 3 May 2023 17:57:38 -0700 Subject: [PATCH 3/4] Make the linter happy --- testing/run_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/run_tests.py b/testing/run_tests.py index 6f79d3083cc5a..3686cef3d9b19 100755 --- a/testing/run_tests.py +++ b/testing/run_tests.py @@ -633,7 +633,7 @@ def ensure_ios_tests_are_built(ios_out_dir): 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" % ( + 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 From 3928e21ace359af8d6e1b33c4e172021767e6fb4 Mon Sep 17 00:00:00 2001 From: Dan Field Date: Wed, 3 May 2023 18:06:39 -0700 Subject: [PATCH 4/4] autoninja -> ninja --- testing/run_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/run_tests.py b/testing/run_tests.py index 3686cef3d9b19..f800a474544a6 100755 --- a/testing/run_tests.py +++ b/testing/run_tests.py @@ -622,7 +622,7 @@ 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) )