Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Unified Diff: tests/standalone/precompilation_test.dart

Issue 1858493003: Remove standalone/precompilation_test. We now have bots running the whole test suite precompiled (t… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/standalone/precompilation_dart2js_test.dart ('k') | tests/standalone/standalone.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/precompilation_test.dart
diff --git a/tests/standalone/precompilation_test.dart b/tests/standalone/precompilation_test.dart
deleted file mode 100644
index c35cfcc67dc17797964f439892f0d0e58505d2fd..0000000000000000000000000000000000000000
--- a/tests/standalone/precompilation_test.dart
+++ /dev/null
@@ -1,108 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Test generating and running a simple precompiled snapshot of this script.
-
-import 'dart:io';
-
-main(List args) {
- if (args.length > 0 && args[0] == "--hello") {
- print("Hello");
- return;
- }
-
- var cc, cc_flags, shared, libname;
- if (Platform.isLinux) {
- cc = 'gcc';
- shared = '-shared';
- libname = 'libprecompiled.so';
- } else if (Platform.isMacOS) {
- cc = 'clang';
- shared = '-dynamiclib';
- libname = 'libprecompiled.dylib';
- } else {
- print("Test only supports Linux and Mac");
- return;
- }
-
- if (Platform.version.contains("x64")) {
- cc_flags = "-m64";
- } else if (Platform.version.contains("simarm64")) {
- cc_flags = "-m64";
- } else if (Platform.version.contains("simarm")) {
- cc_flags = "-m32";
- } else if (Platform.version.contains("simmips")) {
- cc_flags = "-m32";
- } else if (Platform.version.contains("arm")) {
- cc_flags = "";
- } else if (Platform.version.contains("mips")) {
- cc_flags = "-EL";
- } else {
- print("Architecture not supported: ${Platform.version}");
- return;
- }
-
- print("Creating precompiled snapshot...");
- var dart_executable =
- Directory.current.path + Platform.pathSeparator + Platform.executable;
- Directory tmp;
- try {
- tmp = Directory.current.createTempSync("temp_precompilation_test");
- var result = Process.runSync(
- "${dart_executable}_bootstrap",
- ["--gen-precompiled-snapshot", Platform.script.path],
- workingDirectory: tmp.path);
- if (result.exitCode != 0) {
- print(result.stdout);
- print(result.stderr);
- throw "Snapshot generation failed.";
- }
-
- // Check if gcc is present, and skip test if it is not.
- print("Creating shared library...");
- try {
- result = Process.runSync(
- cc,
- ["--version"],
- workingDirectory: tmp.path);
- if (result.exitCode != 0) {
- throw "$cc --version failed.";
- }
- } catch(e) {
- print("Skipping test because $cc is not present: $e");
- return;
- }
-
- result = Process.runSync(
- cc,
- [shared, cc_flags, "-nostartfiles", "-o", libname, "precompiled.S"],
- workingDirectory: tmp.path);
- if (result.exitCode != 0) {
- print(result.stdout);
- print(result.stderr);
- throw "Shared library creation failed!";
- }
-
- print("Running test program...");
- var ld_library_path = new String.fromEnvironment("LD_LIBRARY_PATH");
- ld_library_path = "${ld_library_path}:${tmp.path}";
-
- result = Process.runSync(
- "${dart_executable}_precompiled_runtime",
- ["--run-precompiled-snapshot", "ignored_script", "--hello"],
- workingDirectory: tmp.path,
- environment: {"LD_LIBRARY_PATH": ld_library_path});
- if (result.exitCode != 0) {
- print(result.stdout);
- print(result.stderr);
- throw "Precompiled binary failed.";
- }
- print(result.stdout);
- if (result.stdout != "Hello\n") {
- throw "Precompiled binary output mismatch.";
- }
- } finally {
- tmp?.deleteSync(recursive: true);
- }
-}
« no previous file with comments | « tests/standalone/precompilation_dart2js_test.dart ('k') | tests/standalone/standalone.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698