Built environment of test-suit and add two test-suit:enum, struct_rename

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-sploving@11497 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Baozeng Ding 2009-08-04 13:08:44 +00:00
commit b81ec23048
13 changed files with 160 additions and 30 deletions

View file

@ -1,5 +1,5 @@
// builder the *.so
exec builder.sce;
exec example_builder.sce;
// loader the *.so
exec loader.sce;

View file

@ -1,5 +1,5 @@
// builder the *.so
exec builder.sce;
exec example_builder.sce;
// loader the *.so
exec loader.sce;

View file

@ -1,5 +1,5 @@
// builder the *.so
exec builder.sce;
exec example_builder.sce;
// loader the *.so
exec loader.sce;

View file

@ -1,5 +1,5 @@
// builder the *.so
exec builder.sce
exec example_builder.sce
// loader the *.so
exec loader.sce

View file

@ -1,5 +1,5 @@
// builder the *.so
exec builder.sce
exec example_builder.sce
// loader the *.so
exec loader.sce

View file

@ -1,5 +1,5 @@
// builder the *.so
exec builder.sce;
exec example_builder.sce;
// loader the *.so
exec loader.sce;

View file

@ -1,5 +1,5 @@
// builder the *.so
exec builder.sce
exec example_builder.sce
//loader the *.so
exec loader.sce

View file

@ -1,5 +1,5 @@
// builder the *.so
exec builder.sce
exec example_builder.sce
//loader the *.so
exec loader.sce

View file

@ -0,0 +1,40 @@
#######################################################################
# Makefile for scilab test-suite
#######################################################################
LANGUAGE = scilab
SCILAB = scilab
SCRIPTSUFFIX = _runme.sci
srcdir = .
top_srcdir = ../../..
top_builddir = ../../..
include $(srcdir)/../common.mk
# Overridden variables here
# none!
# Rules for the different types of tests
%.cpptest:
%.ctest:
$(setup)
+$(swig_and_compile_c)
$(run_testcase)
%.multicpptest:
# Runs the testcase. A testcase is only run if
# a file is found which has _runme.sci appended after the testcase name.
run_testcase = \
if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then ( \
env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH $(RUNTOOL) $(SCILAB) -nwni < $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ; ) \
fi; \
# Clean: remove the generated .sci file
%.clean:
@rm -f $*.sci *_wrap.c
clean:
$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile scilab_clean

View file

@ -0,0 +1,45 @@
#######################################################################
# Makefile for scilab test-suite
#######################################################################
LANGUAGE = scilab
SCILAB = @SCILAB@
SCRIPTSUFFIX = _runme.sci
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
C_TEST_CASES += \
integers \
include $(srcdir)/../common.mk
# Overridden variables here
# none!
# Rules for the different types of tests
%.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.sci appended after the testcase name.
run_testcase = \
if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then ( \
env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH $(RUNTOOL) $(SCILAB) $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ; ) \
fi; \
# Clean: remove the generated .sci file
%.clean:
@rm -f $*.sci *_wrap.c
clean:
$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile scilab_clean

View file

@ -0,0 +1,9 @@
exec enums_builder.sce
exec loader.sce
exec enums.sce
bar1(foo1.CSP_ITERATION_BWD)
bar2(foo3.ABCDE)
bar3(foo3.FGHJI)
exit

View file

@ -0,0 +1,8 @@
exec struct_rename_builder.sce
exec loader.sce
a = new_Bar();
Bar_x_set(100);
Bar_x_get();
exit