maven-scm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dan tran <dant...@gmail.com>
Subject Re: svn commit: r357770 - in /maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command: changelog/ checkin/ checkout/ diff/ status/ update/
Date Mon, 19 Dec 2005 20:07:40 GMT
ok, will open an issue for this.

Thanks

-Dan



On 12/19/05, Emmanuel Venisse <emmanuel@venisse.net> wrote:
>
> I'd prefer you use getTestFile method instead of new File(...)
>
> Emmanuel
>
> dantran@apache.org a écrit :
> > Author: dantran
> > Date: Mon Dec 19 11:54:17 2005
> > New Revision: 357770
> >
> > URL: http://svn.apache.org/viewcvs?rev=357770&view=rev
> > Log:
> >
> > PR: SCM-122
> >
> > Fixed test files to run under maven reactor mode
> >
> > Modified:
> >
> maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/changelog/StarteamChangeLogCommandTest.java
> >
> maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/checkin/StarteamCheckInCommandTest.java
> >
> maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/checkout/StarteamCheckOutCommandTest.java
> >
> maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/diff/StarteamDiffCommandTest.java
> >
> maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/status/StarteamStatusCommandTest.java
> >
> maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/update/StarteamUpdateCommandTest.java
> >
> > Modified:
> maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/changelog/StarteamChangeLogCommandTest.java
> > URL:
> http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/changelog/StarteamChangeLogCommandTest.java?rev=357770&r1=357769&r2=357770&view=diff
> >
> ==============================================================================
> > ---
> maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/changelog/StarteamChangeLogCommandTest.java
> (original)
> > +++
> maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/changelog/StarteamChangeLogCommandTest.java
> Mon Dec 19 11:54:17 2005
> > @@ -36,7 +36,7 @@
> >      public void testGetCommandLine()
> >          throws Exception
> >      {
> > -             File workDir = new File("target");
> > +        File workDir = new File( getBasedir() + "/target" );
> >
> >               String workDirAbsolutePath =
> StarteamCommandLineUtils.toJavaPath( workDir.getAbsolutePath() );
> >
> > @@ -49,7 +49,7 @@
> >      public void testGetCommandLineWithStartDate()
> >          throws Exception
> >      {
> > -             File workDir = new File("target");
> > +        File workDir = new File( getBasedir() + "/target" );
> >
> >               String workDirAbsolutePath =
> StarteamCommandLineUtils.toJavaPath( workDir.getAbsolutePath() );
> >
> >
> > Modified:
> maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/checkin/StarteamCheckInCommandTest.java
> > URL:
> http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/checkin/StarteamCheckInCommandTest.java?rev=357770&r1=357769&r2=357770&view=diff
> >
> ==============================================================================
> > ---
> maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/checkin/StarteamCheckInCommandTest.java
> (original)
> > +++
> maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/checkin/StarteamCheckInCommandTest.java
> Mon Dec 19 11:54:17 2005
> > @@ -36,7 +36,7 @@
> >      public void testGetCommandLineWithWorkingDirectory()
> >       throws Exception
> >      {
> > -        File workDir = new File( "target" ) ;
> > +        File workDir = new File( getBasedir() + "/target" );
> >
> >          String workDirAbsolutePath=StarteamCommandLineUtils.toJavaPath(
> workDir.getAbsolutePath() );
> >
> >
> > Modified:
> maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/checkout/StarteamCheckOutCommandTest.java
> > URL:
> http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/checkout/StarteamCheckOutCommandTest.java?rev=357770&r1=357769&r2=357770&view=diff
> >
> ==============================================================================
> > ---
> maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/checkout/StarteamCheckOutCommandTest.java
> (original)
> > +++
> maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/checkout/StarteamCheckOutCommandTest.java
> Mon Dec 19 11:54:17 2005
> > @@ -36,7 +36,7 @@
> >          throws Exception
> >      {
> >       //note that workDir must exists, make should have already created
> it
> > -             File workDir = new File("target");
> > +        File workDir = new File( getBasedir() + "/target" );
> >
> >          String workDirAbsolutePath= StarteamCommandLineUtils.toJavaPath(
> workDir.getAbsolutePath() );
> >
> > @@ -48,18 +48,18 @@
> >      }
> >
> >      public void testGetCommandLineWithWorkingDirectoryAsAbsolutePath()
> > -    throws Exception
> > -{
> > -     File workDir = new File("target");
> > +        throws Exception
> > +    {
> > +        File workDir = new File( getBasedir() + "/target" );
> >
> > -    String workDirAbsolutePath= StarteamCommandLineUtils.toJavaPath(
> workDir.getAbsolutePath() );
> > +        String workDirAbsolutePath= StarteamCommandLineUtils.toJavaPath(
> workDir.getAbsolutePath() );
> >
> > -    testCommandLine( "scm:starteam:myusername:mypassword@myhost
> :1234/projecturl",
> > +        testCommandLine( "scm:starteam:myusername:mypassword@myhost
> :1234/projecturl",
> >                       workDir.getAbsoluteFile(),
> >                       "myTag",
> >                       "stcmd co -x -nologo -stop -p
> myusername:mypassword@myhost:1234/projecturl " +
> >                       "-fp " + workDirAbsolutePath + " -vl myTag -is" );
> > -}
> > +    }
> >
> >      //
> ----------------------------------------------------------------------
> >      //
> >
> > Modified:
> maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/diff/StarteamDiffCommandTest.java
> > URL:
> http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/diff/StarteamDiffCommandTest.java?rev=357770&r1=357769&r2=357770&view=diff
> >
> ==============================================================================
> > ---
> maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/diff/StarteamDiffCommandTest.java
> (original)
> > +++
> maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/diff/StarteamDiffCommandTest.java
> Mon Dec 19 11:54:17 2005
> > @@ -37,7 +37,7 @@
> >          throws Exception
> >      {
> >
> > -             File workDir = new File( "target" );
> > +        File workDir = new File( getBasedir() + "/target" );
> >
> >          String workDirAbsolutePath= StarteamCommandLineUtils.toJavaPath(
> workDir.getAbsolutePath() );
> >
> > @@ -54,7 +54,7 @@
> >          throws Exception
> >      {
> >
> > -             File workDir = new File( "target" );
> > +        File workDir = new File( getBasedir() + "/target" );
> >
> >          String workDirAbsolutePath= StarteamCommandLineUtils.toJavaPath(
> workDir.getAbsolutePath() );
> >
> >
> > Modified:
> maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/status/StarteamStatusCommandTest.java
> > URL:
> http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/status/StarteamStatusCommandTest.java?rev=357770&r1=357769&r2=357770&view=diff
> >
> ==============================================================================
> > ---
> maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/status/StarteamStatusCommandTest.java
> (original)
> > +++
> maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/status/StarteamStatusCommandTest.java
> Mon Dec 19 11:54:17 2005
> > @@ -36,7 +36,7 @@
> >      public void testGetCommandLineWithWorkingDirectory()
> >          throws Exception
> >      {
> > -             File workDir = new File( "target" );
> > +        File workDir = new File( getBasedir() + "/target" );
> >
> >          String workDirAbsolutePath= StarteamCommandLineUtils.toJavaPath(
> workDir.getAbsolutePath() );
> >
> >
> > Modified:
> maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/update/StarteamUpdateCommandTest.java
> > URL:
> http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/update/StarteamUpdateCommandTest.java?rev=357770&r1=357769&r2=357770&view=diff
> >
> ==============================================================================
> > ---
> maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/update/StarteamUpdateCommandTest.java
> (original)
> > +++
> maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/update/StarteamUpdateCommandTest.java
> Mon Dec 19 11:54:17 2005
> > @@ -38,7 +38,7 @@
> >      public void testGetCommandLineWithWorkingDirectory()
> >          throws Exception
> >      {
> > -        File workDir = new File ( "target" ) ;
> > +        File workDir = new File( getBasedir() + "/target" );
> >
> >               String absolutePath=StarteamCommandLineUtils.toJavaPath(
> workDir.getAbsolutePath() );
> >
> > @@ -54,26 +54,23 @@
> >      public void testGetCommandLineWithFileOnRoot()
> >          throws Exception
> >      {
> > -        ScmFileSet fileSet = new ScmFileSet( new File( "./" ), "*",
> null );
> > -
> > -        File [] files = fileSet.getFiles();
> > +        System.out.println( "testGetCommandLineWithFileOnRoot" );
> >
> > -        File workDir = new File( getBasedir() );
> > +        File testFile = new File("testfile");
> >
> > -         String absolutePath= StarteamCommandLineUtils.toJavaPath(
> workDir.getAbsolutePath() );
> > +        String testFileAbsolutePath=
> StarteamCommandLineUtils.toJavaPath( testFile.getAbsoluteFile().getParent()
> );
> >
> >          testCommandLine( "scm:starteam:myusername:mypassword@myhost
> :1234/projecturl",
> > -                     files[0],
> > -                     "myTag",
> > -                     "stcmd co -x -nologo -stop -p
> myusername:mypassword@myhost:1234/projecturl " +
> > -                     "-fp " + absolutePath + " -merge -neverprompt -vl
> myTag " + files[0].getName() );
> > -
> > +                         testFile,
> > +                         "myTag",
> > +                         "stcmd co -x -nologo -stop -p
> myusername:mypassword@myhost:1234/projecturl " +
> > +                         "-fp " + testFileAbsolutePath + " -merge
> -neverprompt -vl myTag " + "testfile" );
> >      }
> >
> >      public void testGetCommandLineWithFileInSubDir()
> >         throws Exception
> >      {
> > -        ScmFileSet fileSet = new ScmFileSet( new File( "./" ),
> "**/*.java", null );
> > +        ScmFileSet fileSet = new ScmFileSet( new File( getBasedir() ),
> "**/*.java", null );
> >
> >          File [] files = fileSet.getFiles();
> >
> > @@ -100,6 +97,10 @@
> >          StarteamScmProviderRepository repository =
> (StarteamScmProviderRepository) repo.getProviderRepository();
> >
> >          Commandline cl = StarteamUpdateCommand.createCommandLine(
> repository, testFileOrDir, tag );
> > +
> > +        System.out.println( commandLine );
> > +
> > +        System.out.println( cl );
> >
> >          assertEquals( commandLine, cl.toString() );
> >      }
> >
> >
> >
> >
> >
>
>

Mime
View raw message