Initial scaffold for test scripts
authorMark Tearle <[email protected]>
Sun, 29 Mar 2015 10:02:48 +0000 (18:02 +0800)
committerMark Tearle <[email protected]>
Sun, 29 Mar 2015 10:02:48 +0000 (18:02 +0800)
scripts/BuildAndInstall.sh [new file with mode: 0755]
scripts/InitialConfig.sh [new file with mode: 0755]
scripts/RunTestEnvironment.sh [new file with mode: 0755]

diff --git a/scripts/BuildAndInstall.sh b/scripts/BuildAndInstall.sh
new file mode 100755 (executable)
index 0000000..a586415
--- /dev/null
@@ -0,0 +1,54 @@
+#!/bin/bash
+
+# BuildAndInstall.sh
+
+# This script will build the various bits of the UCC Vend infrastructure
+# and run their install scripts
+
+# error handling
+abort()
+{
+    echo >&2 '*** ABORTED ***'
+    echo "An error occurred. Exiting..." >&2
+    exit 1
+}
+
+trap 'abort' 0
+
+set -e
+
+# If an error occurs, the abort() function will be called.
+#----------------------------------------------------------
+
+
+CODEDIR=/vagrant/code
+
+# build and install dispense
+
+cd $CODEDIR/opendispense2/src
+
+make
+sudo make install
+
+# build SNACKROM
+
+cd $CODEDIR/uccvend-snackrom/ROM2
+
+make
+
+# vendserver 
+
+cd $CODEDIR/uccvend-vendserver
+
+python setup.py build
+sudo python setup.py install
+
+# virtualsnack
+# virtualcoke
+
+# for the moment, until these are changed to use setuptools, left
+# in /vagrant/code
+
+# Done!
+trap : 0
+
diff --git a/scripts/InitialConfig.sh b/scripts/InitialConfig.sh
new file mode 100755 (executable)
index 0000000..ab17ded
--- /dev/null
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+# InitialConfig.sh
+
+# This script will set up some initial users with some 
+# credit and add them to various groups to allow them to do various things
+
+# error handling
+abort()
+{
+    echo >&2 '*** ABORTED ***'
+    echo "An error occurred. Exiting..." >&2
+    exit 1
+}
+
+trap 'abort' 0
+
+set -e
+
+# If an error occurs, the abort() function will be called.
+#----------------------------------------------------------
+
+# Setup some users
+
+# alice                - run of the mill UCC user
+# bob          - wheel member
+# chuck                - committee member
+# dave         - expired user
+# eve          - second run of mill UCC user
+# murphy       - wheel and coke/door member
+
+
+# Done!
+trap : 0
+
diff --git a/scripts/RunTestEnvironment.sh b/scripts/RunTestEnvironment.sh
new file mode 100755 (executable)
index 0000000..01dd906
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+# InitialConfig.sh
+
+# This script will run a test environment inside tmux
+
+# error handling
+abort()
+{
+    echo >&2 '*** ABORTED ***'
+    echo "An error occurred. Exiting..." >&2
+    exit 1
+}
+
+trap 'abort' 0
+
+set -e
+
+# If an error occurs, the abort() function will be called.
+#----------------------------------------------------------
+
+
+# Done!
+trap : 0
+

UCC git Repository :: git.ucc.asn.au