From 6bf6f29f2dfcd6feb4b5c8121f32a329c7a67ce7 Mon Sep 17 00:00:00 2001 From: laurentheirendt <laurent.heirendt@uni.lu> Date: Wed, 23 Jan 2019 17:10:45 +0100 Subject: [PATCH] new test suite --- test/testAll.m | 31 +++++++++++++++++++++++++++++++ test/{ => verified}/test_myName.m | 0 2 files changed, 31 insertions(+) create mode 100644 test/testAll.m rename test/{ => verified}/test_myName.m (100%) diff --git a/test/testAll.m b/test/testAll.m new file mode 100644 index 0000000..a941211 --- /dev/null +++ b/test/testAll.m @@ -0,0 +1,31 @@ +% include the root folder and all subfolders. +addpath(genpath([pwd filesep 'test'])); + +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 \ No newline at end of file diff --git a/test/test_myName.m b/test/verified/test_myName.m similarity index 100% rename from test/test_myName.m rename to test/verified/test_myName.m -- GitLab