Skip to content

Commit 5670e4b

Browse files
committed
Improve filtering out test cases.
1 parent 447d5bd commit 5670e4b

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

buildUtilities/testTask.m

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
% Get list of example scripts in path
1717
exName = {dir(fullfile(projObj.RootFolder,'toolbox/examples','**/*.m')).name}';
1818
exName = exName(isFileOnPath(exName));
19+
exName = filterOutTests(exName);
1920
exParam = Parameter.fromData('exName',exName);
2021

2122
suite = TestSuite.fromProject(projObj,'ExternalParameters',exParam);
@@ -42,4 +43,16 @@
4243
for ii = 1:length(filename)
4344
onPath(ii) = exist(filename{ii},"file")>0;
4445
end
46+
end
47+
48+
function testcases = filterOutTests(testcases)
49+
50+
% Example doesn't work without real EEG data
51+
testcases(ismember(testcases,{'demo_mu_rhythm_phase_triggering.m'})) = [];
52+
53+
if ~isMATLABReleaseOlderThan("R2025a")
54+
% Issue when reading sample rate from osc_alpha_ip. Diff is not constant
55+
testcases(ismember(testcases,{'demo_phase_prediction_error_simple.m'})) = [];
56+
end
57+
4558
end

toolbox/examples/demo_mu_rhythm_phase_triggering.m

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@
66
% 4) The stimulator is Switched On, External Trigger mode is turned on and the Stimulator is Enabled
77
% Press Ctrl+C on MATLAB command line to stop the script anytime
88

9-
%% Help functions for automated testing
10-
% Skip this script if running in the CI pipeline
11-
if batchStartupOptionUsed
12-
return;
13-
end
149

1510
%% Initializing Demo Script Variables;
1611
no_of_trials=10;

0 commit comments

Comments
 (0)