scilab: fix test-suite (scripts were not executed)
This commit is contained in:
parent
8e791562a4
commit
a2c2aaec80
3 changed files with 11 additions and 20 deletions
|
|
@ -33,7 +33,7 @@ INCLUDES = $(abspath $(srcdir)/..)
|
||||||
|
|
||||||
# Local variables
|
# Local variables
|
||||||
TEST_DIR = $*.dir
|
TEST_DIR = $*.dir
|
||||||
RUNME_SCRIPT = $(TEST_DIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX)
|
RUNME_SCRIPT = $(SCRIPTPREFIX)$*$(SCRIPTSUFFIX)
|
||||||
SRC_RUNME_SCRIPT = $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX)
|
SRC_RUNME_SCRIPT = $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX)
|
||||||
|
|
||||||
# Hide too long identifier warnings
|
# Hide too long identifier warnings
|
||||||
|
|
@ -80,7 +80,7 @@ setup = \
|
||||||
# a file is found which has _runme.sci appended after the testcase name.
|
# a file is found which has _runme.sci appended after the testcase name.
|
||||||
run_testcase = \
|
run_testcase = \
|
||||||
if [ -f $(RUNME_SCRIPT) ]; then ( \
|
if [ -f $(RUNME_SCRIPT) ]; then ( \
|
||||||
env LD_LIBRARY_PATH=$(srcdir)/$(TEST_DIR):$$LD_LIBRARY_PATH $(RUNTOOL) $(SCILAB) $(SCILAB_OPT) -f $(RUNME_SCRIPT); )\
|
env LD_LIBRARY_PATH=$(srcdir):$$LD_LIBRARY_PATH $(RUNTOOL) $(SCILAB) $(SCILAB_OPT) -f $(RUNME_SCRIPT); )\
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean: remove the generated files
|
# Clean: remove the generated files
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,11 @@
|
||||||
// Clean files
|
// Clean files
|
||||||
|
|
||||||
exec(fullfile(testdir, "cleaner.sce"), -1);
|
exec("cleaner.sce", -1);
|
||||||
|
mdelete("builder.sce");
|
||||||
mdelete(fullfile(testdir, "builder.sce"));
|
mdelete("cleaner.sce");
|
||||||
mdelete(fullfile(testdir, "cleaner.sce"));
|
mdelete(swigtestname + "_wrap.c");
|
||||||
mdelete(fullfile(testdir, swigtestname + "_wrap.c"));
|
mdelete(swigtestname + "_wrap.cxx");
|
||||||
mdelete(fullfile(testdir, swigtestname + "_wrap.cxx"));
|
mdelete(swigtestname + ".i");
|
||||||
mdelete(fullfile(testdir, swigtestname + ".i"));
|
|
||||||
removedir(testdir);
|
|
||||||
|
|
||||||
//mprintf("******************\n")
|
|
||||||
//mprintf("* TEST SUCCEEDED *\n")
|
|
||||||
//mprintf("******************\n")
|
|
||||||
|
|
||||||
// Exit from Scilab
|
// Exit from Scilab
|
||||||
exit
|
exit
|
||||||
|
|
@ -6,19 +6,16 @@ ilib_verbose(0);
|
||||||
[units, typ, names] = file(1);
|
[units, typ, names] = file(1);
|
||||||
swigtestname = strsubst(fileparts(names, "fname"), "_runme", "");
|
swigtestname = strsubst(fileparts(names, "fname"), "_runme", "");
|
||||||
|
|
||||||
// Test build dir
|
|
||||||
testdir = swigtestname + ".dir";
|
|
||||||
|
|
||||||
// Does the library exists? If not then exit!
|
// Does the library exists? If not then exit!
|
||||||
libname = "lib" + swigtestname + getdynlibext();
|
libname = "lib" + swigtestname + getdynlibext();
|
||||||
if ~isfile(fullfile(testdir, libname)) then
|
if ~isfile(libname) then
|
||||||
mfprintf(0, "*** LIBRARY NOT FOUND: %s ***\n", libname);
|
mfprintf(0, "*** LIBRARY NOT FOUND: %s ***\n", libname);
|
||||||
exit(1)
|
exit(1)
|
||||||
end
|
end
|
||||||
|
|
||||||
// Load library
|
// Load library
|
||||||
try
|
try
|
||||||
exec(fullfile(testdir, "loader.sce"), -1);
|
exec("loader.sce", -1);
|
||||||
catch
|
catch
|
||||||
mfprintf(0, "*** LOADER EXECUTION FAILED ***\n");
|
mfprintf(0, "*** LOADER EXECUTION FAILED ***\n");
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue