File: nfsoftUnitTestsRunAndExit.m

package info (click to toggle)
nfft 3.5.3-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,972 kB
  • sloc: ansic: 44,442; lisp: 1,697; makefile: 1,322; sh: 744; sed: 5
file content (33 lines) | stat: -rw-r--r-- 749 bytes parent folder | download
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
addpath ../nfsoft ../nfsft
ok = 1;

fprintf('Number of threads: %d\n', nfsoft_get_num_threads());

try
  tests = nfsoftUnitTests;
  if exist('perform_exhaustive_tests_flag','var')
    tests.perform_exhaustive_tests_flag = perform_exhaustive_tests_flag;
  end

  result = tests.nfsoft_check_online; ok = min(ok, result);
  result = tests.nfsoft_check_adjoint_online; ok = min(ok, result);

  result = tests.nfsoft_check_quadrature_online; ok = min(ok, result);
catch err
  try
    fprintf('Exception %s %s\n', err.identifier, err.message);
    disp(err)
  catch
  end
  ok = 0;
end

clear result;

if ok ~= 1
  fprintf('nfsoftUnitTest: at least one test failed\n');
  exit(1);
  return;
end
fprintf('nfsoftUnitTest: all tests succeeded\n');
exit(0);