The FLX package should test itself Rather than using the Flutter unit tests to test FLX, we can just test FLX directly. Also, clean up the dependencies in the pubspec to match the code.
diff --git a/packages/flx/pubspec.yaml b/packages/flx/pubspec.yaml index 3b8517a..0e5c7e9 100644 --- a/packages/flx/pubspec.yaml +++ b/packages/flx/pubspec.yaml
@@ -4,12 +4,13 @@ description: Library for dealing with Flutter bundle (.flx) files homepage: https://github.com/flutter/flutter/tree/master/packages/flx dependencies: + bignum: ^0.0.7 asn1lib: ^0.4.1 cipher: ^0.7.1 crypto: ^0.9.1 - path: ^1.3.0 - sky_services: 0.0.50 - yaml: ^2.1.3 environment: sdk: '>=1.12.0 <2.0.0' + +dev_dependencies: + test: ^0.12.5
diff --git a/packages/unit/test/flx/bundle_test.dart b/packages/flx/test/bundle_test.dart similarity index 95% rename from packages/unit/test/flx/bundle_test.dart rename to packages/flx/test/bundle_test.dart index 5521ddc..a54ccfe 100644 --- a/packages/unit/test/flx/bundle_test.dart +++ b/packages/flx/test/bundle_test.dart
@@ -1,11 +1,10 @@ import 'dart:convert' hide BASE64; -import 'dart:typed_data'; import 'dart:io'; +import 'dart:typed_data'; import 'package:crypto/crypto.dart'; -import 'package:flx/signing.dart'; import 'package:flx/bundle.dart'; -import 'package:path/path.dart' as path; +import 'package:flx/signing.dart'; import 'package:test/test.dart'; main() async { @@ -26,7 +25,7 @@ // Create a temp dir and file for the bundle. Directory tempDir = await Directory.systemTemp.createTempSync('bundle_test'); - String bundlePath = path.join(tempDir.path, 'bundle.flx'); + String bundlePath = tempDir.path + '/bundle.flx'; AsymmetricKeyPair keyPair = keyPairFromPrivateKeyBytes(kPrivateKeyDER); Map<String, dynamic> manifest = JSON.decode(UTF8.decode(
diff --git a/packages/unit/test/flx/signing_test.dart b/packages/flx/test/signing_test.dart similarity index 100% rename from packages/unit/test/flx/signing_test.dart rename to packages/flx/test/signing_test.dart
diff --git a/packages/updater/lib/main.dart b/packages/updater/lib/main.dart index c363bad..c40c5a4 100644 --- a/packages/updater/lib/main.dart +++ b/packages/updater/lib/main.dart
@@ -3,10 +3,7 @@ // found in the LICENSE file. import 'dart:async'; -import 'dart:convert'; -import 'dart:math'; import 'dart:io'; -import 'dart:typed_data'; import 'package:mojo/core.dart'; import 'package:flutter/services.dart';
diff --git a/travis/setup.sh b/travis/setup.sh index 59e2192..0d6ac2f 100755 --- a/travis/setup.sh +++ b/travis/setup.sh
@@ -4,8 +4,9 @@ pub global activate tuneup (cd packages/cassowary; pub get) -(cd packages/newton; pub get) (cd packages/flutter_tools; pub get) +(cd packages/flx; pub get) +(cd packages/newton; pub get) (cd packages/unit; pub get) ./travis/download_tester.py packages/unit/packages/sky_engine/REVISION bin/cache/travis/out/Debug
diff --git a/travis/test.sh b/travis/test.sh index 9684171..de9a355 100755 --- a/travis/test.sh +++ b/travis/test.sh
@@ -2,6 +2,8 @@ set -ex (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/flutter_tools; pub global run tuneup check; pub run test -j1) +(cd packages/flx; pub global run tuneup check; pub run test -j1) +(cd packages/newton; pub global run tuneup check; pub run test -j1) + ./dev/run_tests --engine-dir bin/cache/travis