Skip to content

Commit 77afdee

Browse files
author
Vladimir Kotal
committed
disable Mercurial tests performing import/unbundle on Windows
prepare for proper solution using Eol Mercurial Extension
1 parent d04d1c6 commit 77afdee

File tree

5 files changed

+14
-2
lines changed

5 files changed

+14
-2
lines changed

appveyor.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ install:
1919
- cmd: mvn --version
2020
- cmd: java -version
2121
- cmd: python --version
22+
- cmd: hg --version
2223
- ps: |
2324
Add-Type -AssemblyName System.IO.Compression.FileSystem
2425
if (!(Test-Path -Path "C:\uctags" )) {

opengrok-indexer/src/test/java/org/opengrok/indexer/history/FileHistoryCacheTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import org.opengrok.indexer.condition.ConditionalRun;
3030
import org.opengrok.indexer.condition.ConditionalRunRule;
3131
import org.opengrok.indexer.condition.RepositoryInstalled;
32+
import org.opengrok.indexer.condition.UnixPresent;
3233
import org.opengrok.indexer.configuration.RuntimeEnvironment;
3334
import org.opengrok.indexer.util.TestRepository;
3435

@@ -230,6 +231,7 @@ public void testStoreAndGetIncrementalTags() throws Exception {
230231
/**
231232
* Basic tests for the {@code store()} and {@code get()} methods.
232233
*/
234+
@ConditionalRun(UnixPresent.class)
233235
@ConditionalRun(RepositoryInstalled.MercurialInstalled.class)
234236
@Test
235237
public void testStoreAndGet() throws Exception {
@@ -353,6 +355,7 @@ public void testStoreAndGet() throws Exception {
353355
* - change+rename the file again
354356
* - incremental reindex
355357
*/
358+
@ConditionalRun(UnixPresent.class)
356359
@ConditionalRun(RepositoryInstalled.MercurialInstalled.class)
357360
@Test
358361
public void testRenameFileThenDoIncrementalReindex() throws Exception {
@@ -480,6 +483,7 @@ public void testRenameFileThenDoIncrementalReindex() throws Exception {
480483
* (i.e. there should not be history entries from the default branch made
481484
* there after the branch was created).
482485
*/
486+
@ConditionalRun(UnixPresent.class)
483487
@ConditionalRun(RepositoryInstalled.MercurialInstalled.class)
484488
@Test
485489
public void testRenamedFilePlusChangesBranched() throws Exception {

opengrok-indexer/src/test/java/org/opengrok/indexer/util/FileUtilities.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333
import java.util.zip.ZipFile;
3434
import org.opengrok.indexer.configuration.RuntimeEnvironment;
3535
import org.opengrok.indexer.index.IgnoredNames;
36-
import static org.junit.Assert.*;
36+
37+
import static org.junit.Assert.assertNotNull;
3738

3839
/**
3940
* Various filesystem utilities used by the different test setups
@@ -53,7 +54,7 @@ public static void extractArchive(File sourceBundle, File root) throws IOExcepti
5354
if (ze.isDirectory()) {
5455
file.mkdirs();
5556
} else {
56-
try (InputStream in = zipfile.getInputStream(ze); FileOutputStream out = new FileOutputStream(file)) {
57+
try (InputStream in = zipfile.getInputStream(ze); OutputStream out = new FileOutputStream(file)) {
5758
if (in == null) {
5859
throw new IOException("Cannot get InputStream for " + ze);
5960
}

testdata/repositories/mercurial/hg/.hgeol

Whitespace-only changes.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[extensions]
2+
eol =
3+
4+
[eol]
5+
native = LF
6+
only-consistent = True

0 commit comments

Comments
 (0)