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

Unified Diff: tools/testing/dart/dartino_test_suite.dart

Issue 2035023003: Remove service-compiler related code. (Closed) Base URL: git@github.com:dartino/sdk.git@master
Patch Set: Created 4 years, 6 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 | « tools/servicec_blaze.dart ('k') | tools/testing/dart/test_options.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/dartino_test_suite.dart
diff --git a/tools/testing/dart/dartino_test_suite.dart b/tools/testing/dart/dartino_test_suite.dart
index 312353737340d747ce186fba855e6e9134216bf0..b55195c9c220d5535fc3cc4369884b117df983a0 100644
--- a/tools/testing/dart/dartino_test_suite.dart
+++ b/tools/testing/dart/dartino_test_suite.dart
@@ -107,17 +107,6 @@ class DartinoTestSuite extends TestSuite {
// Ignored, we assume the file did not exist.
}
- String javaHome = _guessJavaHome(configuration["arch"]);
- if (javaHome == null) {
- String arch = configuration["arch"];
- print("Notice: Java tests are disabled");
- print("Unable to find a JDK installation for architecture $arch");
- print("Install a JDK or set JAVA_PATH to an existing installation.");
- // TODO(zerny): Throw an error if no-java is not supplied.
- } else {
- print("Notice: Enabled Java tests using JDK at $javaHome");
- }
-
bool helperProgramExited = false;
io.Process vmProcess;
ReadTestExpectationsInto(
@@ -142,7 +131,6 @@ class DartinoTestSuite extends TestSuite {
'-Ddartino.version=$version',
'-Ddart-sdk=third_party/dart/sdk/',
'-Dtests-dir=tests/',
- '-Djava-home=$javaHome',
'-Dtest.dart.build-dir=$buildDir',
'-Dtest.dart.build-arch=${configuration["arch"]}',
'-Dtest.dart.build-system=${configuration["system"]}',
@@ -150,7 +138,6 @@ class DartinoTestSuite extends TestSuite {
'-Dtest.dart.build-asan=${configuration["asan"]}',
'-Dtest.dart.analytics-disable=true',
'-Dtest.dart.temp-dir=$tempDirPath',
- '-Dtest.dart.servicec-dir=tools/servicec/',
'-c',
'--packages=.packages',
'-Dtest.dartino_test_suite.port=${server.port}',
@@ -197,75 +184,6 @@ class DartinoTestSuite extends TestSuite {
void cleanup() {
completer.allDone();
}
-
- String _guessJavaHome(String buildArchitecture) {
- String arch = buildArchitecture == 'ia32' ? '32' : '64';
-
- // Try to locate a valid installation based on JAVA_HOME.
- String javaHome =
- _guessJavaHomeArch(io.Platform.environment['JAVA_HOME'], arch);
- if (javaHome != null) return javaHome;
-
- // Try to locate a valid installation using the java_home utility.
- String javaHomeUtil = '/usr/libexec/java_home';
- if (new io.File(javaHomeUtil).existsSync()) {
- List<String> args = <String>['-v', '1.6+', '-d', arch];
- io.ProcessResult result =
- io.Process.runSync(javaHomeUtil, args);
- if (result.exitCode == 0) {
- String javaHome = result.stdout.trim();
- if (_isValidJDK(javaHome)) return javaHome;
- }
- }
-
- // Try to locate a valid installation using the path to javac.
- io.ProcessResult result =
- io.Process.runSync('command', ['-v', 'javac'], runInShell: true);
- if (result.exitCode == 0) {
- String javac = result.stdout.trim();
- while (io.FileSystemEntity.isLinkSync(javac)) {
- javac = new io.Link(javac).resolveSymbolicLinksSync();
- }
- // TODO(zerny): Take into account Mac javac paths can be of the form:
- // .../Versions/X/Commands/javac
- String javaHome =
- _guessJavaHomeArch(javac.replaceAll('/bin/javac', ''), arch);
- if (javaHome != null) return javaHome;
- }
-
- return null;
- }
-
- String _guessJavaHomeArch(String javaHome, String arch) {
- if (javaHome == null) return null;
-
- // Check if the java installation supports the requested architecture.
- if (new io.File('$javaHome/bin/java').existsSync()) {
- int supportsVersion = io.Process.runSync(
- '$javaHome/bin/java', ['-d$arch', '-version']).exitCode;
- if (supportsVersion == 0 && _isValidJDK(javaHome)) return javaHome;
- }
-
- // Check for architecture specific installation by post-fixing arch.
- String archPostfix = '${javaHome}-$arch';
- if (_isValidJDK(archPostfix)) return archPostfix;
-
- // Check for architecture specific installation by replacing amd64 and i386.
- String archReplace;
- if (arch == '32' && javaHome.contains('amd64')) {
- archReplace = javaHome.replaceAll('amd64', 'i386');
- } else if (arch == '64' && javaHome.contains('i386')) {
- archReplace = javaHome.replaceAll('i386', 'amd64');
- }
- if (_isValidJDK(archReplace)) return archReplace;
-
- return null;
- }
-
- bool _isValidJDK(String javaHome) {
- if (javaHome == null) return false;
- return new io.File('$javaHome/include/jni.h').existsSync();
- }
}
/// Pattern that matches warnings (from dart2js) that contain a comment saying
« no previous file with comments | « tools/servicec_blaze.dart ('k') | tools/testing/dart/test_options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698