Index: src/tests/Makefile.am
===================================================================
--- src/tests/Makefile.am	(revision 10dc7491a667863c329eca8e88d748bc09b5f0ea)
+++ src/tests/Makefile.am	(revision 8b52686896300a132c918df9ebd5e4f6dc5b6109)
@@ -27,4 +27,7 @@
 
 all-local :
+	python test.py vector_test avl_test Operators NumericConstants Expression Enum AsmName Array Typeof Cast
+
+all-tests :
 	python test.py --all
 
Index: src/tests/Makefile.in
===================================================================
--- src/tests/Makefile.in	(revision 10dc7491a667863c329eca8e88d748bc09b5f0ea)
+++ src/tests/Makefile.in	(revision 8b52686896300a132c918df9ebd5e4f6dc5b6109)
@@ -634,4 +634,7 @@
 
 all-local :
+	python test.py vector_test avl_test Operators NumericConstants Expression Enum AsmName Array Typeof Cast
+
+all-tests :
 	python test.py --all
 
Index: src/tests/runTests.sh
===================================================================
--- src/tests/runTests.sh	(revision 10dc7491a667863c329eca8e88d748bc09b5f0ea)
+++ 	(revision )
@@ -1,72 +1,0 @@
-#!/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 avl_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
-#
-# ret_val=0
-#
-# for test in $tests; do
-# 	echo -n "    $test" | tee -a $logfile
-#
-# 	# build, skipping to next test on error
-# 	if ! make -j 8 $test > tests/$test.make.txt 2>&1; then
-# 		ret_val=1
-# 		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
-# 		ret_val=1
-# 		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
-#
-# exit $((ret_val))
-
-tests="vector_test avl_test"
-
-python test.py ${tests}
-
-ret_val=$?
-exit $((ret_val))
Index: src/tests/test.py
===================================================================
--- src/tests/test.py	(revision 10dc7491a667863c329eca8e88d748bc09b5f0ea)
+++ src/tests/test.py	(revision 8b52686896300a132c918df9ebd5e4f6dc5b6109)
@@ -2,9 +2,11 @@
 from __future__ import print_function
 
-from os import listdir
+from os import listdir, environ
 from os.path import isfile, join, splitext
 from subprocess import Popen, PIPE, STDOUT
 
 import argparse
+import os
+import re
 import sys
 
@@ -27,4 +29,24 @@
 		proc.communicate()
 		return proc.returncode
+
+def file_replace(fname, pat, s_after):
+    # first, see if the pattern is even in the file.
+    with open(fname) as f:
+        if not any(re.search(pat, line) for line in f):
+            return # pattern does not occur in file so we are done.
+
+    # pattern is in the file, so perform replace operation.
+    with open(fname) as f:
+        out_fname = fname + ".tmp"
+        out = open(out_fname, "w")
+        for line in f:
+            out.write(re.sub(pat, s_after, line))
+        out.close()
+        os.rename(out_fname, fname)
+
+def fix_MakeLevel(file) :
+	if environ.get('MAKELEVEL') :
+		file_replace(file, "make\[%i\]" % int(environ.get('MAKELEVEL')), 'make' )
+
 
 ################################################################################
@@ -49,4 +71,7 @@
 
 	retcode = 0
+
+	fix_MakeLevel(out_file)
+
 	if not generate :
 		# diff the output of the files
