Commit 00de3081 authored by Adam Barth's avatar Adam Barth

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.
parent a53a8fc9
...@@ -4,12 +4,13 @@ author: Flutter Authors <flutter-dev@googlegroups.com> ...@@ -4,12 +4,13 @@ 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: https://github.com/flutter/flutter/tree/master/packages/flx homepage: https://github.com/flutter/flutter/tree/master/packages/flx
dependencies: dependencies:
bignum: ^0.0.7
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
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'
dev_dependencies:
test: ^0.12.5
import 'dart:convert' hide BASE64; import 'dart:convert' hide BASE64;
import 'dart:typed_data';
import 'dart:io'; import 'dart:io';
import 'dart:typed_data';
import 'package:crypto/crypto.dart'; import 'package:crypto/crypto.dart';
import 'package:flx/signing.dart';
import 'package:flx/bundle.dart'; import 'package:flx/bundle.dart';
import 'package:path/path.dart' as path; import 'package:flx/signing.dart';
import 'package:test/test.dart'; import 'package:test/test.dart';
main() async { main() async {
...@@ -26,7 +25,7 @@ main() async { ...@@ -26,7 +25,7 @@ main() async {
// Create a temp dir and file for the bundle. // Create a temp dir and file for the bundle.
Directory tempDir = await Directory.systemTemp.createTempSync('bundle_test'); 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); AsymmetricKeyPair keyPair = keyPairFromPrivateKeyBytes(kPrivateKeyDER);
Map<String, dynamic> manifest = JSON.decode(UTF8.decode( Map<String, dynamic> manifest = JSON.decode(UTF8.decode(
......
...@@ -3,10 +3,7 @@ ...@@ -3,10 +3,7 @@
// found in the LICENSE file. // found in the LICENSE file.
import 'dart:async'; import 'dart:async';
import 'dart:convert';
import 'dart:math';
import 'dart:io'; import 'dart:io';
import 'dart:typed_data';
import 'package:mojo/core.dart'; import 'package:mojo/core.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
......
...@@ -4,8 +4,9 @@ set -ex ...@@ -4,8 +4,9 @@ set -ex
pub global activate tuneup pub global activate tuneup
(cd packages/cassowary; pub get) (cd packages/cassowary; pub get)
(cd packages/newton; pub get)
(cd packages/flutter_tools; pub get) (cd packages/flutter_tools; pub get)
(cd packages/flx; pub get)
(cd packages/newton; pub get)
(cd packages/unit; pub get) (cd packages/unit; pub get)
./travis/download_tester.py packages/unit/packages/sky_engine/REVISION bin/cache/travis/out/Debug ./travis/download_tester.py packages/unit/packages/sky_engine/REVISION bin/cache/travis/out/Debug
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
set -ex 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/flutter_tools; 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 ./dev/run_tests --engine-dir bin/cache/travis
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment