continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From car...@apache.org
Subject svn commit: r660801 - in /continuum/trunk/continuum-core/src: main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java test/java/org/apache/maven/continuum/execution/ContinuumBuildExecutorTest.java
Date Wed, 28 May 2008 03:22:49 GMT
Author: carlos
Date: Tue May 27 20:22:49 2008
New Revision: 660801

URL: http://svn.apache.org/viewvc?rev=660801&view=rev
Log:
[CONTINUUM-1731] chroot needs to run the shell to do a cd

Modified:
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
    continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/ContinuumBuildExecutorTest.java

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java?rev=660801&r1=660800&r2=660801&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
(original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
Tue May 27 20:22:49 2008
@@ -19,7 +19,6 @@
  * under the License.
  */
 
-import org.apache.maven.continuum.configuration.ConfigurationService;
 import org.apache.maven.continuum.installation.InstallationService;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.Project;
@@ -259,7 +258,7 @@
                 sb.append( " " );
                 sb.append( new File( chrootJailDirectory, project.getGroupId() ) );
                 sb.append( " " );
-                sb.append( " cd " );
+                sb.append( " /bin/sh -c cd " );
                 sb.append( getRelativePath( chrootJailDirectory, workingDirectory, project.getGroupId()
) );
                 sb.append( " && " );
                 sb.append( actualExecutable );

Modified: continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/ContinuumBuildExecutorTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/ContinuumBuildExecutorTest.java?rev=660801&r1=660800&r2=660801&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/ContinuumBuildExecutorTest.java
(original)
+++ continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/execution/ContinuumBuildExecutorTest.java
Tue May 27 20:22:49 2008
@@ -49,7 +49,8 @@
     {
         if ( File.separator.equals( "\\" ) )
         {
-            return path.replaceAll( "/", "\\" + File.separator );
+            String newPath = path.replaceAll( "/", "\\" + File.separator );
+            return newPath.replaceAll( "\\\\bin\\\\sh", "/bin/sh" );
         }
         return path;
     }
@@ -96,7 +97,8 @@
         final Map<String, String> environments = new HashMap<String, String>();
 
         final String cmd =
-            "chroot /home/xx " + " cd /dir1/dir2/workingdir/" + project.getId() + " &&
" + executable + " " + arguments;
+            "chroot /home/xx " + " /bin/sh -c cd /dir1/dir2/workingdir/" + project.getId()
+ " && " + executable + " " +
+                arguments;
 
         final ExecutionResult result = new ExecutionResult( 0 );
 



Mime
View raw message