File: runMatlab2TikzTests.m

package info (click to toggle)
matlab2tikz 1.1.0-8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,668 kB
  • sloc: objc: 6,143; makefile: 55; sh: 40
file content (44 lines) | stat: -rwxr-xr-x 1,233 bytes parent folder | download | duplicates (4)
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
function statusAll = runMatlab2TikzTests(varargin)
%% This file runs the complete MATLAB2TIKZ test suite.
% It is mainly used for testing on a continuous integration server, but it can
% also be used on a development machine.

CI_MODE = strcmpi(getenv('CONTINUOUS_INTEGRATION'),'true') || strcmp(getenv('CI'),'true');
isJenkins = ~isempty(getenv('JENKINS_URL'));

%% Set path
if exist('OCTAVE_VERSION')
    warning('off', 'Octave:shadowed-function')
end
addpath('/usr/share/matlab2tikz');
if exist('OCTAVE_VERSION')
    warning('on', 'Octave:shadowed-function')
end
addpath(fullfile(pwd,'suites'));

%% Select functions to run
suite = @ACID;
allTests = 1:numel(suite(0));

%% Prepare environment
if strcmpi(getEnvironment(), 'Octave')
  % Ensure that paging is disabled
  % https://www.gnu.org/software/octave/doc/interpreter/Paging-Screen-Output.html
  more off
end

%% Run tests
status = testHeadless('testFunctionIndices', allTests,...
                     'testsuite',           suite, varargin{:});

if isJenkins
    makeTapReport(status, 'stream', 'results.test.tap');
    makeTravisReport(status, 'stream', 'results.test.md');
end

nErrors = makeTravisReport(status);

%% Calculate exit code
if CI_MODE
    exit(nErrors);
end