This file is indexed.

/usr/share/psychtoolbox-3/PsychTests/UnitTestRunAll.m is in psychtoolbox-3-common 3.0.11.20140816.dfsg1-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 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
48
49
% this script runs all m files in PsychTests/UnitTests, each of which is
% assumed to be a unittest that is to return true upon success or false
% otherwise

clear all; close all;

% get all scripts from subfolder (note that the FileFromFolder function
% can't be broken for this to work of course... :P)
[utests,ntests] = FileFromFolder(fullfile(PsychtoolboxRoot,'PsychTests/UnitTests'),'silent','m');
% delete contents file as its not executable
qContents = strcmp('Contents',{utests.fname});
utests(qContents) = [];
ntests = ntests-sum(qContents);

if ntests<1
    error('No Unit Tests found');
end

% build function handles for each
funs = {utests.fname};
funs = cellfun(@str2func,funs,'UniformOutput',false);

% run each
nfailed = 0;
fprintf('Running UnitTests\n');
for p=1:ntests
    fprintf('=========================================\n');
    fprintf('Running: PsychTests/UnitTests/%s:\n\n',utests(p).name);
    
    st = funs{p}();
    
    fprintf('\n');
    if st
        fprintf('PsychTests/UnitTests/%s: succes\n',utests(p).name);
    else
        fprintf('PsychTests/UnitTests/%s: failed\n',utests(p).name);
        nfailed = nfailed+1;
        failed(nfailed) = utests(p);
    end
    fprintf('=========================================\n');
    fprintf('\n');
end

fprintf('Summary:\n');
fprintf('%d tests succeeded, %d failed\n',ntests-nfailed,nfailed);
if nfailed>0
    fprintf('Tests failed:\n');
    fprintf('  %s\n',failed.fname);
end