maven-surefire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1074652 - /maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/WorkingDirectoryIT.java
Date Fri, 25 Feb 2011 18:09:17 GMT
Author: olamy
Date: Fri Feb 25 18:09:17 2011
New Revision: 1074652

URL: http://svn.apache.org/viewvc?rev=1074652&view=rev
Log:
try to fix symlink issue on ci server

Modified:
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/WorkingDirectoryIT.java

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/WorkingDirectoryIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/WorkingDirectoryIT.java?rev=1074652&r1=1074651&r2=1074652&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/WorkingDirectoryIT.java
(original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/WorkingDirectoryIT.java
Fri Feb 25 18:09:17 2011
@@ -26,6 +26,7 @@ import java.util.Properties;
 
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
+import org.codehaus.plexus.util.FileUtils;
 
 /**
  * Test working directory configuration, SUREFIRE-416
@@ -77,7 +78,15 @@ public class WorkingDirectoryIT
         String userDirPath = p.getProperty( "user.dir" );
         assertNotNull( "user.dir was null in property file", userDirPath );
         File userDir = new File( userDirPath );
-        assertEquals( "wrong user.dir", childTestDir.getAbsolutePath(), userDir.getAbsolutePath()
);
+        // test if not a symlink
+        if ( userDir.getAbsolutePath().equals( userDir.getCanonicalPath() ) )
+        {
+            assertEquals( "wrong user.dir", childTestDir.getAbsolutePath(), userDir.getAbsolutePath()
);
+        }
+        else
+        {
+            assertEquals( "wrong user.dir", childTestDir.getCanonicalPath(), userDir.getCanonicalPath()
);
+        }
     }
 
     public void testWorkingDirectoryNoFork()



Mime
View raw message