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

Unified Diff: test/codegen_test.dart

Issue 1673863002: Infra for running lib tests (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Reformat Created 4 years, 10 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 | « test/codegen/lib/typed_data/typed_list_iterable_test.dart ('k') | tool/browser_test.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen_test.dart
diff --git a/test/codegen_test.dart b/test/codegen_test.dart
index dd3ec981d138b59e9c8918f0e5ca705a055c4cf4..70f5a23f139a85413716e5e1ccbe4e000709916a 100644
--- a/test/codegen_test.dart
+++ b/test/codegen_test.dart
@@ -103,37 +103,43 @@ $compilerMessages''';
return !compiler.failure;
}
+ var testDirs = <String>['language', path.join('lib', 'typed_data')];
+
var multitests = new Set<String>();
{
// Expand wacky multitests into a bunch of test files.
// We'll compile each one as if it was an input.
- var languageDir = path.join(inputDir, 'language');
- var testFiles = _findTests(languageDir, filePattern);
-
- for (var filePath in testFiles) {
- if (filePath.endsWith('_multi.dart')) continue;
-
- var contents = new File(filePath).readAsStringSync();
- if (isMultiTest(contents)) {
- multitests.add(filePath);
-
- var tests = new Map<String, String>();
- var outcomes = new Map<String, Set<String>>();
- extractTestsFromMultitest(filePath, contents, tests, outcomes);
+ for (var testDir in testDirs) {
+ var fullDir = path.join(inputDir, testDir);
+ var testFiles = _findTests(fullDir, filePattern);
- var filename = path.basenameWithoutExtension(filePath);
- tests.forEach((name, contents) {
- new File(path.join(languageDir, '${filename}_${name}_multi.dart'))
- .writeAsStringSync(contents);
- });
+ for (var filePath in testFiles) {
+ if (filePath.endsWith('_multi.dart')) continue;
+
+ var contents = new File(filePath).readAsStringSync();
+ if (isMultiTest(contents)) {
+ multitests.add(filePath);
+
+ var tests = new Map<String, String>();
+ var outcomes = new Map<String, Set<String>>();
+ extractTestsFromMultitest(filePath, contents, tests, outcomes);
+
+ var filename = path.basenameWithoutExtension(filePath);
+ tests.forEach((name, contents) {
+ new File(path.join(fullDir, '${filename}_${name}_multi.dart'))
+ .writeAsStringSync(contents);
+ });
+ }
}
}
}
var batchCompiler = createCompiler(realSdkContext);
- for (var dir in [null, 'language']) {
- if (codeCoverage && dir == 'language') continue;
+ var allDirs = [null];
+ allDirs.addAll(testDirs);
+ for (var dir in allDirs) {
+ if (codeCoverage && dir != null) continue;
group('dartdevc ' + path.join('test', 'codegen', dir), () {
var outDir = new Directory(path.join(expectDir, dir));
« no previous file with comments | « test/codegen/lib/typed_data/typed_list_iterable_test.dart ('k') | tool/browser_test.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698