Chromium Code Reviews| Index: tool/node_test.sh |
| diff --git a/tool/node_test.sh b/tool/node_test.sh |
| new file mode 100755 |
| index 0000000000000000000000000000000000000000..b7af724151c0e19d4e57dcef70f7dba617cbea72 |
| --- /dev/null |
| +++ b/tool/node_test.sh |
| @@ -0,0 +1,31 @@ |
| +#!/bin/bash |
| +set -e |
| +# switch to the root directory of dev_compiler |
| +cd $( dirname "${BASH_SOURCE[0]}" )/.. |
| + |
| +output_dir=tmp/node |
| +options="--modules=node -o $output_dir" |
| + |
| +[[ -d $output_dir ]] || mkdir -p $output_dir |
| + |
| +echo "Compiling SDK for node to $output_dir" |
| + |
| +./tool/build_sdk.sh $options |
| + |
| +function compile() { |
| + ./bin/dartdevc.dart $options $1 |
| +} |
| +function run() { |
| + NODE_PATH=$output_dir node --harmony \ |
|
vsm
2016/01/26 14:09:40
Do we need "--harmony"? Looks like most features
ochafik
2016/01/26 16:27:37
Rest params (used in mixins) still need --harmony_
|
| + -e "require('dart/_isolate_helper').startRootIsolate(require('$1').main, []);" |
|
vsm
2016/01/26 14:09:40
nit: line len
ochafik
2016/01/26 16:27:36
Done.
|
| +} |
| + |
| +# TODO(ochafik): Add full language tests (in separate Travis env/matrix config). |
| + |
| +echo "Now compiling hello_dart_test" |
| +compile test/codegen/language/hello_dart_test.dart |
| +run hello_dart_test |
| + |
| +echo "Now compiling DeltaBlue" |
| +compile test/codegen/DeltaBlue.dart |
| +run DeltaBlue |