mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
re-enable dart2js test (#29010)
This commit is contained in:
parent
8f1a430557
commit
6a7f231d89
@ -191,22 +191,21 @@ Future<void> _runBuildTests() async {
|
|||||||
await _flutterBuildApk(path);
|
await _flutterBuildApk(path);
|
||||||
await _flutterBuildIpa(path);
|
await _flutterBuildIpa(path);
|
||||||
}
|
}
|
||||||
// TODO(jonahwilliams): re-enable when engine rolls.
|
await _flutterBuildDart2js(path.join('dev', 'integration_tests', 'web'));
|
||||||
//await _flutterBuildDart2js(path.join('dev', 'integration_tests', 'web'));
|
|
||||||
|
|
||||||
print('${bold}DONE: All build tests successful.$reset');
|
print('${bold}DONE: All build tests successful.$reset');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Future<void> _flutterBuildDart2js(String relativePathToApplication) async {
|
Future<void> _flutterBuildDart2js(String relativePathToApplication) async {
|
||||||
// print('Running Dart2JS build tests...');
|
print('Running Dart2JS build tests...');
|
||||||
// await runCommand(flutter,
|
await runCommand(flutter,
|
||||||
// <String>['build', 'web', '-v'],
|
<String>['build', 'web', '-v'],
|
||||||
// workingDirectory: path.join(flutterRoot, relativePathToApplication),
|
workingDirectory: path.join(flutterRoot, relativePathToApplication),
|
||||||
// expectNonZeroExit: false,
|
expectNonZeroExit: false,
|
||||||
// timeout: _kShortTimeout,
|
timeout: _kShortTimeout,
|
||||||
// );
|
);
|
||||||
// print('Done.');
|
print('Done.');
|
||||||
// }
|
}
|
||||||
|
|
||||||
Future<void> _flutterBuildAot(String relativePathToApplication) async {
|
Future<void> _flutterBuildAot(String relativePathToApplication) async {
|
||||||
print('Running AOT build tests...');
|
print('Running AOT build tests...');
|
||||||
|
@ -73,9 +73,9 @@ String _artifactToFileName(Artifact artifact, [ TargetPlatform platform, BuildMo
|
|||||||
case Artifact.engineDartBinary:
|
case Artifact.engineDartBinary:
|
||||||
return 'dart';
|
return 'dart';
|
||||||
case Artifact.dart2jsSnapshot:
|
case Artifact.dart2jsSnapshot:
|
||||||
return 'flutter_dart2js.dart.snapshot';
|
return 'dart2js.dart.snapshot';
|
||||||
case Artifact.kernelWorkerSnapshot:
|
case Artifact.kernelWorkerSnapshot:
|
||||||
return 'flutter_kernel_worker.dart.snapshot';
|
return 'kernel_worker.dart.snapshot';
|
||||||
}
|
}
|
||||||
assert(false, 'Invalid artifact $artifact.');
|
assert(false, 'Invalid artifact $artifact.');
|
||||||
return null;
|
return null;
|
||||||
|
@ -4,10 +4,11 @@
|
|||||||
|
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
|
import '../base/common.dart';
|
||||||
import '../base/logger.dart';
|
import '../base/logger.dart';
|
||||||
import '../build_info.dart';
|
import '../build_info.dart';
|
||||||
import '../globals.dart';
|
import '../globals.dart';
|
||||||
import '../runner/flutter_command.dart' show ExitStatus, FlutterCommandResult;
|
import '../runner/flutter_command.dart' show FlutterCommandResult;
|
||||||
import '../web/compile.dart';
|
import '../web/compile.dart';
|
||||||
import 'build.dart';
|
import 'build.dart';
|
||||||
|
|
||||||
@ -33,6 +34,9 @@ class BuildWebCommand extends BuildSubCommand {
|
|||||||
final Status status = logger.startProgress('Compiling $target to JavaScript...', timeout: null);
|
final Status status = logger.startProgress('Compiling $target to JavaScript...', timeout: null);
|
||||||
final int result = await webCompiler.compile(target: target);
|
final int result = await webCompiler.compile(target: target);
|
||||||
status.stop();
|
status.stop();
|
||||||
return FlutterCommandResult(result == 0 ? ExitStatus.success : ExitStatus.fail);
|
if (result != 0) {
|
||||||
|
throwToolExit('JavaScript compilation failed.');
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user