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

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

Issue 11028023: Add firefox jsshell support in testing scripts. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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
Index: tools/testing/dart/test_suite.dart
===================================================================
--- tools/testing/dart/test_suite.dart (revision 13209)
+++ tools/testing/dart/test_suite.dart (working copy)
@@ -480,6 +480,10 @@
} else if (configuration['runtime'] == 'd8') {
var d8 = TestUtils.d8FileName(configuration);
commands.add(new Command(d8, ['$tempDir/out.js']));
+ } else if (configuration['runtime'] == 'jsshell') {
+ var jsshell = TestUtils.jsshellFileName(configuration);
+ var environment = TestUtils.jsshellEnvironment(configuration);
+ commands.add(new Command(jsshell, ['$tempDir/out.js'], environment));
}
return commands;
@@ -1305,7 +1309,10 @@
static String executableSuffix(String executable) {
if (Platform.operatingSystem == 'windows') {
- if (executable == 'd8' || executable == 'vm' || executable == 'none') {
+ if (executable == 'd8' ||
+ executable == 'vm' ||
+ executable == 'none' ||
+ executable == 'jsshell') {
return '.exe';
} else {
return '.bat';
@@ -1436,6 +1443,25 @@
return args;
}
+ static String jsshellDir(Map configuration) {
+ return 'third_party/firefox_jsshell/${configuration['system']}';
Mads Ager (google) 2012/10/04 11:33:35 You should make this relative to dartDir which wil
ricow1 2012/10/04 12:02:05 We don't do this for d8 or for dart2js, but done
+ }
+
+ static String jsshellFileName(Map configuration) {
+ var executableSuffix = executableSuffix('jsshell');
+ var executable = 'js$executableSuffix';
+ var jsshellDir = jsshellDir(configuration);
+ return '$jsshellDir/$executable';
+ }
+
+ static Map<String, String> jsshellEnvironment(Map configuration) {
+ if (configuration['system'] == 'linux') {
Mads Ager (google) 2012/10/04 11:33:35 Do you only need to add something for linux? Does
ricow1 2012/10/04 12:02:05 On windows this worked and as discussed offline th
+ var jsshellDir = jsshellDir(configuration);
+ return {'LD_LIBRARY_PATH': jsshellDir};
+ }
+ return {};
+ }
+
static bool isBrowserRuntime(String runtime) => Contains(
runtime,
const <String>['drt',
@@ -1445,6 +1471,10 @@
'opera',
'chrome',
'ff']);
+
+ static bool isCommandLineRuntime(String runtime) =>
ahe 2012/10/04 13:12:26 isJsCommandLineRuntime?
ricow1 2012/10/04 13:19:42 Done.
+ Contains(runtime, const <String>['d8', 'jsshell']);
+
}
class SummaryReport {
« tools/testing/dart/test_options.dart ('K') | « tools/testing/dart/test_runner.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698