From 0c32889ebcc61845765514fee56d6641bd91b542 Mon Sep 17 00:00:00 2001 From: Simeon Andreev Date: Fri, 17 Jun 2022 12:19:50 +0200 Subject: Run tests that checks araxis output only on Linux Bug: 580189 Change-Id: Ieb14f5cf061fcb468b602c7f27e27b672e3b09e2 Signed-off-by: Simeon Andreev --- .../tst/org/eclipse/jgit/pgm/DiffToolTest.java | 2 ++ .../tst/org/eclipse/jgit/pgm/MergeToolTest.java | 2 ++ .../tst/org/eclipse/jgit/pgm/ToolTestCase.java | 7 +++++++ 3 files changed, 11 insertions(+) (limited to 'org.eclipse.jgit.pgm.test/tst') diff --git a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/DiffToolTest.java b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/DiffToolTest.java index 2b50d45253..f0908cebc4 100644 --- a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/DiffToolTest.java +++ b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/DiffToolTest.java @@ -81,6 +81,8 @@ public class DiffToolTest extends ToolTestCase { @Test(expected = Die.class) public void testEmptyToolName() throws Exception { + assumeLinuxPlatform(); + String emptyToolName = ""; StoredConfig config = db.getConfig(); diff --git a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/MergeToolTest.java b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/MergeToolTest.java index 1236dd30d3..54c4f26099 100644 --- a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/MergeToolTest.java +++ b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/MergeToolTest.java @@ -79,6 +79,8 @@ public class MergeToolTest extends ToolTestCase { @Test public void testEmptyToolName() throws Exception { + assumeLinuxPlatform(); + String emptyToolName = ""; StoredConfig config = db.getConfig(); diff --git a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ToolTestCase.java b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ToolTestCase.java index a3c41f0fed..5f6b38c25d 100644 --- a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ToolTestCase.java +++ b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ToolTestCase.java @@ -32,6 +32,8 @@ import org.eclipse.jgit.pgm.opt.SubcommandHandler; import org.eclipse.jgit.revwalk.RevCommit; import org.eclipse.jgit.treewalk.FileTreeIterator; import org.eclipse.jgit.treewalk.TreeWalk; +import org.eclipse.jgit.util.SystemReader; +import org.junit.Assume; import org.junit.Before; import org.kohsuke.args4j.Argument; import org.kohsuke.args4j.CmdLineException; @@ -240,4 +242,9 @@ public abstract class ToolTestCase extends CLIRepositoryTestCase { matches); } } + + protected static void assumeLinuxPlatform() { + Assume.assumeTrue("This test can run only in Linux tests", + SystemReader.getInstance().isLinux()); + } } -- cgit v1.2.3