Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit a82343b

Browse files
authored
Add build_and_test_linux_release presubmit test (#17073)
1 parent 9eacd02 commit a82343b

4 files changed

Lines changed: 21 additions & 9 deletions

File tree

.cirrus.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,20 @@ task:
6060
cd $ENGINE_PATH/src/out/host_release/
6161
./txt_benchmarks --benchmark_format=json > txt_benchmarks.json
6262
./fml_benchmarks --benchmark_format=json > fml_benchmarks.json
63+
./fml_benchmarks --benchmark_format=json > shell_benchmarks.json
6364
cd $ENGINE_PATH/src/flutter/testing/benchmark
6465
pub get
6566
dart bin/parse_and_send.dart ../../../out/host_release/txt_benchmarks.json
6667
dart bin/parse_and_send.dart ../../../out/host_release/fml_benchmarks.json
68+
dart bin/parse_and_send.dart ../../../out/host_release/shell_benchmarks.json
69+
- name: build_and_test_linux_release
70+
compile_host_script: |
71+
cd $ENGINE_PATH/src
72+
./flutter/tools/gn --runtime-mode=release
73+
ninja -C out/host_release
74+
test_host_script: |
75+
cd $ENGINE_PATH/src
76+
./flutter/testing/run_tests.sh host_release
6777
- name: build_and_test_linux_unopt_debug
6878
compile_host_script: |
6979
cd $ENGINE_PATH/src

flutter_frontend_server/test/to_string_test.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,9 +270,13 @@ void main(List<String> args) async {
270270
]));
271271
final ProcessResult runResult = Process.runSync(dart, <String>[regularDill]);
272272
_checkProcessResult(runResult);
273+
String paintString = '"Paint.toString":"Paint(Color(0xffffffff))"';
274+
if (const bool.fromEnvironment('dart.vm.product', defaultValue: false)) {
275+
paintString = '"Paint.toString":"Instance of \'Paint\'"';
276+
}
273277
expect(
274278
runResult.stdout.trim(),
275-
'{"Paint.toString":"Paint(Color(0xffffffff))",'
279+
'{$paintString,'
276280
'"Brightness.toString":"Brightness.dark",'
277281
'"Foo.toString":"I am a Foo",'
278282
'"Keep.toString":"I am a Keep"}',

shell/common/shell_unittests.cc

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -270,21 +270,19 @@ TEST_F(ShellTest, BlacklistedDartVMFlag) {
270270
fml::CommandLine::Option("dart-flags", "--verify_after_gc")};
271271
fml::CommandLine command_line("", options, std::vector<std::string>());
272272

273-
#if !FLUTTER_RELEASE
274273
// Upon encountering a non-whitelisted Dart flag the process terminates.
275274
const char* expected =
276275
"Encountered blacklisted Dart VM flag: --verify_after_gc";
277276
ASSERT_DEATH(flutter::SettingsFromCommandLine(command_line), expected);
278-
#else
279-
flutter::Settings settings = flutter::SettingsFromCommandLine(command_line);
280-
EXPECT_EQ(settings.dart_flags.size(), 0u);
281-
#endif
282277
}
283278

284279
TEST_F(ShellTest, WhitelistedDartVMFlag) {
285280
const std::vector<fml::CommandLine::Option> options = {
286-
fml::CommandLine::Option("dart-flags",
287-
"--max_profile_depth 1,--random_seed 42")};
281+
#if !FLUTTER_RELEASE
282+
fml::CommandLine::Option("dart-flags",
283+
"--max_profile_depth 1,--random_seed 42")
284+
#endif
285+
};
288286
fml::CommandLine command_line("", options, std::vector<std::string>());
289287
flutter::Settings settings = flutter::SettingsFromCommandLine(command_line);
290288

testing/run_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ def main():
409409
if 'benchmarks' in types and not IsWindows():
410410
RunEngineBenchmarks(build_dir, engine_filter)
411411

412-
if 'engine' in types or 'font-subset' in types:
412+
if ('engine' in types or 'font-subset' in types) and args.variant != 'host_release':
413413
RunCmd(['python', 'test.py'], cwd=font_subset_dir)
414414

415415

0 commit comments

Comments
 (0)