Index: tests/standalone/io/test_runner_test.dart |
diff --git a/tests/standalone/io/test_runner_test.dart b/tests/standalone/io/test_runner_test.dart |
index 1eaae3f15889d7b62df915a0a95b06ac824f102a..b216562f98f2dd86b27066025df69a638409c6c2 100644 |
--- a/tests/standalone/io/test_runner_test.dart |
+++ b/tests/standalone/io/test_runner_test.dart |
@@ -15,6 +15,16 @@ import "process_test_util.dart"; |
final DEFAULT_TIMEOUT = 10; |
final LONG_TIMEOUT = 30; |
+List<String> packageOptions() { |
+ if (Platform.packageRoot != null) { |
+ return <String>['--package-root=${Platform.packageRoot}']; |
+ } else if (Platform.packageConfig != null) { |
+ return <String>['--packages=${Platform.packageConfig}']; |
+ } else { |
+ return <String>[]; |
+ } |
+} |
+ |
class TestController { |
static int numTests = 0; |
static int numCompletedTests = 0; |
@@ -84,9 +94,11 @@ class CustomTestSuite extends TestSuite { |
} |
TestCase _makeNormalTestCase(name, expectations) { |
+ var args = packageOptions(); |
+ args.addAll([Platform.script.toFilePath(), name]); |
var command = CommandBuilder.instance.getProcessCommand( |
'custom', Platform.executable, |
- ['--package-root=${Platform.packageRoot}', Platform.script.toFilePath(), name], |
+ args, |
{}); |
return _makeTestCase(name, DEFAULT_TIMEOUT, command, expectations); |
} |