update CI test script
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
% runtests.m
|
||||
|
||||
% assume it always success
|
||||
exit_code = 0;
|
||||
|
||||
% MATLAB runs the test
|
||||
try
|
||||
update_mex;
|
||||
@@ -12,6 +9,10 @@ catch ME
|
||||
exit_code = 1;
|
||||
end
|
||||
|
||||
if isempty(exit_code)
|
||||
exit_code = 0;
|
||||
end
|
||||
|
||||
% Ensure that we ALWAYS call exit
|
||||
exit(exit_code);
|
||||
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
% runtests.m
|
||||
|
||||
% assume it always fails
|
||||
exit_code = 1;
|
||||
|
||||
% MATLAB runs the test
|
||||
result = runtests(pwd);
|
||||
|
||||
@@ -10,12 +7,12 @@ ttt = table(result);
|
||||
disp(ttt);
|
||||
|
||||
% check the result
|
||||
if all(ttt.Passed) ~= 0 && all(ttt.Failed) == 0 && all(ttt.Incomplete) == 0
|
||||
if all(ttt.Passed) ~= 0 && any(ttt.Failed) == 0 && any(ttt.Incomplete) == 0
|
||||
exit_code = 0;
|
||||
else
|
||||
exit_code = 1;
|
||||
end
|
||||
|
||||
fprintf('exit_code = %d\n',exit_code);
|
||||
|
||||
% Ensure that we ALWAYS call exit
|
||||
exit(exit_code);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user