OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 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 | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 var args = process.argv.slice(2); | 5 var args = process.argv.slice(2); |
6 if (args.length != 1) { | 6 if (args.length != 1) { |
7 throw new Error("Usage: node test/run.js <test-module-name>"); | 7 throw new Error("Usage: node test/run.js <test-module-name>"); |
8 } | 8 } |
9 var test = args[0]; | 9 var test = args[0]; |
10 | 10 |
11 var requirejs = require('requirejs'); | 11 var requirejs = require('requirejs'); |
12 var ddcdir = __dirname + '/..'; | 12 var ddcdir = __dirname + '/../'; |
13 requirejs.config({ | 13 requirejs.config({ |
14 baseUrl: ddcdir + '/gen/codegen_output', | 14 baseUrl: ddcdir + 'gen/codegen_output', |
15 paths: { | 15 paths: { |
16 dart_sdk: ddcdir + '/lib/js/amd/dart_sdk' | 16 dart_sdk: ddcdir + 'lib/js/amd/dart_sdk', |
| 17 async_helper: ddcdir + 'gen/codegen_output/pkg/async_helper', |
| 18 expect: ddcdir + 'gen/codegen_output/pkg/expect', |
| 19 js: ddcdir + 'gen/codegen_output/pkg/js', |
| 20 matcher: ddcdir + 'gen/codegen_output/pkg/matcher', |
| 21 minitest: ddcdir + 'gen/codegen_output/pkg/minitest', |
| 22 path: ddcdir + 'gen/codegen_output/pkg/path', |
| 23 stack_trace: ddcdir + 'gen/codegen_output/pkg/stack_trace', |
| 24 unittest: ddcdir + 'gen/codegen_output/pkg/unittest', |
17 } | 25 } |
18 }); | 26 }); |
19 | 27 |
20 // TODO(vsm): Factor out test framework code in test/browser/language_tests.js | 28 // 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. | 29 // and use here. Async tests and unittests won't work without it. |
22 | 30 |
23 var module = requirejs(test); | 31 var module = requirejs(test); |
24 test = test.split('/').slice(-1)[0]; | 32 test = test.split('/').slice(-1)[0]; |
25 module[test].main(); | 33 module[test].main(); |
OLD | NEW |