Scilab: test-case calls module init + fix exit code on errors
This commit is contained in:
parent
91e4114827
commit
1a9c86673b
1 changed files with 11 additions and 3 deletions
|
|
@ -12,7 +12,7 @@ testbuilddir = swigtestname + ".build";
|
|||
libname = "lib" + swigtestname + "lib" + getdynlibext();
|
||||
if ~isfile(fullfile(testbuilddir, libname)) then
|
||||
mprintf("*** LIBRARY NOT FOUND: %s ***\n", "lib" + swigtestname + "lib" + getdynlibext());
|
||||
exit
|
||||
exit(1)
|
||||
end
|
||||
|
||||
// Load library
|
||||
|
|
@ -20,11 +20,19 @@ try
|
|||
exec(fullfile(testbuilddir, "loader.sce"), -1);
|
||||
catch
|
||||
mprintf("*** LOADER EXECUTION FAILED ***\n");
|
||||
exit
|
||||
exit(1)
|
||||
end
|
||||
|
||||
// Module initialization
|
||||
try
|
||||
SWIG_Init();
|
||||
catch
|
||||
mprintf("*** MODULE INIT FAILED ***\n");
|
||||
exit(1)
|
||||
end
|
||||
|
||||
// Error management function
|
||||
function swigtesterror()
|
||||
mprintf("*** TEST FAILED ***\n")
|
||||
exit
|
||||
exit(1)
|
||||
endfunction
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue