Skip to content

Commit 7e651d0

Browse files
committed
test:nojavamex
1 parent bd72a2d commit 7e651d0

File tree

6 files changed

+12
-23
lines changed

6 files changed

+12
-23
lines changed

.github/workflows/composite-mex/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ runs:
1111
uses: matlab-actions/run-build@v2
1212
with:
1313
startup-options: ${{ matrix.startup-options }} -logfile ${{ matrix.release }}-${{ runner.os }}-test.log
14-
tasks: ${{ matrix.release < 'R2024b' && !startsWith(matrix.release, 'latest') && 'test_mex' || 'test:mex' }}
14+
tasks: ${{ matrix.release < 'R2024b' && !startsWith(matrix.release, 'latest') && 'test_mex test_exe' || 'test:mex test:exe' }}

.github/workflows/composite-nomex/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ runs:
1111
uses: matlab-actions/run-build@v2
1212
with:
1313
startup-options: ${{ matrix.startup-options }}
14-
tasks: test:nomex ${{ contains(matrix.startup-options, '-nojvm') && '' || 'test:exe' }}
14+
tasks: ${{ contains(matrix.startup-options, '-nojvm') && 'test:nojavamex' || 'test:nomex' }}
1515

1616

1717
- name: Non-Mex Test (< R2024b)

buildfile.m

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,21 @@
1313

1414
cnomex = ~HasTag("exe") & ~HasTag("mex");
1515
cmex = ~HasTag("exe") & HasTag("mex");
16+
cnojavamex = ~HasTag("java") & cmex;
1617

1718
if isMATLABReleaseOlderThan("R2024b")
1819

1920
plan("test_exe") = matlab.buildtool.tasks.TestTask("test", Tag="exe", Dependencies="exe");
2021
plan("test_nomex") = matlab.buildtool.Task(Actions=@(context) legacy_test(context, cnomex), Dependencies="clean");
2122
plan("test_mex") = matlab.buildtool.Task(Actions=@(context) legacy_test(context, cmex), Dependencies="mex");
23+
plan("test_nojavamex") = matlab.buildtool.Task(Actions=@(context) legacy_test(context, cnojavamex), Dependencies="clean");
2224

2325
elseif isMATLABReleaseOlderThan("R2025a")
2426

2527
plan("test:exe") = matlab.buildtool.tasks.TestTask("test", Tag="exe", Dependencies="exe");
2628
plan("test:nomex") = matlab.buildtool.Task(Actions=@(context) legacy_test(context, cnomex), Dependencies="clean");
2729
plan("test:mex") = matlab.buildtool.Task(Actions=@(context) legacy_test(context, cmex), Dependencies="mex");
30+
plan("test:nojavamex") = matlab.buildtool.Task(Actions=@(context) legacy_test(context, cnojavamex), Dependencies="clean");
2831

2932
else
3033
% can't use SourceFiles= if "mex" Task was run, even if plan("test").DisableIncremental = true;
@@ -40,6 +43,10 @@
4043
Selector=cmex, ...
4144
Dependencies="mex", TestResults="TestResults_mex.xml", Strict=false);
4245

46+
plan("test:nojavamex") = matlab.buildtool.tasks.TestTask("test", ...
47+
Selector=cnojavamex, ...
48+
Dependencies="clean", TestResults="TestResults_nojavamex.xml", Strict=false);
49+
4350
end
4451

4552
td = plan.RootFolder + "/test";

test/TestHash.m

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,8 @@
55
{'sha-256', '2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824'}}
66
end
77

8-
methods(TestClassSetup)
9-
function java_required(tc)
10-
tc.assumeTrue(stdlib.has_java())
11-
end
12-
end
13-
148

15-
methods (Test)
9+
methods (Test, TestTags="java")
1610

1711

1812
function test_hash_text(tc, Ph)

test/TestJava.m

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,8 @@
44
Ps = {"."}
55
end
66

7-
methods(TestClassSetup)
8-
function java_required(tc)
9-
tc.assumeTrue(stdlib.has_java())
10-
end
11-
end
12-
137

14-
methods(Test)
8+
methods(Test, TestTags="java")
159

1610
function test_inode(tc)
1711
tc.assumeFalse(ispc(), "not for Windows")

test/TestSubprocess.m

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,8 @@
55
lang_in = {"cpp", "fortran"}
66
end
77

8-
methods(TestClassSetup)
9-
function java_required(tc)
10-
tc.assumeTrue(stdlib.has_java())
11-
end
12-
end
13-
148

15-
methods (Test, TestTags="exe")
9+
methods (Test, TestTags=["exe", "java"])
1610

1711
function test_stdout_stderr(tc, lang_out)
1812
import matlab.unittest.constraints.IsFile

0 commit comments

Comments
 (0)