####################################################################### # $Header$ # Makefile for python test-suite ####################################################################### LANGUAGE = python PYTHON = python SCRIPTSUFFIX = _runme.py srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ CPP_TEST_CASES += \ argcargvtest \ attributetest \ autodoc \ callback \ complextest \ director_stl \ file_test \ implicittest \ inout \ inplaceadd \ kwargs \ lib_std_except \ lib_std_vectora \ lib_std_map \ lib_std_wstring \ nondynamic \ primitive_types \ std_containers \ C_TEST_CASES += \ file_test \ nondynamic # # This test only works with modern C compilers # #C_TEST_CASES += \ # complextest include $(srcdir)/../common.mk # Overridden variables here LIBS = -L. # Rules for the different types of tests %.cpptest: $(setup) \ ($(swig_and_compile_cpp); ) &&\ $(run_testcase) %.ctest: $(setup) \ ($(swig_and_compile_c); ) &&\ $(run_testcase) %.multicpptest: $(setup) \ ($(swig_and_compile_multi_cpp); ) &&\ $(run_testcase) # Runs the testcase. A testcase is only run if # a file is found which has _runme.py appended after the testcase name. run_testcase = \ if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then ( \ env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH PYTHONPATH=$(srcdir):$$PYTHONPATH $(PYTHON) $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX);) \ fi; # Clean: remove the generated .py file %.clean: @rm -f $*.py; clean: $(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile python_clean