diff --git a/shell/platform/linux/fl_dart_project_test.cc b/shell/platform/linux/fl_dart_project_test.cc index 4cd3b2ce82b66..7b37ced42a57d 100644 --- a/shell/platform/linux/fl_dart_project_test.cc +++ b/shell/platform/linux/fl_dart_project_test.cc @@ -44,7 +44,7 @@ TEST(FlDartProjectTest, DartEntrypointArgs) { char** retrieved_args = fl_dart_project_get_dart_entrypoint_arguments(project); - EXPECT_EQ(g_strv_length(retrieved_args), 0U); + EXPECT_EQ(retrieved_args, nullptr); GPtrArray* args_array = g_ptr_array_new(); g_ptr_array_add(args_array, const_cast("arg_one")); diff --git a/shell/platform/linux/fl_engine_test.cc b/shell/platform/linux/fl_engine_test.cc index 6121adf0d0633..b5dd50aec9d94 100644 --- a/shell/platform/linux/fl_engine_test.cc +++ b/shell/platform/linux/fl_engine_test.cc @@ -240,7 +240,7 @@ void on_pre_engine_restart_destroy_notify(gpointer user_data) { // Checks restarting the engine invokes the correct callback. TEST(FlEngineTest, OnPreEngineRestart) { - g_autoptr(FlEngine) engine = make_mock_engine(); + FlEngine* engine = make_mock_engine(); FlutterEngineProcTable* embedder_api = fl_engine_get_embedder_api(engine); OnPreEngineRestartCallback callback; @@ -271,7 +271,10 @@ TEST(FlEngineTest, OnPreEngineRestart) { int count = 0; - // Set a handler, and the call should has an effect. + // Set handler so that: + // + // * When the engine restarts, count += 1; + // * When the engine is freed, count += 10. fl_engine_set_on_pre_engine_restart_handler( engine, on_pre_engine_restart_cb, &count, on_pre_engine_restart_destroy_notify); diff --git a/shell/platform/linux/fl_key_embedder_responder.cc b/shell/platform/linux/fl_key_embedder_responder.cc index 9aec7e40a880d..468c62ffdf4fa 100644 --- a/shell/platform/linux/fl_key_embedder_responder.cc +++ b/shell/platform/linux/fl_key_embedder_responder.cc @@ -766,7 +766,9 @@ static void fl_key_embedder_responder_handle_event_impl( } } - update_pressing_state(self, physical_key, is_down_event ? logical_key : 0); + if (out_event.type != kFlutterKeyEventTypeRepeat) { + update_pressing_state(self, physical_key, is_down_event ? logical_key : 0); + } possibly_update_lock_bit(self, logical_key, is_down_event); if (is_down_event) { update_mapping_record(self, physical_key, logical_key); diff --git a/testing/run_tests.py b/testing/run_tests.py index 2171ce8615d31..e0f7f3366b9d6 100755 --- a/testing/run_tests.py +++ b/testing/run_tests.py @@ -106,7 +106,8 @@ def FindExecutablePath(path): def RunEngineExecutable(build_dir, executable_name, filter, flags=[], - cwd=buildroot_dir, forbidden_output=[], expect_failure=False, coverage=False): + cwd=buildroot_dir, forbidden_output=[], expect_failure=False, coverage=False, + extra_env={}): if filter is not None and executable_name not in filter: print('Skipping %s due to filter.' % executable_name) return @@ -138,6 +139,8 @@ def RunEngineExecutable(build_dir, executable_name, filter, flags=[], if not env: env = os.environ.copy() env['FLUTTER_BUILD_DIRECTORY'] = build_dir + for key, value in extra_env.items(): + env[key] = value try: RunCmd(test_command, cwd=cwd, forbidden_output=forbidden_output, expect_failure=expect_failure, env=env) @@ -238,7 +241,9 @@ def RunCCTests(build_dir, filter, coverage, capture_core_dump): RunEngineExecutable(build_dir, 'txt_unittests', filter, icu_flags + shuffle_flags, coverage=coverage) if IsLinux(): - RunEngineExecutable(build_dir, 'flutter_linux_unittests', filter, shuffle_flags, coverage=coverage) + gtk_flags = ['--icu-data-file-path=%s' % os.path.join(build_dir, 'icudtl.dat')] + RunEngineExecutable(build_dir, 'flutter_linux_unittests', filter, shuffle_flags, coverage=coverage, + extra_env={'G_DEBUG': 'fatal-criticals'}) RunEngineExecutable(build_dir, 'flutter_glfw_unittests', filter, shuffle_flags, coverage=coverage) # Impeller tests are only supported on macOS for now.