Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,20 @@ task:
cd $ENGINE_PATH/src/out/host_release/
./txt_benchmarks --benchmark_format=json > txt_benchmarks.json
./fml_benchmarks --benchmark_format=json > fml_benchmarks.json
./fml_benchmarks --benchmark_format=json > shell_benchmarks.json
cd $ENGINE_PATH/src/flutter/testing/benchmark
pub get
dart bin/parse_and_send.dart ../../../out/host_release/txt_benchmarks.json
dart bin/parse_and_send.dart ../../../out/host_release/fml_benchmarks.json
dart bin/parse_and_send.dart ../../../out/host_release/shell_benchmarks.json
- name: build_and_test_linux_release
compile_host_script: |
cd $ENGINE_PATH/src
./flutter/tools/gn --runtime-mode=release
ninja -C out/host_release
test_host_script: |
cd $ENGINE_PATH/src
./flutter/testing/run_tests.sh host_release
- name: build_and_test_linux_unopt_debug
compile_host_script: |
cd $ENGINE_PATH/src
Expand Down
6 changes: 5 additions & 1 deletion flutter_frontend_server/test/to_string_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,13 @@ void main(List<String> args) async {
]));
final ProcessResult runResult = Process.runSync(dart, <String>[regularDill]);
_checkProcessResult(runResult);
String paintString = '"Paint.toString":"Paint(Color(0xffffffff))"';
if (const bool.fromEnvironment('dart.vm.product', defaultValue: false)) {
paintString = '"Paint.toString":"Instance of \'Paint\'"';
}
expect(
runResult.stdout.trim(),
'{"Paint.toString":"Paint(Color(0xffffffff))",'
'{$paintString,'
'"Brightness.toString":"Brightness.dark",'
'"Foo.toString":"I am a Foo",'
'"Keep.toString":"I am a Keep"}',
Expand Down
12 changes: 5 additions & 7 deletions shell/common/shell_unittests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -270,21 +270,19 @@ TEST_F(ShellTest, BlacklistedDartVMFlag) {
fml::CommandLine::Option("dart-flags", "--verify_after_gc")};
fml::CommandLine command_line("", options, std::vector<std::string>());

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

TEST_F(ShellTest, WhitelistedDartVMFlag) {
const std::vector<fml::CommandLine::Option> options = {
fml::CommandLine::Option("dart-flags",
"--max_profile_depth 1,--random_seed 42")};
#if !FLUTTER_RELEASE
fml::CommandLine::Option("dart-flags",
"--max_profile_depth 1,--random_seed 42")
#endif
};
fml::CommandLine command_line("", options, std::vector<std::string>());
flutter::Settings settings = flutter::SettingsFromCommandLine(command_line);

Expand Down
2 changes: 1 addition & 1 deletion testing/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ def main():
if 'benchmarks' in types and not IsWindows():
RunEngineBenchmarks(build_dir, engine_filter)

if 'engine' in types or 'font-subset' in types:
if ('engine' in types or 'font-subset' in types) and args.variant != 'host_release':
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dnfield : the font-subset doesn't seem to be available in release mode. I also wonder if it's available in the profile mode. Is it debug mode only?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think only the debug mode asset is built - it should be possible to build the release mode, but not important to test it in release mode.

RunCmd(['python', 'test.py'], cwd=font_subset_dir)


Expand Down