Support flutter test with prebuilt binaries
Now you can run tests with and without --flutter-repo with a prebuilt binary on Linux. Fixes #307
This commit is contained in:
@@ -1,43 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# Copyright 2015 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
import zipfile
|
||||
|
||||
def download(base_url, out_dir, name):
|
||||
url = '%s/%s' % (base_url, name)
|
||||
dst = os.path.join(out_dir, name)
|
||||
print 'Downloading', url
|
||||
subprocess.call([ 'curl', '-o', dst, url ])
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description='Downloads test artifacts from Google storage')
|
||||
parser.add_argument('revision_file')
|
||||
parser.add_argument('out_dir')
|
||||
args = parser.parse_args()
|
||||
|
||||
out_dir = args.out_dir
|
||||
if not os.path.exists(out_dir):
|
||||
os.makedirs(out_dir)
|
||||
|
||||
revision = None
|
||||
with open(args.revision_file, 'r') as f:
|
||||
revision = f.read()
|
||||
|
||||
base_url = 'https://storage.googleapis.com/mojo/flutter/%s/linux-x64' % revision
|
||||
download(base_url, out_dir, 'artifacts.zip')
|
||||
|
||||
artifacts_zip = zipfile.ZipFile(os.path.join(out_dir, 'artifacts.zip'))
|
||||
artifacts_zip.extractall(out_dir)
|
||||
artifacts_zip.close()
|
||||
|
||||
subprocess.call([ 'chmod', 'a+x', os.path.join(out_dir, 'sky_shell' )])
|
||||
subprocess.call([ 'chmod', 'a+x', os.path.join(out_dir, 'sky_snapshot' )])
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
||||
@@ -2,5 +2,4 @@
|
||||
set -ex
|
||||
|
||||
dart dev/update_packages.dart
|
||||
|
||||
./travis/download_tester.py packages/unit/packages/sky_engine/REVISION bin/cache/travis/out/Debug
|
||||
(cd packages/unit; ../../bin/flutter cache populate)
|
||||
|
||||
@@ -5,7 +5,7 @@ set -ex
|
||||
./bin/flutter analyze --flutter-repo --no-current-directory --no-current-package --congratulate
|
||||
|
||||
# flutter package tests
|
||||
./bin/flutter test --flutter-repo --engine-src-path bin/cache/travis
|
||||
./bin/flutter test --flutter-repo
|
||||
|
||||
(cd packages/cassowary; pub run test -j1)
|
||||
# (cd packages/flutter_sprites; ) # No tests to run.
|
||||
|
||||
Reference in New Issue
Block a user