From 8c3e28cfe911a46d2a73d0434a048d60c35635bf Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Fri, 12 Sep 2014 15:18:03 -0700 Subject: Fix up Concrete Makefile to not remove outputs, so tests can run in parallel. --- test/Concrete/Makefile | 40 ++++++++++++++-------------------------- 1 file changed, 14 insertions(+), 26 deletions(-) (limited to 'test') 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 -- cgit 1.4.1