Merge pull request #78 from smarchetto/gsoc2012-scilab
Scilab: support of Scilab 5.3.3 + improve the test suite
This commit is contained in:
commit
9f08e04428
32 changed files with 224 additions and 150 deletions
|
|
@ -1576,8 +1576,7 @@ SCILAB_INCLUDE = $(DEFS) @SCILABINCLUDE@
|
|||
SCILAB_LIB = @SCILABLIB@
|
||||
SCILAB = @SCILAB@
|
||||
SCILABOPT =
|
||||
SCILAB_START_OPT = @SCILABSTARTOPT@
|
||||
SCILAB_VERSION = @SCILABVERSION@
|
||||
SCILAB_STARTOPT = @SCILABSTARTOPT@
|
||||
|
||||
# ----------------------------------------------------------------
|
||||
# Build a C dynamically loadable module
|
||||
|
|
@ -1598,7 +1597,7 @@ scilab: $(SRCS)
|
|||
fi \
|
||||
fi
|
||||
@if [ -f builder.sce ]; then \
|
||||
env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH SCILABPATH=$(srcdir):$$SCILABPATH echo 'exit(1)' |$(SCILAB) $(SCILAB_START_OPT) -f builder.sce; \
|
||||
env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH SCILABPATH=$(srcdir):$$SCILABPATH echo 'exit(1)' |$(SCILAB) $(SCILAB_STARTOPT) -f builder.sce; \
|
||||
fi
|
||||
|
||||
# ----------------------------------------------------------------
|
||||
|
|
@ -1620,7 +1619,7 @@ scilab_cpp: $(SRCS)
|
|||
fi \
|
||||
fi
|
||||
@if [ -f builder.sce ]; then \
|
||||
env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH SCILABPATH=$(srcdir):$$SCILABPATH echo 'exit(1)' |$(SCILAB) $(SCILAB_START_OPT) -f builder.sce; \
|
||||
env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH SCILABPATH=$(srcdir):$$SCILABPATH echo 'exit(1)' |$(SCILAB) $(SCILAB_STARTOPT) -f builder.sce; \
|
||||
fi
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
|
|
@ -1628,21 +1627,22 @@ scilab_cpp: $(SRCS)
|
|||
# -----------------------------------------------------------------
|
||||
|
||||
scilab_run:
|
||||
@env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH SCILABPATH=$(srcdir):$$SCILABPATH $(SCILAB) -nwni -noatomsautoload -nb -f runme.sci
|
||||
@env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH SCILABPATH=$(srcdir):$$SCILABPATH $(SCILAB) $(SCILAB_STARTOPT) -f runme.sci
|
||||
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# Debugging a scilab example
|
||||
# -----------------------------------------------------------------
|
||||
|
||||
scilab_debug:
|
||||
@env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH SCILABPATH=$(srcdir):$$SCILABPATH $(SCILAB) -noatomsautoload -nb -debug -f runme.sci
|
||||
@env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH SCILABPATH=$(srcdir):$$SCILABPATH $(SCILAB) $(SCILAB_STARTOPT) -f runme.sci
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# Version display
|
||||
# Scilab version
|
||||
# -----------------------------------------------------------------
|
||||
|
||||
scilab_version:
|
||||
echo $(SCILAB_VERSION)
|
||||
echo `$(SCILAB) -version|head -1|sed -e 's|Scilab version \"\(.*\)\"|\1|g'`
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# Cleaning the scilab examples
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ matrix
|
|||
matrix2
|
||||
pointer
|
||||
simple
|
||||
std_set
|
||||
std_vector/std_vector
|
||||
std_vector/std_vector_as_function_argument
|
||||
struct
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// loader the *.so
|
||||
lines(0);
|
||||
exec loader.sce;
|
||||
|
||||
// ----- Object creation -----
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// loader the *.so
|
||||
lines(0);
|
||||
exec loader.sce;
|
||||
|
||||
printf("ICONST = %i (should be 42)\n", ICONST_get());
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// loader the *.so
|
||||
lines(0);
|
||||
exec loader.sce;
|
||||
|
||||
// Call our gcd() function
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// loader the *.so
|
||||
lines(0);
|
||||
exec loader.sce;
|
||||
|
||||
// Print out the value of some enums
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// loader the *.so
|
||||
lines(0);
|
||||
exec loader.sce;
|
||||
|
||||
a = 37
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// loader the *.so
|
||||
exec loader.sce
|
||||
lines(0);
|
||||
exec loader.sce;
|
||||
|
||||
// create a new matrix
|
||||
x = new_matrix();
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
exec loader.sce
|
||||
lines(0);
|
||||
exec loader.sce;
|
||||
|
||||
// Test lib double matrix functions
|
||||
disp("Call lib function getDoubleMatrix()");
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// loader the *.so
|
||||
exec loader.sce
|
||||
lines(0);
|
||||
exec loader.sce;
|
||||
|
||||
// First create some objects using the pointer library.
|
||||
printf("Testing the pointer library\n")
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// loader the *.so
|
||||
lines(0);
|
||||
exec loader.sce;
|
||||
|
||||
// Call our gcd() function
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
lines(0);
|
||||
exec loader.sce;
|
||||
SWIG_Init();
|
||||
|
||||
|
|
@ -29,3 +30,5 @@ disp("concat this list with the list of string {''cc'', ''dd'', ''ee'', ''ff''}
|
|||
ss3 = concat_string_list(ss, ss2);
|
||||
disp(ss3);
|
||||
|
||||
exit
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
lines(0);
|
||||
exec loader.sce;
|
||||
SWIG_Init();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// file: runme.sci
|
||||
lines(0);
|
||||
exec loader.sce;
|
||||
SWIG_Init();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
lines(0);
|
||||
exec loader.sce;
|
||||
SWIG_Init();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
//loader the *.so
|
||||
exec loader.sce
|
||||
lines(0);
|
||||
exec loader.sce;
|
||||
|
||||
//create a struct
|
||||
a=new_Bar();
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
lines(0);
|
||||
exec loader.sce;
|
||||
|
||||
function printShape(shape, name)
|
||||
printf("\nShape %s position:\n", name);
|
||||
printf(" (x, y) = (%f, %f)\n", ShapeDouble_x_get(shape), ShapeDouble_y_get(shape))
|
||||
|
|
@ -9,8 +12,6 @@ function printShape(shape, name)
|
|||
printf("\n");
|
||||
endfunction
|
||||
|
||||
exec loader.sce;
|
||||
|
||||
printf("Creating some objects:\n");
|
||||
c = new_CircleDouble(10);
|
||||
s = new_SquareDouble(10);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
lines(0);
|
||||
|
||||
//loader the *.so
|
||||
exec loader.sce
|
||||
exec loader.sce;
|
||||
|
||||
// Try to set the values of some global variables
|
||||
ivar_set(42);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,11 @@
|
|||
%module constructor_exception
|
||||
|
||||
#ifdef SWIGSCILAB
|
||||
%inline %{
|
||||
#undef Error
|
||||
%}
|
||||
#endif
|
||||
|
||||
%inline %{
|
||||
class Error {
|
||||
};
|
||||
|
|
|
|||
|
|
@ -15,21 +15,45 @@ top_builddir = @top_builddir@
|
|||
# - member_pointer (C++)
|
||||
# - typemap_variables (C++)
|
||||
|
||||
# configure cache to speed up test run
|
||||
CONF_CACHE=$(CURDIR)/test-suite.config.cache
|
||||
CONFIG_SITE=$(CURDIR)/test-suite.config.site
|
||||
export CONFIG_SITE
|
||||
|
||||
enable_config_cache = \
|
||||
echo 'cache_file=$(CONF_CACHE)' > $(CONFIG_SITE)
|
||||
|
||||
disable_config_cache:
|
||||
rm -f $(CONF_CACHE)
|
||||
rm -f $(CONFIG_SITE)
|
||||
CONFIG_SITE=
|
||||
|
||||
# need reset cache before multicpptest
|
||||
reset_config_cache = \
|
||||
rm -f $(CONF_CACHE)
|
||||
|
||||
# disable cache at the end of test-suite
|
||||
# use trick for this: 'extra test cases' end target
|
||||
EXTRA_TEST_CASES = disable_config_cache
|
||||
|
||||
include $(srcdir)/../common.mk
|
||||
|
||||
# Rules for the different types of tests
|
||||
%.cpptest:
|
||||
$(setup)
|
||||
$(enable_config_cache)
|
||||
+$(swig_and_compile_cpp)
|
||||
$(run_testcase)
|
||||
|
||||
%.ctest:
|
||||
$(setup)
|
||||
$(enable_config_cache)
|
||||
+$(swig_and_compile_c)
|
||||
$(run_testcase)
|
||||
|
||||
%.multicpptest:
|
||||
$(setup)
|
||||
$(reset_config_cache)
|
||||
+$(swig_and_compile_multi_cpp)
|
||||
$(run_testcase)
|
||||
|
||||
|
|
@ -42,7 +66,7 @@ run_testcase = \
|
|||
|
||||
# Clean: remove the generated files
|
||||
%.clean:
|
||||
@rm -f builder.sce loader.sce cleaner.sce $*_wrap.c $*_wrap.cxx lib$*lib.*
|
||||
@rm -f builder.sce loader.sce cleaner.sce $*_wrap.c $*_wrap.cxx lib$*lib.* $(CONFIG_SITE) $(CONF_CACHE)
|
||||
|
||||
clean:
|
||||
$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile scilab_clean
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue