Scala Programming Language
  1. Scala Programming Language
  2. SI-622

Partest does not work if directory's path contains a space

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Build, Developer Tools
    • Labels:
      None

      Description

      "run", "jvm", "jvm5" and "res" tests fail with Partest (and SuperSABBUS) if Scala directory's path contains spaces.

      To test, SVN checkout Scala trunk into "scala dir" and run "ant -f sabbus suite.test".

        [partest] Compiling and running files
        [partest] testing: [...]/files/jvm/xmlmore.scala                                [FAILED]
        [partest] Exception in thread "main" java.lang.NoClassDefFoundError: dir/test/files/jvm/xmlmore-run/obj:/localhome/dubochet/scala
      ...
      

        Activity

        Hide
        Martin Odersky added a comment -

        Milestone next_bugfix deleted

        Show
        Martin Odersky added a comment - Milestone next_bugfix deleted
        Hide
        Commit Message Bot added a comment -

        (extempore in r25994) Working on the runners.

        Removed assumption that bash is in /bin. Removed --posix option to bash.
        Modernized shell constructs: $() instead of ``, [[ ]] instead of [ ].
        Added -debug option for all runners which will show you the exact java
        command line being run before running it. Added -usebootcp to complement
        -nobootcp, and made regular classpath the default on cygwin. Quoted more
        things to give us a fighting chance against spaces and parens in paths.

        I took the waste-half-a-day step of installing vmware fusion so I could
        install windows so I could install cygwin so I could install scala under
        cygwin so I could see if it still worked. Seems to. We still desperately
        need some way of testing not only everything I'm attempting to address
        in this pile of patches but everything which is most likely now regressing.

        :javap now sort of works on windows (not for repl-defined classes as yet)
        if JAVA_HOME is set such that I can find tools.jar. Closes SI-4959.
        (Risks breaking and) references SI-2092. References SI-622 since that
        shouldn't be hard to get working.

        Show
        Commit Message Bot added a comment - (extempore in r25994 ) Working on the runners. Removed assumption that bash is in /bin. Removed --posix option to bash. Modernized shell constructs: $() instead of ``, [[ ]] instead of [ ]. Added -debug option for all runners which will show you the exact java command line being run before running it. Added -usebootcp to complement -nobootcp, and made regular classpath the default on cygwin. Quoted more things to give us a fighting chance against spaces and parens in paths. I took the waste-half-a-day step of installing vmware fusion so I could install windows so I could install cygwin so I could install scala under cygwin so I could see if it still worked. Seems to. We still desperately need some way of testing not only everything I'm attempting to address in this pile of patches but everything which is most likely now regressing. :javap now sort of works on windows (not for repl-defined classes as yet) if JAVA_HOME is set such that I can find tools.jar. Closes SI-4959 . (Risks breaking and) references SI-2092 . References SI-622 since that shouldn't be hard to get working.
        Hide
        Commit Message Bot added a comment -

        (szeiger in r26040) Always build command lines in partest as Seq[String] instead of space-separated command.

        Closes SI-1510 which is actually caused by a bad command line string when the path to Java contains a space, and not by long path names per se. References SI-622 since this commit fixes the specific error described there (not closing because follow-up bugs remain).

        Show
        Commit Message Bot added a comment - (szeiger in r26040 ) Always build command lines in partest as Seq [String] instead of space-separated command. Closes SI-1510 which is actually caused by a bad command line string when the path to Java contains a space, and not by long path names per se. References SI-622 since this commit fixes the specific error described there (not closing because follow-up bugs remain).
        Hide
        Commit Message Bot added a comment -

        (szeiger in r26047) Make partest work with spaces in the path (from batch script and ant task).

        • The 'partest' ant task gets a new 'compilerargs' element for scalac options (like in scalacfork and javac).
        • Fixed argument list handling in partest task.
        • Further improvements to argument list handling for all ant tasks.
        • Fixed argument list handling in DirectTest (used by partest shell scripts)
        • Fixed path handling in several test cases.

        Closes SI-622. Review by phaller.

        Show
        Commit Message Bot added a comment - (szeiger in r26047 ) Make partest work with spaces in the path (from batch script and ant task). The 'partest' ant task gets a new 'compilerargs' element for scalac options (like in scalacfork and javac). Fixed argument list handling in partest task. Further improvements to argument list handling for all ant tasks. Fixed argument list handling in DirectTest (used by partest shell scripts) Fixed path handling in several test cases. Closes SI-622 . Review by phaller.

          People

          • Assignee:
            Philipp Haller
            Reporter:
            Gilles Dubochet
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development