91f45fcfeaa1c88eb1a6cd4006fd5a0312f6ae0d
[cacao.git] / tests / regression / resolving / Makefile.am
1 ## tests/regression/resolving/Makefile.am
2 ##
3 ## Copyright (C) 2007 R. Grafl, A. Krall, C. Kruegel,
4 ## C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
5 ## E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
6 ## J. Wenninger, Institut f. Computersprachen - TU Wien
7 ##
8 ## This file is part of CACAO.
9 ##
10 ## This program is free software; you can redistribute it and/or
11 ## modify it under the terms of the GNU General Public License as
12 ## published by the Free Software Foundation; either version 2, or (at
13 ## your option) any later version.
14 ##
15 ## This program is distributed in the hope that it will be useful, but
16 ## WITHOUT ANY WARRANTY; without even the implied warranty of
17 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18 ## General Public License for more details.
19 ##
20 ## You should have received a copy of the GNU General Public License
21 ## along with this program; if not, write to the Free Software
22 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23 ## 02110-1301, USA.
24
25
26 SUBDIRS = \
27         classes1 \
28         classes2 \
29         classes3
30
31 HARNESS_SOURCE_FILES = \
32         $(srcdir)/TestController.java \
33         $(srcdir)/TestLoader.java
34
35 HARNESS_CLASS_FILES = \
36         TestController.class \
37         TestLoader.class
38
39 TEST_SOURCE_FILES = \
40         $(srcdir)/test_instance_subtype_violated.java \
41         $(srcdir)/test_param_loading_constraint_violated_derived.java \
42         $(srcdir)/test_param_loading_constraint_violated.java \
43         $(srcdir)/test_param_subtype_violated.java \
44         $(srcdir)/test_retval_loading_constraint_violated.java \
45         $(srcdir)/test_return_subtype_ok.java \
46         $(srcdir)/test_return_subtype_violated.java \
47         $(srcdir)/test_simple_lazy_load.java
48
49 TEST_NAMES = \
50         test_instance_subtype_violated \
51         test_param_loading_constraint_violated_derived \
52         test_param_loading_constraint_violated \
53         test_param_subtype_violated \
54         test_retval_loading_constraint_violated \
55         test_return_subtype_ok \
56         test_return_subtype_violated \
57         test_simple_lazy_load
58
59 EXTRA_DIST = $(HARNESS_SOURCE_FILES) $(TEST_SOURCE_FILES)
60
61 CLEANFILES = \
62         *.class
63
64 JAVA      = $(top_builddir)/src/cacao/cacao
65
66 if WITH_CLASSPATH_GNU
67 JAVAFLAGS = -Xbootclasspath:$(top_builddir)/src/lib/classes/:$(CLASSPATH_CLASSES)
68 else
69 JAVAFLAGS = -Xbootclasspath:$(CLASSPATH_CLASSES)
70 endif
71
72 check: $(HARNESS_CLASS_FILES)
73         @for t in $(TEST_NAMES) ; do echo "TEST $$t" ; { $(JAVAC) -d . -classpath . $(srcdir)/$$t.java && LD_LIBRARY_PATH=$(top_builddir)/src/cacao/.libs $(JAVA) $(JAVAFLAGS) $$t ; } || exit 1 ; done
74
75 $(HARNESS_CLASS_FILES): $(HARNESS_SOURCE_FILES)
76         $(JAVAC) -d . $(HARNESS_SOURCE_FILES)
77