Skip to content

Commit 9ae1f67

Browse files
committed
Allow function call without commit id
1 parent acba5d5 commit 9ae1f67

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

runAllTests.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ function runAllTests(id, repo)
55
% TODO Possible for repo commit sha conflict
66
% @body Technically two different repos can have the same commit hash, in
77
% which case the db.json file should be restructured
8-
if nargin == 1; repo = 'rigbox'; end
8+
% v1.0.1
9+
if nargin < 2; repo = 'rigbox'; end
10+
if nargin < 1; id = []; end
911
try
1012
%% Initialize enviroment
1113
dbPath = 'C:\Users\Experiment\db.json';
@@ -54,6 +56,9 @@ function runAllTests(id, repo)
5456
assert(now - file.modDate(reportFile) < 0.001, ...
5557
'Coverage file may not have been updated')
5658

59+
% If no commit id set, simply exit the function
60+
if isempty(id); return; end
61+
5762
%% Diagnostics
5863
% Summarize the results of the tests and write results to the JSON file
5964
% located at dbPath

0 commit comments

Comments
 (0)