[llvm-commits] CVS: llvm-java/test/Makefile.test

Alkis Evlogimenos alkis at cs.uiuc.edu
Wed Jan 5 19:14:14 PST 2005



Changes in directory llvm-java/test:

Makefile.test updated: 1.30 -> 1.31
---
Log message:

Capture stdout and stderr in different files and pass the test if stdout matches but stderr doesn't (and give a warning)

---
Diffs of the changes:  (+8 -7)

Index: llvm-java/test/Makefile.test
diff -u llvm-java/test/Makefile.test:1.30 llvm-java/test/Makefile.test:1.31
--- llvm-java/test/Makefile.test:1.30	Wed Dec 15 16:15:16 2004
+++ llvm-java/test/Makefile.test	Wed Jan  5 21:14:03 2005
@@ -44,19 +44,20 @@
 .PRECIOUS: %.out-nat %.out-jit %.diff
 
 # rule to run a .class file with the jvm
-%.out-nat: %.class
+%.out-nat %.err-nat: %.class
 	-$(Verb)LD_LIBRARY_PATH=$(LibDir) $(JAVA) -cp Output $(notdir $*) \
-		> $*.out-nat 2>&1
+		> $*.out-nat 2> $*.err-nat
 
 # rule to run a .class file with the llvm jit
-%.out-jit: %.llvm.bc
-	-$(Verb)$(LLI) $< > $*.out-jit 2>&1
+%.out-jit %.err-jit: %.llvm.bc
+	-$(Verb)$(LLI) $< > $*.out-jit 2> $*.err-jit
 
 # rule to diff test output
-%.diff: %.out-nat %.out-jit
+%.diff: %.out-nat %.err-nat %.out-jit %.err-jit
 	$(Verb)diff $*.out-nat $*.out-jit > $@ \
-	&& echo "PASS: $(notdir $*)" \
-	|| echo "FAIL: $(notdir $*)"
+	&& echo -n "PASS: $(notdir $*)" || echo -n "FAIL: $(notdir $*)"
+	$(Verb)diff $*.err-nat $*.err-jit > /dev/null \
+	&& echo "" || echo " (stderr mismatch)"
 
 # rule to link bytecode with runtime
 %.llvm %.llvm.bc: %.linked.bc $(LibDir)/libjrt.bca $(EXTRA_OBJS) $(LOPT)






More information about the llvm-commits mailing list