testAll.m 614 Bytes
Newer Older
Laurent Heirendt's avatar
Laurent Heirendt committed
1
% include the root folder and all subfolders.
Laurent Heirendt's avatar
Laurent Heirendt committed
2
addpath(genpath(pwd));
Laurent Heirendt's avatar
Laurent Heirendt committed
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

try

    % save the userpath
    originalUserPath = path;

    result = runtests('./test/', 'Recursively', true, 'BaseFolder', '*verified*');

    sumFailed = 0;
    sumIncomplete = 0;

    % print out a summary table
    table(result)

    % restore the original path
    restoredefaultpath;
    addpath(originalUserPath);

    if sumFailed > 0 || sumIncomplete > 0
        exit_code = 1;
    end

    % ensure that we ALWAYS call exit
    if ~isempty(strfind(getenv('HOME'), 'jenkins'))
        exit(exit_code);
    end
catch
    exit(1);
end