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();
|
libname = "lib" + swigtestname + "lib" + getdynlibext();
|
||||||
if ~isfile(fullfile(testbuilddir, libname)) then
|
if ~isfile(fullfile(testbuilddir, libname)) then
|
||||||
mprintf("*** LIBRARY NOT FOUND: %s ***\n", "lib" + swigtestname + "lib" + getdynlibext());
|
mprintf("*** LIBRARY NOT FOUND: %s ***\n", "lib" + swigtestname + "lib" + getdynlibext());
|
||||||
exit
|
exit(1)
|
||||||
end
|
end
|
||||||
|
|
||||||
// Load library
|
// Load library
|
||||||
|
|
@ -20,11 +20,19 @@ try
|
||||||
exec(fullfile(testbuilddir, "loader.sce"), -1);
|
exec(fullfile(testbuilddir, "loader.sce"), -1);
|
||||||
catch
|
catch
|
||||||
mprintf("*** LOADER EXECUTION FAILED ***\n");
|
mprintf("*** LOADER EXECUTION FAILED ***\n");
|
||||||
exit
|
exit(1)
|
||||||
|
end
|
||||||
|
|
||||||
|
// Module initialization
|
||||||
|
try
|
||||||
|
SWIG_Init();
|
||||||
|
catch
|
||||||
|
mprintf("*** MODULE INIT FAILED ***\n");
|
||||||
|
exit(1)
|
||||||
end
|
end
|
||||||
|
|
||||||
// Error management function
|
// Error management function
|
||||||
function swigtesterror()
|
function swigtesterror()
|
||||||
mprintf("*** TEST FAILED ***\n")
|
mprintf("*** TEST FAILED ***\n")
|
||||||
exit
|
exit(1)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue