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

Side by Side Diff: tools/testing/dart/test_suite.dart

Issue 9860009: Removes dartc reliance on its own libraries, now can be targeted at any implementation's libraries (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated 'configs' to be 'config' directory, updated addLib() to throw exception Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * Classes and methods for enumerating and preparing tests. 6 * Classes and methods for enumerating and preparing tests.
7 * 7 *
8 * This library includes: 8 * This library includes:
9 * 9 *
10 * - Creating tests by listing all the Dart files in certain directories, 10 * - Creating tests by listing all the Dart files in certain directories,
(...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after
988 if (index != -1) { 988 if (index != -1) {
989 String testRelativePath = 989 String testRelativePath =
990 filename.substring(index + 'compiler/javatests/'.length, 990 filename.substring(index + 'compiler/javatests/'.length,
991 filename.length - '.java'.length); 991 filename.length - '.java'.length);
992 String testClass = testRelativePath.replaceAll('/', '.'); 992 String testClass = testRelativePath.replaceAll('/', '.');
993 testClasses.add(testClass); 993 testClasses.add(testClass);
994 } 994 }
995 } 995 }
996 996
997 void createTest(successIgnored) { 997 void createTest(successIgnored) {
998 String d8 = 998 var sdkDir = "$buildDir/dart-sdk".trim();
999 "$buildDir/d8${TestUtils.executableSuffix(configuration['component'])}";
1000 List<String> args = <String>[ 999 List<String> args = <String>[
1001 '-ea', 1000 '-ea',
1002 '-classpath', classPath, 1001 '-classpath', classPath,
1003 '-Dcom.google.dart.runner.d8=$d8', 1002 '-Dcom.google.dart.sdk=$sdkDir',
1004 '-Dcom.google.dart.corelib.SharedTests.test_py=' + 1003 '-Dcom.google.dart.corelib.SharedTests.test_py=' +
1005 dartDir + '/tools/test.py', 1004 dartDir + '/tools/test.py',
1006 'org.junit.runner.JUnitCore']; 1005 'org.junit.runner.JUnitCore'];
1007 args.addAll(testClasses); 1006 args.addAll(testClasses);
1008 1007
1009 doTest(new TestCase(suiteName, 1008 doTest(new TestCase(suiteName,
1010 [new Command('java', args)], 1009 [new Command('java', args)],
1011 configuration, 1010 configuration,
1012 completeHandler, 1011 completeHandler,
1013 new Set<String>.from([PASS]))); 1012 new Set<String>.from([PASS])));
1014 doDone(); 1013 doDone();
1015 } 1014 }
1016 1015
1017 void completeHandler(TestCase testCase) { 1016 void completeHandler(TestCase testCase) {
1018 } 1017 }
1019 1018
1020 void computeClassPath() { 1019 void computeClassPath() {
1021 classPath = Strings.join( 1020 classPath = Strings.join(
1022 ['$buildDir/compiler/lib/dartc.jar', 1021 ['$buildDir/compiler/lib/dartc.jar',
1023 '$buildDir/compiler/lib/corelib.jar',
1024 '$buildDir/compiler-tests.jar', 1022 '$buildDir/compiler-tests.jar',
1025 '$buildDir/closure_out/compiler.jar', 1023 '$buildDir/closure_out/compiler.jar',
1026 // Third party libraries. 1024 // Third party libraries.
1027 '$dartDir/third_party/args4j/2.0.12/args4j-2.0.12.jar', 1025 '$dartDir/third_party/args4j/2.0.12/args4j-2.0.12.jar',
1028 '$dartDir/third_party/guava/r09/guava-r09.jar', 1026 '$dartDir/third_party/guava/r09/guava-r09.jar',
1029 '$dartDir/third_party/json/r2_20080312/json.jar',
1030 '$dartDir/third_party/rhino/1_7R3/js.jar', 1027 '$dartDir/third_party/rhino/1_7R3/js.jar',
1031 '$dartDir/third_party/hamcrest/v1_3/hamcrest-core-1.3.0RC2.jar', 1028 '$dartDir/third_party/hamcrest/v1_3/hamcrest-core-1.3.0RC2.jar',
1032 '$dartDir/third_party/hamcrest/v1_3/hamcrest-generator-1.3.0RC2.jar', 1029 '$dartDir/third_party/hamcrest/v1_3/hamcrest-generator-1.3.0RC2.jar',
1033 '$dartDir/third_party/hamcrest/v1_3/hamcrest-integration-1.3.0RC2.jar', 1030 '$dartDir/third_party/hamcrest/v1_3/hamcrest-integration-1.3.0RC2.jar',
1034 '$dartDir/third_party/hamcrest/v1_3/hamcrest-library-1.3.0RC2.jar', 1031 '$dartDir/third_party/hamcrest/v1_3/hamcrest-library-1.3.0RC2.jar',
1035 '$dartDir/third_party/junit/v4_8_2/junit.jar'], 1032 '$dartDir/third_party/junit/v4_8_2/junit.jar'],
1036 ':'); // Path separator. 1033 ':'); // Path separator.
1037 } 1034 }
1038 } 1035 }
1039 1036
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
1231 * $noCrash tests are expected to be flaky but not crash 1228 * $noCrash tests are expected to be flaky but not crash
1232 * $pass tests are expected to pass 1229 * $pass tests are expected to pass
1233 * $failOk tests are expected to fail that we won't fix 1230 * $failOk tests are expected to fail that we won't fix
1234 * $fail tests are expected to fail that we should fix 1231 * $fail tests are expected to fail that we should fix
1235 * $crash tests are expected to crash that we should fix 1232 * $crash tests are expected to crash that we should fix
1236 * $timeout tests are allowed to timeout 1233 * $timeout tests are allowed to timeout
1237 """; 1234 """;
1238 print(report); 1235 print(report);
1239 } 1236 }
1240 } 1237 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698