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

Remove obsolete instructions from scenario_app readme, pass depfile correctly. #28732

Merged
merged 7 commits into from
Sep 23, 2021
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
30 changes: 21 additions & 9 deletions build/dart/rules.gni
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,22 @@ import("//build/module_args/dart.gni")
import("//flutter/common/config.gni")
import("//third_party/dart/build/dart/dart_action.gni")

frontend_server_files =
exec_script("//third_party/dart/tools/list_dart_files.py",
[
"absolute",
rebase_path("."),
],
"list lines")

frontend_server_files +=
exec_script("//third_party/dart/tools/list_dart_files.py",
[
"absolute",
rebase_path("../../third_party/dart/pkg"),
],
"list lines")

# Creates a dart kernel (dill) file suitable for use with gen_snapshot, as well
# as the app-jit, aot-elf, or aot-assembly snapshot for targeting Flutter on
# Android or iOS.
Expand Down Expand Up @@ -38,22 +54,18 @@ template("flutter_snapshot") {
deps = [ "//flutter/lib/snapshot:strong_platform" ]

inputs = [
main_dart,
package_config,
]
main_dart,
package_config,
] + frontend_server_files

outputs = [ kernel_output ]

depfile = "$kernel_output.d"
abs_depfile = rebase_path(depfile)
rebased_output = rebase_path(kernel_output, root_build_dir)
vm_args = [
"--depfile=$abs_depfile",
"--depfile_output_filename=$rebased_output",
"--disable-dart-dev",
]
vm_args = [ "--disable-dart-dev" ]

args = [
"--depfile=$abs_depfile",
"--packages=" + rebase_path(package_config),
"--target=flutter",
"--sdk-root=" + flutter_patched_sdk,
Expand Down
16 changes: 0 additions & 16 deletions flutter_frontend_server/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,6 @@

import("//flutter/build/dart/rules.gni")

frontend_server_files =
exec_script("//third_party/dart/tools/list_dart_files.py",
[
"absolute",
rebase_path("."),
],
"list lines")

frontend_server_files +=
exec_script("//third_party/dart/tools/list_dart_files.py",
[
"absolute",
rebase_path("../../third_party/dart/pkg"),
],
"list lines")

application_snapshot("frontend_server") {
main_dart = "bin/starter.dart"
deps = [ "//flutter/lib/snapshot:kernel_platform_files" ]
Expand Down
53 changes: 14 additions & 39 deletions testing/scenario_app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,17 @@ platform channel.

## Running for iOS

Build the `ios_debug_sim_unopt` engine variant, and run

```sh
./build_and_run_ios_tests.sh
./run_ios_tests.sh
```

in your shell.
Copy link
Contributor

Choose a reason for hiding this comment

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

While you are here, do you mind adding a little instruction for running locally through xcode?
Something like:

To run or debug in XCode, open the proj file located in  <path_to_engine>/src/out/ios_debug_sim_unopt/scenario_app/Scenarios/Scenarios.xcodeproj, and run all tests with cmd+u or use XCode UI to run selected tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will do

Copy link
Contributor

Choose a reason for hiding this comment

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

thanks!


To run or debug in Xcode, open the xcodeproj file located in
`<engine_out_dir>/scenario_app/Scenarios/Scenaios.xoceproj`.

### iOS Platform View Tests

For PlatformView tests on iOS, you'll also have to edit the dictionaries in
Expand All @@ -49,40 +56,13 @@ compared against golden reside.

## Running for Android

The test is run on a x86 emulator. To run the test locally, you must create an emulator running API level 28, using an x86_64 ABI, and set the following screen settings in the avd's `config.ini` file:

```
hw.lcd.density = 480
hw.lcd.height = 1680
hw.lcd.width = 1080
lcd.depth = 16
```

This file is typically located in your `$HOME/.android/avd/<avd>` folder.

Once the emulator is up, you can run the test by running:

```bash
./build_and_run_android_tests.sh
```

### Generating Golden Images on Android
The only test that is currently run is the Firebase TestLab test, which is a
smoke test to make sure an application can be built and run on a real Android
device.

In the `android` directory, run:

```bash
../../../../gradle/bin/gradle app:recordDebugAndroidTestScreenshotTest
```

The screenshots are recorded into `android/reports/screenshots`.

### Verifying Golden Images on Android

In the `android` directory, run:

```bash
../../../../gradle/bin/gradle app:verifyDebugAndroidTestScreenshotTest
```
To run it, build the `android_profile_arm64` variant of the engine, and run
`./flutter/ci/firebase_testlab.py`. If you wish to test a different variant, e.g.
debug arm64, pass `--variant android_debug_arm64`.

### Updating Gradle dependencies

Expand All @@ -94,8 +74,3 @@ To generate new lockfiles, run:
cd android
../../../../gradle/bin/gradle generateLockfiles
```

## Changing dart:ui code

If you change the dart:ui interface, remember to point the sky_engine
clauses to your local engine's output path before compiling.