1 ## Process this fill with automake to generate Makefile.in
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)
26 if SWFMILL_AS3_SUPPORT
27 DIR_TRACE_AS3 = trace-as3
31 if SWFMILL_FUNCTION2_FLAGS_ORDER_CORRECT
32 DIR_TRACE_AS2 = trace-as2
35 SUBDIRS = $(DIR_TRACE_AS2) $(DIR_TRACE_AS3)
42 ## Self-contained XML tests
44 mixed-bytecode-as2.xml \
47 jump_to_prev_block.xml \
54 initaction_in_definesprite.xml \
55 zeroframe_definesprite.xml \
58 Try-without-jump.xml \
60 tags_after_last_showframe.xml \
64 mixed-bytecode-as3.xml \
67 # XML tests that rely on comparing trace output.
69 EXTRA_DIST = $(SC_AS2_XMLTESTS) \
71 gen-swfmill-trace-runner.sh \
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 \
90 $(top_builddir)/librender/libgnashrender.la \
93 SC_XMLTESTS_OUT = $(SC_AS2_XMLTESTS:.xml=.swf)
95 # Dependencies for all self-contained SWF tests
99 mixed-bytecode-as2-runner \
100 jump_after_end-runner \
101 jump_to_prev_block-runner \
102 dict_override-runner \
105 dict_callframe-runner \
108 initaction_in_definesprite-runner \
109 zeroframe_definesprite-runner \
111 Try-without-jump-runner \
112 tags_after_last_showframe-runner \
116 backgroundTestRunner \
117 missing_bitmapTestRunner \
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 > $@
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 > $@
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 > $@
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 > $@
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 > $@
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 > $@
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 > $@
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 > $@
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 > $@
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 > $@
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 > $@
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 > $@
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 > $@
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 > $@
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 > $@
181 backgroundTestRunner_SOURCES = \
182 backgroundTestRunner.cpp \
184 backgroundTestRunner_CXXFLAGS = \
185 -DSRCDIR='"$(srcdir)"' \
186 -DTGTDIR='"$(abs_builddir)"' \
188 backgroundTestRunner_LDADD = \
189 $(top_builddir)/testsuite/libtestsuite.la \
192 backgroundTestRunner_DEPENDENCIES = \
193 $(top_builddir)/testsuite/libtestsuite.la \
197 missing_bitmapTestRunner_SOURCES = \
198 missing_bitmapTestRunner.cpp \
200 missing_bitmapTestRunner_CXXFLAGS = \
201 -DSRCDIR='"$(srcdir)"' \
202 -DTGTDIR='"$(abs_builddir)"' \
204 missing_bitmapTestRunner_LDADD = \
205 $(top_builddir)/testsuite/libtestsuite.la \
208 missing_bitmapTestRunner_DEPENDENCIES = \
209 $(top_builddir)/testsuite/libtestsuite.la \
214 $(SWFMILL) -v xml2swf $(@:%.swf=$(srcdir)/%.xml) $@
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 \
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; \
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; \
237 site-update: site.exp
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