blob: affe202abed04935045f5d2e979d4f1f26df9ed9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
|
#######################################################################
# Makefile for hhvm test-suite
#######################################################################
LANGUAGE = hhvm
SCRIPTSUFFIX = _runme.php
srcdir = @srcdir@
top_srcdir = ../@top_srcdir@
top_builddir = ../@top_builddir@
OBJEXT = @OBJEXT@
SO = @SO@
FAILING_C_TESTS += \
nested \
nested_extend_c \
nested_structs \
typemap_subst \
FAILING_CPP_TESTS = \
aggregate \
apply_strings \
autodoc \
catches \
constant_pointers \
contract \
cpp_basic \
default_args \
default_target \
dynamic_cast \
exception_order \
ignore_parameter \
ignore_template_constructor \
li_boost_shared_ptr \
li_boost_shared_ptr_bits \
li_std_combinations \
li_std_deque \
li_std_except \
li_std_except_as_class \
li_std_map \
li_std_pair \
li_std_pair_using \
li_std_vector \
li_std_vector_enum \
li_std_vector_member_var \
li_std_vector_ptr \
li_typemaps \
li_typemaps_apply \
long_long_apply \
member_funcptr_galore \
member_pointer \
minherit \
namespace_spaces \
naturalvar_more \
operator_overload \
operator_overload_break \
overload_rename \
overload_return_type \
sizet \
smart_pointer_const_overload \
smart_pointer_inherit \
smart_pointer_template_defaults_overload \
special_variables \
template_default \
template_default_arg \
template_default_arg_overloaded \
template_extend_overload \
template_opaque \
template_type_namespace \
template_typedef_fnc \
typemap_namespace \
typemap_qualifier_strip \
valuewrapper_opaque \
wrapmacro \
FAILING_MULTI_CPP_TESTS = \
clientdata_prop \
imports \
import_stl \
packageoption \
mod \
template_typedef_import \
multi_import \
include $(srcdir)/../common.mk
# Overridden variables here
SRCDIR = ../$(srcdir)/
# Custom tests - tests with additional commandline options
prefix.cpptest: SWIGOPT += -prefix Project
# write out tests without a _runme.php
missingcpptests:
for test in $(CPP_TEST_CASES) ; do test -f $${test}_runme.php || echo $${test}; done
missingctests:
for test in $(C_TEST_CASES) ; do test -f $${test}_runme.php || echo $${test}; done
missingtests: missingcpptests missingctests
# Rules for the different types of tests
%.cpptest:
$(setup)
+(cd $* && $(swig_and_compile_cpp))
+$(run_testcase)
%.ctest:
$(setup)
+(cd $* && $(swig_and_compile_c))
+$(run_testcase)
%.multicpptest:
$(setup)
+(cd $* && $(swig_and_compile_multi_cpp))
+$(run_testcase)
# Makes a directory for the testcase if it does not exist
setup = \
if [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
echo "$(ACTION)ing $(LANGUAGE) testcase $* (with run test)" ; \
else \
echo "$(ACTION)ing $(LANGUAGE) testcase $*" ; \
fi; \
if [ ! -d $* ]; then \
mkdir $* && \
sed -e 's|$$testcase|$*|g;' $(srcdir)/config.cmake > $*/config.cmake; \
fi;
# Runs the testcase. Tries to run testcase_runme.php.
run_testcase = \
if [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
$(MAKE) -f $*/$(top_builddir)/$(EXAMPLES)/Makefile HHVM_SCRIPT=$(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) TARGET='$*/$*' RUNTOOL='$(RUNTOOL)' hhvm_run; \
fi
# Clean: remove testcase directories
%.clean:
@if [ -d $* ]; then \
rm -rf $*; \
fi
clean:
rm -f ext_* *~ .~* example.php run-test CMakeLists.txt
rm -rf build
rm -f *.@OBJEXT@ *$(SO)
|