Switch to use swarm instead of sunflower for dart2js unittests.

These where the last two uses of sunflower in the repo. Sunflower sources have
been deleted from the public github repo. We can alternatively copy them here,
but for these tests it doesn't really matter what code we use.

A benefit of using swarm: this will test compiling swarm, so we detect breakages
early (and not when they hit the perf bots). A drawback of using swarm: it is
bigger and these tests will take longer.  For dump-info that might be a good
thing, though.

TBR

Change-Id: Ie976cf4250f5f7ce17147ba8b166e7a6bd429425
Reviewed-on: https://dart-review.googlesource.com/65784
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
This commit is contained in:
Sigmund Cherem 2018-07-19 20:57:18 +00:00 committed by commit-bot@chromium.org
parent 25d5d15935
commit 2d366c3ae9
4 changed files with 12 additions and 20 deletions

5
DEPS
View file

@ -127,7 +127,6 @@ vars = {
"stack_trace_tag": "1.9.2",
"stream_channel_tag": "1.6.4",
"string_scanner_tag": "1.0.2",
"sunflower_rev": "879b704933413414679396b129f5dfa96f7a0b1e",
"test_descriptor_tag": "1.1.1",
"test_process_tag": "1.0.3",
"term_glyph_tag": "1.0.0",
@ -328,10 +327,6 @@ deps = {
Var("dart_root") + "/third_party/pkg/string_scanner":
Var("dart_git") + "string_scanner.git" +
"@" + Var("string_scanner_tag"),
Var("dart_root") + "/third_party/sunflower":
Var("chromium_git") +
"/external/github.com/dart-lang/sample-sunflower.git" +
"@" + Var("sunflower_rev"),
Var("dart_root") + "/third_party/pkg/term_glyph":
Var("dart_git") + "term_glyph.git" + "@" + Var("term_glyph_tag"),
Var("dart_root") + "/third_party/pkg/test":

View file

@ -15,8 +15,6 @@ codegen/side_effect_tdiv_regression_test: Fail # Issue 33050
codegen/simple_function_subtype_test: Fail # simple_function_subtype_test is temporarily(?) disabled due to new method for building function type tests.
codegen/string_escapes_test: Fail # Issue 33060
deferred_loading/deferred_loading_test: Slow, Pass
end_to_end/dart2js_batch_test: RuntimeError # Dart 1 constants in Sunflower demo.
end_to_end/dump_info_test: RuntimeError # Dart 1 constants in Sunflower demo.
equivalence/id_equivalence1_test: Pass, Slow
equivalence/id_equivalence2_test: Pass, Slow
generate_code_with_compile_time_errors_test: RuntimeError # not supported yet with the new FE.

View file

@ -39,11 +39,11 @@ Future<Directory> createTempDir() {
Future setup() {
return createTempDir().then((Directory directory) {
tmpDir = directory;
Directory sunflowerDir =
new Directory.fromUri(Uri.base.resolve('third_party/sunflower'));
Directory appDir =
new Directory.fromUri(Uri.base.resolve('samples-dev/swarm'));
print("Copying '${sunflowerDir.path}' to '${tmpDir.path}'.");
copyDirectory(sunflowerDir, tmpDir);
print("Copying '${appDir.path}' to '${tmpDir.path}'.");
copyDirectory(appDir, tmpDir);
});
}
@ -61,7 +61,7 @@ Future<Process> launchDart2Js(_) {
}
Future runTests(Process process) {
String inFile = path.join(tmpDir.path, 'web/sunflower.dart');
String inFile = path.join(tmpDir.path, 'swarm.dart');
String outFile = path.join(tmpDir.path, 'out.js');
String outFile2 = path.join(tmpDir.path, 'out2.js');

View file

@ -32,14 +32,13 @@ void main() {
out1.createSync();
Directory out2 = new Directory.fromUri(tmpDir.uri.resolve('with'));
out2.createSync();
Directory sunflowerDir =
new Directory.fromUri(Uri.base.resolve('third_party/sunflower'));
Directory appDir =
new Directory.fromUri(Uri.base.resolve('samples-dev/swarm'));
print("Copying '${sunflowerDir.path}' to '${tmpDir.path}'.");
copyDirectory(sunflowerDir, tmpDir);
print("Copying '${appDir.path}' to '${tmpDir.path}'.");
copyDirectory(appDir, tmpDir);
try {
var command =
dart2JsCommand(['--out=without/out.js', 'web/sunflower.dart']);
var command = dart2JsCommand(['--out=without/out.js', 'swarm.dart']);
print('Run $command');
var result = Process.runSync(Platform.resolvedExecutable, command,
workingDirectory: tmpDir.path);
@ -52,8 +51,8 @@ void main() {
String output1 = new File.fromUri(tmpDir.uri.resolve('without/out.js'))
.readAsStringSync();
command = dart2JsCommand(
['--out=with/out.js', 'web/sunflower.dart', '--dump-info']);
command =
dart2JsCommand(['--out=with/out.js', 'swarm.dart', '--dump-info']);
print('Run $command');
result = Process.runSync(Platform.resolvedExecutable, command,
workingDirectory: tmpDir.path);