-
Notifications
You must be signed in to change notification settings - Fork 32
/
run_tests.m
47 lines (34 loc) · 1.08 KB
/
run_tests.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
function success = run_tests(with_coverage)
%
% (C) Copyright 2021 BIDS-MATLAB developers
tic;
fprintf('\nRunning tests\n');
if nargin < 1
with_coverage = true;
end
if ispc
with_coverage = false;
end
addpath(fullfile(pwd, 'tests', 'utils'));
folderToCover = fullfile(pwd, '+bids');
testFolder = fullfile(pwd, 'tests');
if run_slow_test_only
fprintf('Running only slow tests\n');
testFolder = fullfile(pwd, 'tests', 'tests_slow');
end
if with_coverage
success = moxunit_runtests(testFolder, ...
'-verbose', ...
'-randomize_order', ...
'-recursive', ...
'-with_coverage', ...
'-cover', folderToCover, ...
'-cover_xml_file', 'coverage.xml');
else
success = moxunit_runtests(testFolder, ...
'-verbose', ...
'-randomize_order', ...
'-recursive');
end
toc;
end