swig/Examples/test-suite/scilab/swigtest.start
2011-01-04 15:52:24 +00:00

31 lines
802 B
Text

lines(0);
// Get test name (used in swigtest.quit file)
[units, typ, names] = file(1);
swigtestname = strsubst(fileparts(names, "fname"), "_runme", "");
// Does the library exists? If not then exit!
if ~isfile("lib" + fileparts(names, "fname") + "lib" + getdynlibext()) then
mprintf("**************************\n")
mprintf("* LIBRARY DOES NOT EXIST *\n");
mprintf("**************************\n")
exit
end
// Load library
try
exec("loader.sce", -1);
catch
mprintf("***************************\n")
mprintf("* LOADER EXECUTION FAILED *\n");
mprintf("***************************\n")
exit
end
// Error management function
function swigtesterror()
mprintf("***************\n")
mprintf("* TEST FAILED *\n")
mprintf("***************\n")
exit
endfunction