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

Unified Diff: tool/node_test.sh

Issue 1633003002: Add --modules=node support (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: reverted let->const parasite change Created 4 years, 11 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: tool/node_test.sh
diff --git a/tool/node_test.sh b/tool/node_test.sh
new file mode 100755
index 0000000000000000000000000000000000000000..1e7588c87da499201bbed6d1e3dc1f871c16db2f
--- /dev/null
+++ b/tool/node_test.sh
@@ -0,0 +1,32 @@
+#!/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 -e \
+ "require('dart/_isolate_helper').startRootIsolate(require('$1').main, []);"
+}
+
+# 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
« lib/src/options.dart ('K') | « tool/input_sdk/private/types.dart ('k') | tool/presubmit.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698