Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Properly say the test suite that java tests are not run when it's the case
[simgrid.git] / examples / java / java_test.mk
1 #########################
2 # How to compile the code
3 # All this to only get a dumb javac *java... Automake still have issues with java
4
5 JAVAROOT=.
6
7 AM_JAVACFLAGS=-classpath $(top_srcdir)/src/simgrid.jar:.
8
9
10 ##########################
11 # What to do on make check
12 # We need to rely on an external script (../runtest) because automake adds a ./ in front of the test name
13 # We need to override LD_LIBRARY_PATH so that the VM finds the libsimgrid4java.so
14 # We need to override the CLASSPATH to add simgrid.jar and current dir to the picture
15 # We also need to express dependencies manually (in each test dir)
16 # Damn...
17 if HAVE_JAVA
18   TESTS_ENVIRONMENT=LD_LIBRARY_PATH="$(top_srcdir)/src/.libs:$$LD_LIBRARY_PATH" \
19                     CLASSPATH=".:$(top_srcdir)/src/simgrid.jar:$$CLASSPATH" \
20                     $(srcdir)/../runtest 
21 else
22   TESTS_ENVIRONMENT=DO_NOT_HAVE_JAVA=1 $(srcdir)/../runtest 
23 endif
24
25 # declare that we must recompile everything before lauching tests
26 $(TESTS): classnoinst.stamp