Index: src/examples/runTests.sh
===================================================================
--- src/examples/runTests.sh	(revision 70d4b4f92fa857c1dab2358ce4b4861361e4e74c)
+++ src/examples/runTests.sh	(revision 70d4b4f92fa857c1dab2358ce4b4861361e4e74c)
@@ -0,0 +1,59 @@
+#!/bin/bash
+
+##############################################################################
+#
+# Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+#
+# The contents of this file are covered under the licence agreement in the
+# file "LICENCE" distributed with Cforall.
+#
+# Runs integration tests for cfa-cc.
+#
+# Output of test run will be copied into $logfile (default: tests/log.txt).
+# Build failures for tests will be placed in tests/$test.make.txt, incorrect
+# output in tests/$test.run.txt.
+#
+# Author           : Aaron B. Moss
+# Created On       : Mon Nov 23 14:19:00 2015
+# Last Modified By : Aaron B. Moss
+# Last Modified On : Mon Nov 23 14:19:00 2015
+# Update Count     : 1
+#
+##############################################################################
+
+# list of tests to run;
+# Should be a make target for each test that generates an executable in the
+# current directory named the same; should also be an input file
+# tests/$test.in.txt and expected output tests/$test.out.txt
+tests="vector_test"
+
+# log file for test output;
+# reset at the beginning of each run
+logfile=tests/log.txt
+touch $logfile && rm $logfile
+
+# clean existing build artifacts before run
+make clean > /dev/null 2>&1
+
+for test in $tests; do
+	echo -n "    $test" | tee -a $logfile
+	
+	# build, skipping to next test on error
+	if ! make $test > tests/$test.make.txt 2>&1; then
+		echo -e "\tFAILED with build error:" | tee -a $logfile
+		cat tests/$test.make.txt | tee -a $logfile
+		continue
+	fi
+	rm tests/$test.make.txt
+
+	# run, testing against expected output
+	./$test < tests/$test.in.txt > tests/$test.run.txt 2>&1
+	if ! diff tests/$test.out.txt tests/$test.run.txt > tests/$test.diff.txt; then
+		echo -e "\tFAILED with output mismatch:" | tee -a $logfile
+		cat tests/$test.diff.txt | tee -a $logfile
+		continue
+	fi
+	rm tests/$test.run.txt tests/$test.diff.txt ./$test
+
+	echo -e "\tPASSED" | tee -a $logfile
+done
Index: src/examples/tests/log.txt
===================================================================
--- src/examples/tests/log.txt	(revision 70d4b4f92fa857c1dab2358ce4b4861361e4e74c)
+++ src/examples/tests/log.txt	(revision 70d4b4f92fa857c1dab2358ce4b4861361e4e74c)
@@ -0,0 +1,1 @@
+    vector_test	PASSED
Index: src/examples/tests/vector_test.in.txt
===================================================================
--- src/examples/tests/vector_test.in.txt	(revision 70d4b4f92fa857c1dab2358ce4b4861361e4e74c)
+++ src/examples/tests/vector_test.in.txt	(revision 70d4b4f92fa857c1dab2358ce4b4861361e4e74c)
@@ -0,0 +1,1 @@
+1 2 3 4 5
Index: src/examples/tests/vector_test.out.txt
===================================================================
--- src/examples/tests/vector_test.out.txt	(revision 70d4b4f92fa857c1dab2358ce4b4861361e4e74c)
+++ src/examples/tests/vector_test.out.txt	(revision 70d4b4f92fa857c1dab2358ce4b4861361e4e74c)
@@ -0,0 +1,5 @@
+enter N elements and C-d on a separate line:
+Array elements:
+1 2 3 4 5 
+Array elements reversed:
+5 4 3 2 1 
