Skip to content

Commit

Permalink
Merge pull request #1063 from MarkEWaite/safeguard-windows-longpath
Browse files Browse the repository at this point in the history
Safeguard against long path on Windows test
  • Loading branch information
MarkEWaite committed Mar 28, 2021
2 parents 22eb61f + 1283a14 commit cdb2f75
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/test/java/hudson/plugins/git/GitSCMTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -2357,6 +2357,15 @@ public void testDataCompatibility1() throws Exception {
@Issue("JENKINS-53346")
@Test
public void testCheckoutReturnsLatestValues() throws Exception {

/* Exit test early if running on Windows and path will be too long */
/* Known limitation of git for Windows 2.28.0 and earlier */
/* Needs a longpath fix in git for Windows */
String currentDirectoryPath = new File(".").getCanonicalPath();
if (isWindows() && currentDirectoryPath.length() > 95) {
return;
}

WorkflowJob p = rule.jenkins.createProject(WorkflowJob.class, "pipeline-checkout-3-tags");
p.setDefinition(new CpsFlowDefinition(
"node {\n" +
Expand Down

0 comments on commit cdb2f75

Please sign in to comment.