]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Add an integration test script
authorZane Bitter <zbitter@redhat.com>
Mon, 21 May 2012 21:41:17 +0000 (23:41 +0200)
committerZane Bitter <zbitter@redhat.com>
Mon, 21 May 2012 21:41:17 +0000 (23:41 +0200)
Signed-off-by: Zane Bitter <zbitter@redhat.com>
tools/integration.sh [new file with mode: 0755]

diff --git a/tools/integration.sh b/tools/integration.sh
new file mode 100755 (executable)
index 0000000..c9b8fe0
--- /dev/null
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+TOOLS_DIR=`dirname $0`
+HEAT_DIR="$TOOLS_DIR/.."
+
+clean() {
+    $TOOLS_DIR/uninstall-heat -y -r ""
+}
+
+error() {
+    echo "Failed :("
+}
+
+run() {
+    bash -c "$($TOOLS_DIR/rst2script.sed $HEAT_DIR/docs/GettingStarted.rst)" || error
+}
+
+case $1 in
+    clean|run)
+        $1
+        ;;
+    *)
+        clean
+        run
+        ;;
+esac