Skip to content

Commit 5a2d422

Browse files
committed
Supress shadowed builtin warnings
1 parent 6c1d35c commit 5a2d422

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

runAllTests.m

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ 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-
% v1.1.1
8+
% v1.1.2
99
if nargin < 2; repo = 'rigbox'; end
1010
if nargin < 1; id = []; end
1111
try
@@ -14,12 +14,16 @@ function runAllTests(id, repo)
1414
fprintf('Running tests\n')
1515
fprintf('Repo = %s, sha = %s\n', repo, id)
1616
origDir = pwd;
17-
cleanup = onCleanup(@() cd(origDir));
17+
cleanup = onCleanup(@() fun.applyForce({...
18+
@() cd(origDir), ...
19+
@() warning(origState)}));
1820
cd(fullfile(fileparts(which('addRigboxPaths')),'tests'))
1921
% Ideally we check code coverage and tests for all commits
2022
import matlab.unittest.TestRunner
2123
import matlab.unittest.plugins.CodeCoveragePlugin
2224
import matlab.unittest.plugins.codecoverage.CoberturaFormat
25+
% Suppress warnings about shadowed builtins in utilities folder
26+
warning('off','MATLAB:dispatcher:nameConflict')
2327

2428
%% Gather Rigbox main tests
2529
main_tests = testsuite('IncludeSubfolders', true);

0 commit comments

Comments
 (0)