update CI test script

This commit is contained in:
Matthew GONG
2020-03-18 23:33:43 +08:00
parent f3fea3262c
commit c6d772fba5
2 changed files with 7 additions and 9 deletions
+4 -3
View File
@@ -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);
+3 -6
View File
@@ -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);