Procházet zdrojové kódy

Add missing bin/ files

James Allen před 9 roky
rodič
revize
492b37aa6e

+ 18 - 0
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
+

+ 16 - 0
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

+ 23 - 0
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

+ 15 - 0
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

+ 14 - 0
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
+