3696154a8e
BUG=https://code.google.com/p/dart/issues/detail?id=7872 Review URL: https://codereview.chromium.org//11878015 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17026 260f80e4-7a28-3924-810f-c04153c831b5
32 lines
1.1 KiB
Dart
32 lines
1.1 KiB
Dart
// Copyright (c) 2012, 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.
|
|
|
|
import "dart:io";
|
|
|
|
void runTests(String executable, String script, Iterator iterator) {
|
|
if (iterator.moveNext()) {
|
|
var progressIndicator = iterator.current;
|
|
Process.run(executable, [script, progressIndicator]).then((result) {
|
|
Expect.equals(1, result.exitCode);
|
|
if (progressIndicator == 'buildbot') {
|
|
Expect.isTrue(result.stdout.contains("@@@STEP_FAILURE@@@"));
|
|
}
|
|
runTests(executable, script, iterator);
|
|
});
|
|
}
|
|
}
|
|
|
|
main() {
|
|
var scriptPath = new Path(new Options().script);
|
|
var scriptDirPath = scriptPath.directoryPath;
|
|
var exitCodeScriptPath =
|
|
scriptDirPath.append('test_runner_exit_code_script.dart');
|
|
var script = exitCodeScriptPath.toNativePath();
|
|
var executable = new Options().executable;
|
|
var progressTypes = ['compact', 'color', 'line', 'verbose',
|
|
'status', 'buildbot'];
|
|
var iterator = progressTypes.iterator;
|
|
runTests(executable, script, iterator);
|
|
}
|