blob: affe202abed04935045f5d2e979d4f1f26df9ed9 [file] [log] [blame]
#######################################################################
# 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)