From 2d366c3ae9e1f51b45094730cc44607ac63a2884 Mon Sep 17 00:00:00 2001 From: Sigmund Cherem Date: Thu, 19 Jul 2018 20:57:18 +0000 Subject: [PATCH] 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 Commit-Queue: Sigmund Cherem --- DEPS | 5 ----- tests/compiler/dart2js/dart2js.status | 2 -- .../dart2js/end_to_end/dart2js_batch_test.dart | 10 +++++----- .../dart2js/end_to_end/dump_info_test.dart | 15 +++++++-------- 4 files changed, 12 insertions(+), 20 deletions(-) diff --git a/DEPS b/DEPS index b63cf35a536..c08a2c15e63 100644 --- a/DEPS +++ b/DEPS @@ -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": diff --git a/tests/compiler/dart2js/dart2js.status b/tests/compiler/dart2js/dart2js.status index c003d3f0c97..251962353fa 100644 --- a/tests/compiler/dart2js/dart2js.status +++ b/tests/compiler/dart2js/dart2js.status @@ -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. diff --git a/tests/compiler/dart2js/end_to_end/dart2js_batch_test.dart b/tests/compiler/dart2js/end_to_end/dart2js_batch_test.dart index 1f59093deb1..9447b3a9abc 100644 --- a/tests/compiler/dart2js/end_to_end/dart2js_batch_test.dart +++ b/tests/compiler/dart2js/end_to_end/dart2js_batch_test.dart @@ -39,11 +39,11 @@ Future 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 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'); diff --git a/tests/compiler/dart2js/end_to_end/dump_info_test.dart b/tests/compiler/dart2js/end_to_end/dump_info_test.dart index c318e5fd4d2..ba7fd8a8531 100644 --- a/tests/compiler/dart2js/end_to_end/dump_info_test.dart +++ b/tests/compiler/dart2js/end_to_end/dump_info_test.dart @@ -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);