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 11, 2023
1 parent b5dc22f commit 3d2f4e3
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 @@ -85,10 +85,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 @@ -99,5 +103,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 3d2f4e3

Please sign in to comment.