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
|
||||
TEST_DIR = $*.dir
|
||||
RUNME_SCRIPT = $(TEST_DIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX)
|
||||
RUNME_SCRIPT = $(SCRIPTPREFIX)$*$(SCRIPTSUFFIX)
|
||||
SRC_RUNME_SCRIPT = $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX)
|
||||
|
||||
# Hide too long identifier warnings
|
||||
|
|
@ -80,7 +80,7 @@ setup = \
|
|||
# a file is found which has _runme.sci appended after the testcase name.
|
||||
run_testcase = \
|
||||
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
|
||||
|
||||
# Clean: remove the generated files
|
||||
|
|
|
|||
|
|
@ -1,17 +1,11 @@
|
|||
// Clean files
|
||||
|
||||
exec(fullfile(testdir, "cleaner.sce"), -1);
|
||||
|
||||
mdelete(fullfile(testdir, "builder.sce"));
|
||||
mdelete(fullfile(testdir, "cleaner.sce"));
|
||||
mdelete(fullfile(testdir, swigtestname + "_wrap.c"));
|
||||
mdelete(fullfile(testdir, swigtestname + "_wrap.cxx"));
|
||||
mdelete(fullfile(testdir, swigtestname + ".i"));
|
||||
removedir(testdir);
|
||||
|
||||
//mprintf("******************\n")
|
||||
//mprintf("* TEST SUCCEEDED *\n")
|
||||
//mprintf("******************\n")
|
||||
exec("cleaner.sce", -1);
|
||||
mdelete("builder.sce");
|
||||
mdelete("cleaner.sce");
|
||||
mdelete(swigtestname + "_wrap.c");
|
||||
mdelete(swigtestname + "_wrap.cxx");
|
||||
mdelete(swigtestname + ".i");
|
||||
|
||||
// Exit from Scilab
|
||||
exit
|
||||
exit
|
||||
|
|
|
|||
|
|
@ -6,19 +6,16 @@ ilib_verbose(0);
|
|||
[units, typ, names] = file(1);
|
||||
swigtestname = strsubst(fileparts(names, "fname"), "_runme", "");
|
||||
|
||||
// Test build dir
|
||||
testdir = swigtestname + ".dir";
|
||||
|
||||
// Does the library exists? If not then exit!
|
||||
libname = "lib" + swigtestname + getdynlibext();
|
||||
if ~isfile(fullfile(testdir, libname)) then
|
||||
if ~isfile(libname) then
|
||||
mfprintf(0, "*** LIBRARY NOT FOUND: %s ***\n", libname);
|
||||
exit(1)
|
||||
end
|
||||
|
||||
// Load library
|
||||
try
|
||||
exec(fullfile(testdir, "loader.sce"), -1);
|
||||
exec("loader.sce", -1);
|
||||
catch
|
||||
mfprintf(0, "*** LOADER EXECUTION FAILED ***\n");
|
||||
exit(1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue