Commit 9d612ba8 authored by Götz Lindenmaier's avatar Götz Lindenmaier
Browse files

Added automatic test procedure to firmjni.

[r866]
parent 14c5ad6e
......@@ -44,6 +44,7 @@ libfirm.a: subdir_all $(XOFILES) $(OFILES)
testprograms: libfirm.a
$(MAKE) -C testprograms
$(MAKE) -C firmjni
# gernerate program documentation
......@@ -76,6 +77,7 @@ config.status: configure
test::
$(MAKE) -C testprograms test;
$(MAKE) -C firmjni test;
test-reference::
$(MAKE) -C testprograms reference;
......
......@@ -115,6 +115,10 @@ install:
# cp *.java @javadir@
# cp *.class @javadir@
test: jni
$(MAKE) -C testprograms test
clean:
rm -rf sources *.c *.h *.o
......
......@@ -10,6 +10,8 @@ srcdir = @srcdir@
topdir = ..
subdir = testprograms
DIFF ?= diff
SOURCEPATH = @top_srcdir@/firmjni/testprograms/
SOURCES := Makefile.in \
......@@ -19,6 +21,8 @@ MYCLASSPATH = $(CLASSPATH):../..
LD_LIBRARY_PATH += $srcdir/firmjni
run_bin_EXAMPLES = java -cp $(MYCLASSPATH) -Djava.library.path=$(topdir) Empty; \
java -cp $(MYCLASSPATH) -Djava.library.path=$(topdir) IfElseExample
%.class: $(top_srcdir)/firmjni/testprograms/%.java
javac -d . $<
......@@ -32,12 +36,21 @@ empty:
ifelseexample:
javac -classpath $(MYCLASSPATH) -d . $(SOURCEPATH)IfElseExample.java
test: realclean all
($(run_bin_EXAMPLES))>results.txt
($(DIFF) results.txt $(SOURCEPATH)/run-results.txt) || (echo Firmjni test failed; exit 1)
@echo Firmjni test successful
reference: realclean all
($(run_bin_EXAMPLES))>$(SOURCEPATH)/run-results.txt
run: empty ifelseexample
java -cp $(MYCLASSPATH) -Djava.library.path=$(topdir) Empty
java -cp $(MYCLASSPATH) -Djava.library.path=$(topdir) IfElseExample
clean:
-rm *.class
-rm *.class results.txt
realclean: clean
-rm *.vcg
javac -classpath /usr/public2/java/jdk1.3.1-sun/jre/lib/rt.jar:.:../.. -d . ../../../firmjni/testprograms/Empty.java
java -cp /usr/public2/java/jdk1.3.1-sun/jre/lib/rt.jar:.:../.. -Djava.library.path=.. Empty
Creating an IR graph: EMPTY...
Done building the graph. Dumping it.
use xvcg to view this graph:
/ben/goetz/bin/xvcg GRAPHNAME
Creating an IR graph: IfElseExample...
Optimization: 2
new Nodes: 26,
old Nodes: 27, 25, 26,
Optimization: 2
new Nodes: 10,
old Nodes: 28, 25, 10,
Optimization: 4
new Nodes: 18,
old Nodes: 33, 26,
Optimization: 1
new Nodes: 21,
old Nodes: 48, 21,
Optimization: 1
new Nodes: 19,
old Nodes: 51, 19,
Done building the graph. Optimizing it.
Optimization: 4
new Nodes: 18,
old Nodes: 33, 26,
use xvcg to view this graph:
/ben/goetz/bin/xvcg GRAPHNAME
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment