Add automated tests on function-type FSCommand parameter passing.
[gnash.git] / testsuite / misc-swfmill.all / Makefile.am
blobff20be9bcd2674d4f2a3265a13e9fb08eed5f4d1
1 ## Process this fill with automake to generate Makefile.in
2
3 #   Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012
4 #   Free Software Foundation, Inc.
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
20 AUTOMAKE_OPTIONS = dejagnu -Wno-portability
22 abs_topbuilddir=$(shell cd $(top_builddir); pwd)
23 abs_builddir=$(shell cd $(top_builddir)/testsuite/misc-swfmill.all; pwd)
25 if ENABLE_AVM2
26 if SWFMILL_AS3_SUPPORT
27 DIR_TRACE_AS3 = trace-as3
28 endif
29 endif
31 if SWFMILL_FUNCTION2_FLAGS_ORDER_CORRECT
32 DIR_TRACE_AS2 = trace-as2
33 endif
35 SUBDIRS = $(DIR_TRACE_AS2) $(DIR_TRACE_AS3)
37 DIST_SUBDIRS = \
38         trace-as2 \
39         trace-as3 \
40         $(NULL)
42 ## Self-contained XML tests
43 SC_AS2_XMLTESTS = \
44         mixed-bytecode-as2.xml \
45         hello.xml \
46         jump_after_end.xml \
47         jump_to_prev_block.xml \
48         dict_override.xml \
49         func_dict.xml \
50         afunc_dict.xml \
51         dict_cross.xml \
52         dict_callframe.xml \
53         dict_event.xml \
54         initaction_in_definesprite.xml \
55         zeroframe_definesprite.xml \
56         background.xml \
57         registers.xml \
58         Try-without-jump.xml \
59         missing_bitmap.xml \
60         tags_after_last_showframe.xml \
61         $(NULL)
63 SC_AS3_XMLTESTS = \
64         mixed-bytecode-as3.xml  \
65         $(NULL)
67 # XML tests that rely on comparing trace output.
69 EXTRA_DIST = $(SC_AS2_XMLTESTS) \
70              $(SC_AS3_XMLTESTS) \
71              gen-swfmill-trace-runner.sh \
72              $(NULL)
74 AM_CPPFLAGS = \
75         -I$(top_srcdir)/libbase \
76         -I$(top_srcdir)/libmedia \
77         -I$(top_srcdir)/libsound \
78         -I$(top_srcdir)/librender \
79         -I$(top_srcdir)/libcore \
80         -I$(top_srcdir)/libcore/swf \
81         -I$(top_srcdir)/libcore/parser  \
82         -I$(top_srcdir)/libcore/vm \
83         -I$(top_srcdir)/libcore/asobj \
84         -I$(top_srcdir)/testsuite \
85         $(BOOST_CFLAGS) \
86         $(PTHREAD_CFLAGS) \
87         $(NULL)
89 AM_LDFLAGS = \
90         $(top_builddir)/librender/libgnashrender.la \
91         $(NULL)
93 SC_XMLTESTS_OUT = $(SC_AS2_XMLTESTS:.xml=.swf)
95 # Dependencies for all self-contained SWF tests
96 $(SC_XMLTESTS_OUT) : 
98 check_SCRIPTS = \
99         mixed-bytecode-as2-runner \
100         jump_after_end-runner \
101         jump_to_prev_block-runner \
102         dict_override-runner \
103         func_dict-runner \
104         dict_cross-runner \
105         dict_callframe-runner \
106         dict_event-runner \
107         afunc_dict-runner \
108         initaction_in_definesprite-runner \
109         zeroframe_definesprite-runner \
110         registers-runner \
111         Try-without-jump-runner \
112         tags_after_last_showframe-runner \
113         $(NULL)
115 check_PROGRAMS = \
116         backgroundTestRunner \
117         missing_bitmapTestRunner \
118         $(NULL)
120 # NOTE: this test is disabled due to missing AVM2 support
121 mixed-bytecode-as3-runner: $(srcdir)/../generic-testrunner.sh mixed-bytecode-as3.swf Makefile
122         sh $(srcdir)/../generic-testrunner.sh -r 1 -c "AS3" $(top_builddir) mixed-bytecode-as3.swf > $@
123         chmod 755 $@
125 mixed-bytecode-as2-runner: $(srcdir)/../generic-testrunner.sh mixed-bytecode-as2.swf Makefile
126         sh $(srcdir)/../generic-testrunner.sh -r 1 -c "AS2" $(top_builddir) mixed-bytecode-as2.swf > $@
127         chmod 755 $@
129 jump_after_end-runner: $(srcdir)/../generic-testrunner.sh jump_after_end.swf Makefile
130         sh $(srcdir)/../generic-testrunner.sh -r 1 -c "END OF TEST" $(top_builddir) jump_after_end.swf > $@
131         chmod 755 $@
133 jump_to_prev_block-runner: $(srcdir)/../generic-testrunner.sh jump_to_prev_block.swf Makefile
134         sh $(srcdir)/../generic-testrunner.sh -r 1 -C "ABA" $(top_builddir) jump_to_prev_block.swf > $@
135         chmod 755 $@
137 dict_override-runner: $(srcdir)/../generic-testrunner.sh dict_override.swf Makefile
138         sh $(srcdir)/../generic-testrunner.sh -r 1 -c "END OF TEST" $(top_builddir) dict_override.swf > $@
139         chmod 755 $@
141 dict_cross-runner: $(srcdir)/../generic-testrunner.sh dict_cross.swf Makefile
142         sh $(srcdir)/../generic-testrunner.sh -r 1 -c "END OF TEST" $(top_builddir) dict_cross.swf > $@
143         chmod 755 $@
145 dict_callframe-runner: $(srcdir)/../generic-testrunner.sh dict_callframe.swf Makefile
146         sh $(srcdir)/../generic-testrunner.sh -r 1 -c "END OF TEST" $(top_builddir) dict_callframe.swf > $@
147         chmod 755 $@
149 dict_event-runner: $(srcdir)/../generic-testrunner.sh dict_event.swf Makefile
150         sh $(srcdir)/../generic-testrunner.sh -r 1 -c "END OF TEST" $(top_builddir) dict_event.swf > $@
151         chmod 755 $@
153 func_dict-runner: $(srcdir)/../generic-testrunner.sh func_dict.swf Makefile
154         sh $(srcdir)/../generic-testrunner.sh -r 1 -c "END OF TEST" $(top_builddir) func_dict.swf > $@
155         chmod 755 $@
157 afunc_dict-runner: $(srcdir)/../generic-testrunner.sh afunc_dict.swf Makefile
158         sh $(srcdir)/../generic-testrunner.sh -r 1 -c "END OF TEST" $(top_builddir) afunc_dict.swf > $@
159         chmod 755 $@
161 initaction_in_definesprite-runner: $(srcdir)/../generic-testrunner.sh initaction_in_definesprite.swf Makefile
162         sh $(srcdir)/../generic-testrunner.sh -r 1 -c "END OF TEST" $(top_builddir) initaction_in_definesprite.swf > $@
163         chmod 755 $@
165 zeroframe_definesprite-runner: $(srcdir)/../generic-testrunner.sh zeroframe_definesprite.swf Makefile
166         sh $(srcdir)/../generic-testrunner.sh -r 1 -c "END OF TEST" $(top_builddir) zeroframe_definesprite.swf > $@
167         chmod 755 $@
169 registers-runner: $(srcdir)/../generic-testrunner.sh registers.swf Makefile
170         sh $(srcdir)/../generic-testrunner.sh -r 1 -c "END OF TEST" $(top_builddir) registers.swf > $@
171         chmod 755 $@
173 Try-without-jump-runner: $(srcdir)/../generic-testrunner.sh Try-without-jump.swf Makefile
174         sh $(srcdir)/../generic-testrunner.sh -r 1 -c "END OF TEST" $(top_builddir) Try-without-jump.swf > $@
175         chmod 755 $@
177 tags_after_last_showframe-runner: $(srcdir)/../generic-testrunner.sh tags_after_last_showframe.swf Makefile
178         sh $(srcdir)/../generic-testrunner.sh -r 1 -c "\<a1-i1-a2-a3-1\>" $(top_builddir) tags_after_last_showframe.swf > $@
179         chmod 755 $@
181 backgroundTestRunner_SOURCES = \
182         backgroundTestRunner.cpp \
183         $(NULL)
184 backgroundTestRunner_CXXFLAGS = \
185         -DSRCDIR='"$(srcdir)"' \
186         -DTGTDIR='"$(abs_builddir)"' \
187         $(NULL)
188 backgroundTestRunner_LDADD = \
189         $(top_builddir)/testsuite/libtestsuite.la \
190         $(AM_LDFLAGS) \
191         $(NULL)
192 backgroundTestRunner_DEPENDENCIES = \
193         $(top_builddir)/testsuite/libtestsuite.la \
194         background.swf      \
195         $(NULL)
197 missing_bitmapTestRunner_SOURCES = \
198         missing_bitmapTestRunner.cpp \
199         $(NULL)
200 missing_bitmapTestRunner_CXXFLAGS = \
201         -DSRCDIR='"$(srcdir)"' \
202         -DTGTDIR='"$(abs_builddir)"' \
203         $(NULL)
204 missing_bitmapTestRunner_LDADD = \
205         $(top_builddir)/testsuite/libtestsuite.la \
206         $(AM_LDFLAGS) \
207         $(NULL)
208 missing_bitmapTestRunner_DEPENDENCIES = \
209         $(top_builddir)/testsuite/libtestsuite.la \
210         missing_bitmap.swf      \
211         $(NULL)
213 .xml.swf: 
214         $(SWFMILL) -v xml2swf $(@:%.swf=$(srcdir)/%.xml) $@
216 clean-local: 
217         rm -f $(check_SCRIPTS) $(SC_XMLTESTS_OUT) $(TRACE_XMLTESTS_OUT) \
218                 *.log *.trace-gnash *.out \
219                 site.bak site.exp site.exp.bak testrun.sum \
220                 gnash.sum 
223 TEST_DRIVERS = ../simple.exp
224 TEST_CASES = $(check_SCRIPTS) $(check_PROGRAMS)
226 check-DEJAGNU: site-update $(TEST_CASES)
227         @runtest=$(RUNTEST); \
228         if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
229             GNASH_GC_TRIGGER_THRESHOLD=0 GNASHRC=../gnashrc $$runtest $(RUNTESTFLAGS) $(TEST_DRIVERS); true; \
230         else \
231           echo "WARNING: could not find \`runtest'" 1>&2; \
232           for i in "$(TEST_CASES)"; do \
233             GNASH_GC_TRIGGER_THRESHOLD=0 GNASHRC=../gnashrc $(SHELL) $$i; \
234           done; \
235         fi
237 site-update: site.exp
238         @rm -fr site.exp.bak
239         @cp site.exp site.exp.bak
240         @sed -e '/testcases/d' site.exp.bak > site.exp
241         @echo "# This is a list of the pre-compiled testcases" >> site.exp
242         @echo "set testcases \"$(TEST_CASES)\"" >> site.exp