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

Unified Diff: pkg/dev_compiler/tool/run.js

Issue 2318723002: Simple node runner (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dev_compiler/tool/run.js
diff --git a/pkg/dev_compiler/tool/run.js b/pkg/dev_compiler/tool/run.js
new file mode 100644
index 0000000000000000000000000000000000000000..4d18607206634f89135c2033720f335a5c36c283
--- /dev/null
+++ b/pkg/dev_compiler/tool/run.js
@@ -0,0 +1,25 @@
+// Copyright (c) 2016, 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.
+
+var args = process.argv.slice(2);
+if (args.length != 1) {
+ throw new Error("Usage: node test/run.js <test-module-name>");
+}
+var test = args[0];
+
+var requirejs = require('requirejs');
+var ddcdir = __dirname + '/..';
+requirejs.config({
+ baseUrl: ddcdir + '/gen/codegen_output',
+ paths: {
+ dart_sdk: ddcdir + '/lib/js/amd/dart_sdk'
+ }
+});
+
+// TODO(vsm): Factor out test framework code in test/browser/language_tests.js
+// and use here. Async tests and unittests won't work without it.
+
+var module = requirejs(test);
+test = test.split('/').slice(-1)[0];
+module[test].main();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698