OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 |
| 5 var args = process.argv.slice(2); |
| 6 if (args.length != 1) { |
| 7 throw new Error("Usage: node test/run.js <test-module-name>"); |
| 8 } |
| 9 var test = args[0]; |
| 10 |
| 11 var requirejs = require('requirejs'); |
| 12 var ddcdir = __dirname + '/..'; |
| 13 requirejs.config({ |
| 14 baseUrl: ddcdir + '/gen/codegen_output', |
| 15 paths: { |
| 16 dart_sdk: ddcdir + '/lib/js/amd/dart_sdk' |
| 17 } |
| 18 }); |
| 19 |
| 20 // TODO(vsm): Factor out test framework code in test/browser/language_tests.js |
| 21 // and use here. Async tests and unittests won't work without it. |
| 22 |
| 23 var module = requirejs(test); |
| 24 test = test.split('/').slice(-1)[0]; |
| 25 module[test].main(); |
OLD | NEW |