Run tests that checks araxis output only on Linux

Bug: 580189
Change-Id: Ieb14f5cf061fcb468b602c7f27e27b672e3b09e2
Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
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 2b50d45..f0908ce 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 @@
 
 	@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 1236dd3..54c4f26 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 @@
 
 	@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 a3c41f0..5f6b38c 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.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 @@
 					matches);
 		}
 	}
+
+	protected static void assumeLinuxPlatform() {
+		Assume.assumeTrue("This test can run only in Linux tests",
+				SystemReader.getInstance().isLinux());
+	}
 }
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/SystemReader.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/SystemReader.java
index 16e2577..5ced071 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/SystemReader.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/SystemReader.java
@@ -63,6 +63,8 @@
 
 	private static volatile Boolean isWindows;
 
+	private static volatile Boolean isLinux;
+
 	static {
 		SystemReader r = new Default();
 		r.init();
@@ -185,6 +187,7 @@
 	public static void setInstance(SystemReader newReader) {
 		isMacOS = null;
 		isWindows = null;
+		isLinux = null;
 		if (newReader == null)
 			INSTANCE = DEFAULT;
 		else {
@@ -543,6 +546,20 @@
 		return isMacOS.booleanValue();
 	}
 
+	/**
+	 * Whether we are running on Linux.
+	 *
+	 * @return true if we are running on Linux.
+	 * @since 6.3
+	 */
+	public boolean isLinux() {
+		if (isLinux == null) {
+			String osname = getOsName();
+			isLinux = Boolean.valueOf(osname.toLowerCase().startsWith("linux")); //$NON-NLS-1$
+		}
+		return isLinux.booleanValue();
+	}
+
 	private String getOsName() {
 		return AccessController.doPrivileged(
 				(PrivilegedAction<String>) () -> getProperty("os.name") //$NON-NLS-1$