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
2 changes: 1 addition & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ task:
$ENGINE_PATH/src/out/host_debug_unopt/dart-sdk/bin/pub get
cd $ENGINE_PATH/src/flutter/lib/web_ui
$ENGINE_PATH/src/out/host_debug_unopt/dart-sdk/bin/pub get
CHROME_NO_SANDBOX=true $ENGINE_PATH/src/out/host_debug_unopt/dart-sdk/bin/dart dev/test.dart
CHROME_NO_SANDBOX=true $ENGINE_PATH/src/out/host_debug_unopt/dart-sdk/bin/dart dev/felt.dart
fetch_framework_script: |
mkdir -p $FRAMEWORK_PATH
cd $FRAMEWORK_PATH
Expand Down
47 changes: 47 additions & 0 deletions lib/web_ui/dev/felt
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/bin/bash

# felt: a command-line utility for building and testing Flutter web engine.
# It stands for Flutter Engine Local Tester.

FELT_PATH=`which felt`
if [ -z "$FELT_PATH" ]
then
echo "ERROR: felt is not in your PATH"
echo "Fix: add lib/web_ui/dev to your PATH"
exit 1
fi

GCLIENT_PATH=`which gclient`
if [ -z "$GCLIENT_PATH" ]
then
echo "ERROR: gclient is not in your PATH"
echo "Fix: add the path to your installation of depot_tools to your PATH"
exit 1
fi

NINJA_PATH=`which ninja`
if [ -z "$NINJA_PATH" ]
then
echo "ERROR: ninja is not in your PATH"
echo "Fix: add the path to your installation of depot_tools to your PATH"
exit 1
fi

ENGINE_SRC_DIR="$(dirname $(dirname $(dirname $(dirname $(dirname ${FELT_PATH})))))"
FLUTTER_DIR="${ENGINE_SRC_DIR}/flutter"
WEB_UI_DIR="${FLUTTER_DIR}/lib/web_ui"
DEV_DIR="${WEB_UI_DIR}/dev"
OUT_DIR="${ENGINE_SRC_DIR}/out"
HOST_DEBUG_UNOPT_DIR="${ENGINE_SRC_DIR}/out/host_debug_unopt"
DART_SDK_DIR="${ENGINE_SRC_DIR}/out/host_debug_unopt/dart-sdk"
GN="${FLUTTER_DIR}/tools/gn"

if [ ! -d "${OUT_DIR}" ] || [ ! -d "${HOST_DEBUG_UNOPT_DIR}" ]
then
echo "Compiling the Dart SDK."
gclient sync
$GN --unoptimized --full-dart-sdk
ninja -C $HOST_DEBUG_UNOPT_DIR
fi

(cd $WEB_UI_DIR && $DART_SDK_DIR/bin/dart dev/felt.dart $@)
File renamed without changes.
7 changes: 4 additions & 3 deletions lib/web_ui/dev/test_runner.dart
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,10 @@ Future<void> _buildTests() async {
}
}

Future<int> _runTestBatch(
/// Runs a batch of tests.
///
/// Unless [expectFailure] is set to false, sets [io.exitCode] to a non-zero value if any tests fail.
Future<void> _runTestBatch(
List<String> testFiles, {
@required int concurrency,
@required bool expectFailure,
Expand Down Expand Up @@ -174,6 +177,4 @@ Future<int> _runTestBatch(
io.exitCode = 1;
}
}

return io.exitCode;
}