Skip to content

Commit

Permalink
Return exit code based on test result
Browse files Browse the repository at this point in the history
Signed-off-by: Julia Pineda <[email protected]>
  • Loading branch information
jpineda3 committed Oct 13, 2023
1 parent 94d7bac commit ce02386
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/runHWTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,14 @@ function runHWTests(board)
disp(t);
disp(repmat('#',1,80));
fid = fopen('failures.txt','a+');
exitcode = 0;
for test = results
if test.Failed
disp(test.Name);
fprintf(fid,string(test.Name)+'\n');
exitcode = 2;
elseif test.Incomplete
exitcode = 3;
end
end
fclose(fid);
Expand All @@ -70,5 +74,5 @@ function runHWTests(board)
end
save(['BSPTest_',datestr(now,'dd_mm_yyyy-HH_MM_SS'),'.mat'],'t');
bdclose('all');
exit(any([results.Failed]));
exit(exitcode);
end

0 comments on commit ce02386

Please sign in to comment.