aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2014-09-12 15:18:03 -0700
committerDaniel Dunbar <daniel@zuster.org>2014-09-12 17:39:18 -0700
commit8c3e28cfe911a46d2a73d0434a048d60c35635bf (patch)
treecf8d75e85485a018da4ce1db7fab7dcd99d2ae69 /test
parent84eab6b58939ba8a5d2d5e415af14e5382cf6d53 (diff)
downloadklee-8c3e28cfe911a46d2a73d0434a048d60c35635bf.tar.gz
Fix up Concrete Makefile to not remove outputs, so tests can run in parallel.
Diffstat (limited to 'test')
-rw-r--r--test/Concrete/Makefile40
1 files changed, 14 insertions, 26 deletions
diff --git a/test/Concrete/Makefile b/test/Concrete/Makefile
index 57801c1c..628ca06b 100644
--- a/test/Concrete/Makefile
+++ b/test/Concrete/Makefile
@@ -1,48 +1,36 @@
LEVEL = ../..
-# hard-coding bad. will get fixed.
LCCFLAGS += -O0 -Wall
LCXXFLAGS += -O0 -Wall
LLCFLAGS =
-test:
- ./ConcreteTest.py
-
clean::
- -rm -rf Output klee-last klee-out* test.log
- -rm -rf *.bc
+ -rm -rf Output
# We do not want to make .d files for tests!
DISABLE_AUTO_DEPENDENCIES=1
include ${LEVEL}/Makefile.common
-# Compile from X.c to Output/X.ll
-Output/%.ll: %.c $(LCC1) Output/.dir $(INCLUDES)
- $(LLVMCC) -emit-llvm $(CPPFLAGS) $(LCCFLAGS) -S $< -o $@
-
-# Compile from X.cpp to Output/X.ll
-Output/%.ll: %.cpp $(LCC1XX) Output/.dir $(INCLUDES)
- $(LLVMCXX) -emit-llvm $(CPPFLAGS) $(LCXXFLAGS) -S $< -o $@
+Output/%.bc: %.c Output/.dir $(INCLUDES)
+ $(LLVMCC) -emit-llvm $(CPPFLAGS) $(LCCFLAGS) -c $< -o $@
-# Compile from X.cc to Output/X.ll
-Output/%.ll: %.cc $(LCC1XX) Output/.dir $(INCLUDES)
- $(LLVMCXX) -emit-llvm $(CPPFLAGS) $(LCXXFLAGS) -S $< -o $@
+Output/%.bc: %.cpp Output/.dir $(INCLUDES)
+ $(LLVMCXX) -emit-llvm $(CPPFLAGS) $(LCXXFLAGS) -c $< -o $@
-# LLVM Assemble from Output/X.ll to Output/X.bc. Output/X.ll must have come
-# from GCC output, so use GCCAS.
-#
-Output/%.bc: Output/%.ll $(LLVMAS)
- $(LLVMAS) -f $< -o $@
+Output/%.bc: %.cc $(LCC1XX) Output/.dir $(INCLUDES)
+ $(LLVMCXX) -emit-llvm $(CPPFLAGS) $(LCXXFLAGS) -c $< -o $@
-# LLVM Assemble from X.ll to Output/X.bc. Because we are coming directly from
-# LLVM source, use the non-transforming assembler.
-#
Output/%.bc: %.ll $(LLVMAS) Output/.dir
$(LLVMAS) -f $< -o $@
-Output/linked_%.bc: Output/%.bc Output/_testingUtils.bc
- $(LLVMLD) Output/_testingUtils.bc $< -o $@
+# We build a separate testingUtils bitcode for each test, to make sure parallel
+# tests don't interact with one another.
+Output/%_testingUtils.bc: _testingUtils.c $(LLVMAS) Output/.dir
+ $(LLVMCC) -emit-llvm $(CPPFLAGS) $(LCCFLAGS) -c $< -o $@
+
+Output/linked_%.bc: Output/%.bc Output/%_testingUtils.bc
+ $(LLVMLD) $< Output/$*_testingUtils.bc -o $@
.PRECIOUS: Output/.dir