From 492b37aa6e040f5e250d908311805b471b456880 Mon Sep 17 00:00:00 2001 From: James Allen Date: Thu, 23 Nov 2017 16:52:43 +0000 Subject: [PATCH] Add missing bin/ files --- services/web/bin/acceptance_test | 18 ++++++++++++++++++ services/web/bin/compile_acceptance_tests | 16 ++++++++++++++++ services/web/bin/compile_app | 23 +++++++++++++++++++++++ services/web/bin/compile_unit_tests | 15 +++++++++++++++ services/web/bin/unit_test | 14 ++++++++++++++ 5 files changed, 86 insertions(+) create mode 100755 services/web/bin/acceptance_test create mode 100755 services/web/bin/compile_acceptance_tests create mode 100755 services/web/bin/compile_app create mode 100755 services/web/bin/compile_unit_tests create mode 100755 services/web/bin/unit_test diff --git a/services/web/bin/acceptance_test b/services/web/bin/acceptance_test new file mode 100755 index 0000000000..717e8542ad --- /dev/null +++ b/services/web/bin/acceptance_test @@ -0,0 +1,18 @@ +#!/bin/bash +set -e; + +MOCHA="node_modules/.bin/mocha --recursive --reporter spec --timeout 15000" + +$MOCHA "$@" test/acceptance/js + +# TODO: Module acceptance tests are hard to get working, +# because they typically require the server to be instantiated +# with a different config. + +# for dir in modules/*; +# do +# if [ -d $dir/test/acceptance/js ]; then +# $MOCHA "$@" $dir/test/acceptance/js +# fi +# done + diff --git a/services/web/bin/compile_acceptance_tests b/services/web/bin/compile_acceptance_tests new file mode 100755 index 0000000000..d60ba0cc46 --- /dev/null +++ b/services/web/bin/compile_acceptance_tests @@ -0,0 +1,16 @@ +#!/bin/bash +set -e; + +COFFEE=node_modules/.bin/coffee + +echo Compiling test/acceptance/coffee; +$COFFEE -o test/acceptance/js -c test/acceptance/coffee; + +for dir in modules/*; +do + + if [ -d $dir/test/acceptance ]; then + echo Compiling $dir/test/acceptance/coffee; + $COFFEE -o $dir/test/acceptance/js -c $dir/test/acceptance/coffee; + fi +done \ No newline at end of file diff --git a/services/web/bin/compile_app b/services/web/bin/compile_app new file mode 100755 index 0000000000..b218b01a5a --- /dev/null +++ b/services/web/bin/compile_app @@ -0,0 +1,23 @@ +#!/bin/bash +set -e; + +COFFEE=node_modules/.bin/coffee + +echo Compiling app.coffee; +$COFFEE -c app.coffee; + +echo Compiling app/coffee; +$COFFEE -o app/js -c app/coffee; + +for dir in modules/*; +do + if [ -d $dir/app/coffee ]; then + echo Compiling $dir/app/coffee; + $COFFEE -o $dir/app/js -c $dir/app/coffee; + fi + + if [ -e $dir/index.coffee ]; then + echo Compiling $dir/index.coffee; + $COFFEE -c $dir/index.coffee; + fi +done \ No newline at end of file diff --git a/services/web/bin/compile_unit_tests b/services/web/bin/compile_unit_tests new file mode 100755 index 0000000000..780a189bda --- /dev/null +++ b/services/web/bin/compile_unit_tests @@ -0,0 +1,15 @@ +#!/bin/bash +set -e; + +COFFEE=node_modules/.bin/coffee + +echo Compiling test/unit/coffee; +$COFFEE -o test/unit/js -c test/unit/coffee; + +for dir in modules/*; +do + if [ -d $dir/test/unit ]; then + echo Compiling $dir/test/unit/coffee; + $COFFEE -o $dir/test/unit/js -c $dir/test/unit/coffee; + fi +done \ No newline at end of file diff --git a/services/web/bin/unit_test b/services/web/bin/unit_test new file mode 100755 index 0000000000..da13a441fa --- /dev/null +++ b/services/web/bin/unit_test @@ -0,0 +1,14 @@ +#!/bin/bash +set -e; + +MOCHA="node_modules/.bin/mocha --recursive --reporter spec" + +$MOCHA "$@" test/unit/js + +for dir in modules/*; +do + if [ -d $dir/test/unit/js ]; then + $MOCHA "$@" $dir/test/unit/js + fi +done +