51433e65cc
This CL includes: * A dart script that - given a flutter checkout - finds and compiles tests to ensure we actually can. * A shell script that checks out flutter, compiles the platform (to cope with any changes to the kernel format) and runs the above script. Change-Id: I02806a375943361c3c111d9aa12a76d745391ca3 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98140 Commit-Queue: Jens Johansen <jensj@google.com> Reviewed-by: Alexander Thomas <athom@google.com> Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
50 lines
1.9 KiB
Bash
Executable File
50 lines
1.9 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
|
|
# for details. All rights reserved. Use of this source code is governed by a
|
|
# BSD-style license that can be found in the LICENSE file.
|
|
|
|
# Compile flutter tests with a locally built SDK.
|
|
|
|
set -e
|
|
|
|
checkout=$(pwd)
|
|
dart=$checkout/out/ReleaseX64/dart-sdk/bin/dart
|
|
sdk=$checkout/out/ReleaseX64/dart-sdk
|
|
tmpdir=$(mktemp -d)
|
|
cleanup() {
|
|
rm -rf "$tmpdir"
|
|
}
|
|
trap cleanup EXIT HUP INT QUIT TERM PIPE
|
|
pushd "$tmpdir"
|
|
|
|
git clone -vv https://chromium.googlesource.com/external/github.com/flutter/flutter
|
|
|
|
pushd flutter
|
|
bin/flutter config --no-analytics
|
|
pinned_dart_sdk=$(cat bin/cache/dart-sdk/revision)
|
|
patch=$checkout/tools/patches/flutter-engine/${pinned_dart_sdk}.flutter.patch
|
|
if [ -e "$patch" ]; then
|
|
git apply $patch
|
|
fi
|
|
bin/flutter update-packages
|
|
popd
|
|
|
|
# Directly in temp directory again.
|
|
mkdir engine
|
|
pushd engine
|
|
git clone -vv --depth 1 https://chromium.googlesource.com/external/github.com/flutter/engine flutter
|
|
mkdir third_party
|
|
pushd third_party
|
|
ln -s $checkout dart
|
|
popd
|
|
popd
|
|
|
|
mkdir flutter_patched_sdk
|
|
|
|
$checkout/tools/sdks/dart-sdk/bin/dart --packages=$checkout/.packages $checkout/pkg/front_end/tool/_fasta/compile_platform.dart dart:core --single-root-scheme=org-dartlang-sdk --single-root-base=$checkout/ org-dartlang-sdk:///sdk/lib/libraries.json vm_outline_strong.dill vm_platform_strong.dill vm_outline_strong.dill
|
|
$checkout/tools/sdks/dart-sdk/bin/dart --packages=$checkout/.packages $checkout/pkg/front_end/tool/_fasta/compile_platform.dart --target=flutter dart:core --single-root-scheme=org-dartlang-sdk --single-root-base=engine org-dartlang-sdk:///flutter/lib/snapshot/libraries.json vm_outline_strong.dill flutter_patched_sdk/platform_strong.dill flutter_patched_sdk/outline_strong.dill
|
|
|
|
popd
|
|
|
|
$dart --enable-asserts pkg/vm/test/frontend_server_flutter.dart --flutterDir=$tmpdir/flutter --flutterPlatformDir=$tmpdir/flutter_patched_sdk
|