Merge pull request #37 from abarth/pubspec
Update pubspecs and enable testing
This commit is contained in:
commit
a53a8fc9e2
@ -2,6 +2,13 @@ language: dart
|
|||||||
sudo: false
|
sudo: false
|
||||||
dart:
|
dart:
|
||||||
- stable
|
- stable
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
sources:
|
||||||
|
- ubuntu-toolchain-r-test
|
||||||
|
packages:
|
||||||
|
- gcc-4.8
|
||||||
|
- g++-4.8
|
||||||
before_script:
|
before_script:
|
||||||
- ./travis/setup.sh
|
- ./travis/setup.sh
|
||||||
script:
|
script:
|
||||||
|
43
dev/run_tests
Executable file
43
dev/run_tests
Executable file
@ -0,0 +1,43 @@
|
|||||||
|
#!/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 os
|
||||||
|
import sys
|
||||||
|
import subprocess
|
||||||
|
import argparse
|
||||||
|
|
||||||
|
FLUTTER_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||||
|
FLUTTER = os.path.join(FLUTTER_ROOT, 'bin', 'flutter')
|
||||||
|
|
||||||
|
UNIT_DIR = os.path.join(FLUTTER_ROOT, 'packages', 'unit')
|
||||||
|
TESTS_DIR = os.path.join(UNIT_DIR, 'test')
|
||||||
|
DEFAULT_ENGINE_DIR = os.path.abspath(os.path.join(FLUTTER_ROOT, '..', 'engine', 'src'))
|
||||||
|
|
||||||
|
def main():
|
||||||
|
parser = argparse.ArgumentParser(description='Runs Flutter unit tests')
|
||||||
|
parser.add_argument('--engine-dir', default=DEFAULT_ENGINE_DIR)
|
||||||
|
parser.add_argument('--config', default='Debug')
|
||||||
|
parser.add_argument('--debug', dest='config', action='store_const', const='Debug')
|
||||||
|
parser.add_argument('--release', dest='config', action='store_const', const='Release')
|
||||||
|
args, remaining = parser.parse_known_args()
|
||||||
|
|
||||||
|
build_dir = os.path.join(os.path.abspath(args.engine_dir), 'out', args.config)
|
||||||
|
|
||||||
|
if not remaining:
|
||||||
|
for root, dirs, files in os.walk(TESTS_DIR):
|
||||||
|
remaining.extend(os.path.join(root, f)
|
||||||
|
for f in files if f.endswith("_test.dart"))
|
||||||
|
|
||||||
|
if os.environ['TERM'] == 'dumb':
|
||||||
|
remaining = [ '--no-color' ] + remaining
|
||||||
|
|
||||||
|
return subprocess.call([
|
||||||
|
FLUTTER,
|
||||||
|
'test',
|
||||||
|
'--build-dir=%s' % build_dir
|
||||||
|
] + remaining, cwd=UNIT_DIR)
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
sys.exit(main())
|
20
dev/update_packages.py
Executable file
20
dev/update_packages.py
Executable file
@ -0,0 +1,20 @@
|
|||||||
|
#!/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 os
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
FLUTTER_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||||
|
|
||||||
|
def update(directory):
|
||||||
|
packages = sorted(os.listdir(directory))
|
||||||
|
for package in packages:
|
||||||
|
package_dir = os.path.join(directory, package)
|
||||||
|
if os.path.isdir(package_dir):
|
||||||
|
print 'Updating', package, '...'
|
||||||
|
subprocess.check_call(['pub', 'get'], cwd=package_dir)
|
||||||
|
|
||||||
|
update(os.path.join(FLUTTER_ROOT, 'packages'))
|
||||||
|
update(os.path.join(FLUTTER_ROOT, 'examples'))
|
8
examples/.gitignore
vendored
Normal file
8
examples/.gitignore
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
.DS_Store
|
||||||
|
.buildlog
|
||||||
|
.idea
|
||||||
|
.packages
|
||||||
|
.pub/
|
||||||
|
build/
|
||||||
|
packages
|
||||||
|
pubspec.lock
|
@ -1,10 +1,4 @@
|
|||||||
name: address_book
|
name: address_book
|
||||||
dependencies:
|
dependencies:
|
||||||
flutter:
|
|
||||||
'0.0.16'
|
|
||||||
sky_tools: any
|
|
||||||
dependency_overrides:
|
|
||||||
material_design_icons:
|
|
||||||
path: ../../sky/packages/material_design_icons
|
|
||||||
flutter:
|
flutter:
|
||||||
path: ../../sky/packages/sky
|
path: ../../packages/flutter
|
||||||
|
@ -1,12 +1,8 @@
|
|||||||
name: fitness
|
name: fitness
|
||||||
dependencies:
|
dependencies:
|
||||||
flutter:
|
# TODO(abarth): Move playfair into flutter.git
|
||||||
'0.0.16'
|
# playfair: ^0.0.10
|
||||||
playfair: ^0.0.10
|
|
||||||
path: ^1.3.6
|
path: ^1.3.6
|
||||||
sky_tools: any
|
|
||||||
dependency_overrides:
|
|
||||||
material_design_icons:
|
|
||||||
path: ../../sky/packages/material_design_icons
|
|
||||||
flutter:
|
flutter:
|
||||||
path: ../../sky/packages/sky
|
path: ../../packages/flutter
|
||||||
|
@ -1,15 +1,6 @@
|
|||||||
name: asteroids
|
name: asteroids
|
||||||
dependencies:
|
dependencies:
|
||||||
flutter:
|
|
||||||
'0.0.16'
|
|
||||||
sky_tools: any
|
|
||||||
flutter_sprites:
|
|
||||||
'0.0.13'
|
|
||||||
box2d: any
|
|
||||||
dependency_overrides:
|
|
||||||
material_design_icons:
|
|
||||||
path: ../../sky/packages/material_design_icons
|
|
||||||
flutter:
|
flutter:
|
||||||
path: ../../sky/packages/sky
|
path: ../../packages/flutter
|
||||||
flutter_sprites:
|
flutter_sprites:
|
||||||
path: ../../skysprites
|
path: ../../packages/flutter_sprites
|
||||||
|
@ -1,10 +1,4 @@
|
|||||||
name: hello_world
|
name: hello_world
|
||||||
dependencies:
|
dependencies:
|
||||||
flutter:
|
|
||||||
'0.0.16'
|
|
||||||
sky_tools: any
|
|
||||||
dependency_overrides:
|
|
||||||
material_design_icons:
|
|
||||||
path: ../../sky/packages/material_design_icons
|
|
||||||
flutter:
|
flutter:
|
||||||
path: ../../sky/packages/sky
|
path: ../../packages/flutter
|
||||||
|
@ -1,10 +1,4 @@
|
|||||||
name: mine_digger
|
name: mine_digger
|
||||||
dependencies:
|
dependencies:
|
||||||
flutter:
|
|
||||||
'0.0.16'
|
|
||||||
sky_tools: any
|
|
||||||
dependency_overrides:
|
|
||||||
material_design_icons:
|
|
||||||
path: ../../sky/packages/material_design_icons
|
|
||||||
flutter:
|
flutter:
|
||||||
path: ../../sky/packages/sky
|
path: ../../packages/flutter
|
||||||
|
@ -1,10 +1,4 @@
|
|||||||
name: sky_raw_examples
|
name: sky_raw_examples
|
||||||
dependencies:
|
dependencies:
|
||||||
flutter:
|
|
||||||
'0.0.16'
|
|
||||||
sky_tools: any
|
|
||||||
dependency_overrides:
|
|
||||||
material_design_icons:
|
|
||||||
path: ../../sky/packages/material_design_icons
|
|
||||||
flutter:
|
flutter:
|
||||||
path: ../../sky/packages/sky
|
path: ../../packages/flutter
|
||||||
|
@ -1,10 +1,4 @@
|
|||||||
name: flutter_rendering_examples
|
name: flutter_rendering_examples
|
||||||
dependencies:
|
dependencies:
|
||||||
flutter:
|
|
||||||
'0.0.16'
|
|
||||||
sky_tools: any
|
|
||||||
dependency_overrides:
|
|
||||||
material_design_icons:
|
|
||||||
path: ../../sky/packages/material_design_icons
|
|
||||||
flutter:
|
flutter:
|
||||||
path: ../../sky/packages/sky
|
path: ../../packages/flutter
|
||||||
|
@ -1,10 +1,4 @@
|
|||||||
name: stocks
|
name: stocks
|
||||||
dependencies:
|
dependencies:
|
||||||
flutter:
|
|
||||||
'0.0.16'
|
|
||||||
sky_tools: any
|
|
||||||
dependency_overrides:
|
|
||||||
material_design_icons:
|
|
||||||
path: ../../sky/packages/material_design_icons
|
|
||||||
flutter:
|
flutter:
|
||||||
path: ../../sky/packages/sky
|
path: ../../packages/flutter
|
||||||
|
@ -1,13 +1,6 @@
|
|||||||
name: sky_widgets_examples
|
name: sky_widgets_examples
|
||||||
dependencies:
|
dependencies:
|
||||||
flutter:
|
|
||||||
'0.0.16'
|
|
||||||
sky_tools: any
|
|
||||||
flutter_rendering_examples: any
|
|
||||||
dependency_overrides:
|
|
||||||
material_design_icons:
|
|
||||||
path: ../../sky/packages/material_design_icons
|
|
||||||
flutter:
|
flutter:
|
||||||
path: ../../sky/packages/sky
|
path: ../../packages/flutter
|
||||||
flutter_rendering_examples:
|
flutter_rendering_examples:
|
||||||
path: ../rendering
|
path: ../rendering
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
// 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 'package:sky_tools/executable.dart' as executable;
|
|
||||||
|
|
||||||
main(List<String> args) => executable.main(args);
|
|
@ -4,18 +4,16 @@ author: Flutter Authors <flutter-dev@googlegroups.com>
|
|||||||
description: A framework for writing Flutter applications
|
description: A framework for writing Flutter applications
|
||||||
homepage: http://flutter.io
|
homepage: http://flutter.io
|
||||||
dependencies:
|
dependencies:
|
||||||
cassowary: '>=0.1.7 <0.2.0'
|
|
||||||
intl: '>=0.12.4+2 <0.13.0'
|
intl: '>=0.12.4+2 <0.13.0'
|
||||||
material_design_icons: '>=0.0.3 <0.1.0'
|
material_design_icons: '>=0.0.3 <0.1.0'
|
||||||
newton: '>=0.1.4 <0.2.0'
|
sky_engine: 0.0.49
|
||||||
sky_engine:
|
sky_services: 0.0.50
|
||||||
'0.0.49'
|
|
||||||
sky_services:
|
|
||||||
'0.0.50'
|
|
||||||
sky_tools: '>=0.0.37 <0.1.0'
|
|
||||||
vector_math: '>=1.4.3 <2.0.0'
|
vector_math: '>=1.4.3 <2.0.0'
|
||||||
|
|
||||||
|
cassowary:
|
||||||
|
path: ../cassowary
|
||||||
|
newton:
|
||||||
|
path: ../newton
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=1.12.0 <2.0.0'
|
sdk: '>=1.12.0 <2.0.0'
|
||||||
|
|
||||||
executables:
|
|
||||||
flutter:
|
|
||||||
|
@ -4,6 +4,6 @@ version: 0.0.15
|
|||||||
author: Flutter Authors <flutter-dev@googlegroups.com>
|
author: Flutter Authors <flutter-dev@googlegroups.com>
|
||||||
homepage: http://flutter.io
|
homepage: http://flutter.io
|
||||||
dependencies:
|
dependencies:
|
||||||
flutter:
|
box2d: '>=0.2.0 <0.3.0'
|
||||||
'0.0.18'
|
flutter:
|
||||||
box2d: ">=0.2.0 <0.3.0"
|
path: ../flutter
|
||||||
|
@ -19,7 +19,7 @@ class TestCommand extends FlutterCommand {
|
|||||||
final String description = 'Runs Flutter unit tests for the current project (requires a local build of the engine).';
|
final String description = 'Runs Flutter unit tests for the current project (requires a local build of the engine).';
|
||||||
|
|
||||||
TestCommand() {
|
TestCommand() {
|
||||||
argParser.addOption('build-dir', defaultsTo: '../../../engine/src/out/Debug');
|
argParser.addOption('build-dir', help: 'The directory in which to find a prebuilt engine');
|
||||||
}
|
}
|
||||||
|
|
||||||
String get _shellPath {
|
String get _shellPath {
|
||||||
|
@ -8,10 +8,9 @@ environment:
|
|||||||
sdk: '>=1.12.0 <2.0.0'
|
sdk: '>=1.12.0 <2.0.0'
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
analyzer: ">=0.26.1+17" # see note below
|
analyzer: '>=0.26.1+17' # see note below
|
||||||
archive: ^1.0.20
|
archive: ^1.0.20
|
||||||
args: ^0.13.0
|
args: ^0.13.0
|
||||||
flx: ">=0.0.7 <0.1.0"
|
|
||||||
crypto: ^0.9.1
|
crypto: ^0.9.1
|
||||||
mustache4dart: ^1.0.0
|
mustache4dart: ^1.0.0
|
||||||
path: ^1.3.0
|
path: ^1.3.0
|
||||||
@ -19,6 +18,9 @@ dependencies:
|
|||||||
test: ^0.12.5
|
test: ^0.12.5
|
||||||
yaml: ^2.1.3
|
yaml: ^2.1.3
|
||||||
|
|
||||||
|
flx:
|
||||||
|
path: ../flx
|
||||||
|
|
||||||
# A note about 'analyzer':
|
# A note about 'analyzer':
|
||||||
# We don't actually depend on 'analyzer', but 'test' does. We aren't
|
# We don't actually depend on 'analyzer', but 'test' does. We aren't
|
||||||
# compatible with some older versions of 'analyzer'. We lie here,
|
# compatible with some older versions of 'analyzer'. We lie here,
|
||||||
|
@ -2,14 +2,14 @@ name: flx
|
|||||||
version: 0.0.10
|
version: 0.0.10
|
||||||
author: Flutter Authors <flutter-dev@googlegroups.com>
|
author: Flutter Authors <flutter-dev@googlegroups.com>
|
||||||
description: Library for dealing with Flutter bundle (.flx) files
|
description: Library for dealing with Flutter bundle (.flx) files
|
||||||
homepage: http://flutter.io
|
homepage: https://github.com/flutter/flutter/tree/master/packages/flx
|
||||||
dependencies:
|
dependencies:
|
||||||
sky_services:
|
|
||||||
'0.0.50'
|
|
||||||
yaml: ^2.1.3
|
|
||||||
asn1lib: ^0.4.1
|
asn1lib: ^0.4.1
|
||||||
cipher: ^0.7.1
|
cipher: ^0.7.1
|
||||||
crypto: ^0.9.1
|
crypto: ^0.9.1
|
||||||
path: ^1.3.0
|
path: ^1.3.0
|
||||||
|
sky_services: 0.0.50
|
||||||
|
yaml: ^2.1.3
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=1.12.0 <2.0.0'
|
sdk: '>=1.12.0 <2.0.0'
|
||||||
|
@ -1,15 +1,10 @@
|
|||||||
name: sky_unit_tests
|
name: flutter_unit_tests
|
||||||
dependencies:
|
dependencies:
|
||||||
flutter:
|
test: ^0.12.5
|
||||||
'0.0.16'
|
quiver: ^0.21.4
|
||||||
sky_tools: any
|
|
||||||
test: any
|
|
||||||
quiver: any
|
|
||||||
flx: ^0.0.2
|
|
||||||
dependency_overrides:
|
|
||||||
material_design_icons:
|
|
||||||
path: ../packages/material_design_icons
|
|
||||||
flutter:
|
|
||||||
path: ../packages/sky
|
|
||||||
flx:
|
flx:
|
||||||
path: ../packages/flx
|
path: ../flx
|
||||||
|
flutter:
|
||||||
|
path: ../flutter
|
||||||
|
sky_tools:
|
||||||
|
path: ../flutter_tools
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
name: updater
|
name: updater
|
||||||
author: Flutter Authors <flutter-dev@googlegroups.com>
|
author: Flutter Authors <flutter-dev@googlegroups.com>
|
||||||
description: The autoupdater for flutter
|
description: An autoupdater for Flutter
|
||||||
homepage: http://flutter.io
|
homepage: http://flutter.io
|
||||||
dependencies:
|
dependencies:
|
||||||
flutter: '0.0.18'
|
|
||||||
yaml: ^2.1.3
|
|
||||||
path: ^1.3.0
|
path: ^1.3.0
|
||||||
flx: 0.0.1
|
yaml: ^2.1.3
|
||||||
dependency_overrides:
|
|
||||||
|
# TODO(abarth): Updater should not depend on flutter
|
||||||
flutter:
|
flutter:
|
||||||
path: ../sky
|
path: ../flutter
|
||||||
flx:
|
flx:
|
||||||
path: ../flx
|
path: ../flx
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=1.12.0 <2.0.0'
|
sdk: '>=1.12.0 <2.0.0'
|
||||||
|
40
travis/download_tester.py
Executable file
40
travis/download_tester.py
Executable file
@ -0,0 +1,40 @@
|
|||||||
|
#!/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
|
||||||
|
|
||||||
|
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/sky/shell/linux-x64/%s' % revision
|
||||||
|
download(base_url, out_dir, 'sky_shell')
|
||||||
|
download(base_url, out_dir, 'icudtl.dat')
|
||||||
|
download(base_url, out_dir, 'sky_snapshot')
|
||||||
|
|
||||||
|
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())
|
@ -1,8 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
|
pub global activate tuneup
|
||||||
|
|
||||||
(cd packages/cassowary; pub get)
|
(cd packages/cassowary; pub get)
|
||||||
(cd packages/newton; pub get)
|
(cd packages/newton; pub get)
|
||||||
(cd packages/flutter_tools; pub get)
|
(cd packages/flutter_tools; pub get)
|
||||||
|
(cd packages/unit; pub get)
|
||||||
|
|
||||||
pub global activate tuneup
|
./travis/download_tester.py packages/unit/packages/sky_engine/REVISION bin/cache/travis/out/Debug
|
||||||
|
@ -4,3 +4,4 @@ set -ex
|
|||||||
(cd packages/cassowary; pub global run tuneup check; pub run test -j1)
|
(cd packages/cassowary; pub global run tuneup check; pub run test -j1)
|
||||||
(cd packages/newton; pub global run tuneup check; pub run test -j1)
|
(cd packages/newton; pub global run tuneup check; pub run test -j1)
|
||||||
(cd packages/flutter_tools; pub global run tuneup check; pub run test -j1)
|
(cd packages/flutter_tools; pub global run tuneup check; pub run test -j1)
|
||||||
|
./dev/run_tests --engine-dir bin/cache/travis
|
||||||
|
Loading…
x
Reference in New Issue
Block a user