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

partest on Windows: problem with long path names

    Details

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

      partest path name

      Description

      partest (see sbaz package 'scala-test-2.7.2.final.sbp) doesn't support long path names on Windows.

      Microsoft Windows XP [version 5.1.2600]
      (C) Copyright 1985-2001 Microsoft Corp.
      
      C:\PROGRA~1\Scala>echo %JAVA_OPTS%
      -Xmx768M -Xms768M -Xss1M -XX:MaxPermSize=96M
      
      C:\PROGRA~1\Scala>bin\partest misc\scala-test\files\shootout\hash.scala --show-diff
      java -Xmx768M -Xms768M -Xss1M -XX:MaxPermSize=96M -Dscala.home="C:\PROGRA~1\Scala\bin\.." -Dscalates
      t.javacmd="java" -Dscalatest.java_options="-Xmx768M -Xms768M -Xss1M -XX:MaxPermSize=96M" -Dscalatest
      .scalac_options="-deprecation" -Dpartest.debug=true -cp "C:\PROGRA~1\Scala\bin\..\lib\sbaz-tests.jar
      ;C:\PROGRA~1\Scala\bin\..\lib\sbaz.jar;C:\PROGRA~1\Scala\bin\..\lib\scala-compiler.jar;C:\PROGRA~1\S
      cala\bin\..\lib\scala-dbc.jar;C:\PROGRA~1\Scala\bin\..\lib\scala-library.jar;C:\PROGRA~1\Scala\bin\.
      .\lib\scala-partest.jar;C:\PROGRA~1\Scala\bin\..\lib\scala-swing.jar" scala.tools.partest.nest.NestR
      unner misc\scala-test\files\shootout\hash.scala --show-diff
      Loading classes from:
      file:/C:/Program Files/Scala/lib/scala-compiler.jar
      file:/C:/Program Files/Scala/lib/scala-library.jar
      file:/C:/Program Files/Scala/lib/scala-library.jar
      file:/C:/Program Files/Scala/lib/scala-partest.jar
      file:/C:/Program Files/Scala/misc/lib/fjbg.jar
      java.class.path: C:\Program Files\Scala\lib\scala-compiler.jar;C:\Program Files\Scala\lib\scala-libr
      ary.jar;C:\Program Files\Scala\lib\scala-library.jar;C:\Program Files\Scala\lib\scala-partest.jar
      env.classpath: C:\Program Files\Scala\lib\scala-compiler.jar;C:\Program Files\Scala\lib\scala-librar
      y.jar;C:\Program Files\Scala\lib\scala-library.jar;C:\Program Files\Scala\lib\scala-partest.jar
      sun.boot.class.path: C:\Program Files\Java\jre6\lib\resources.jar;C:\Program Files\Java\jre6\lib\rt.
      jar;C:\Program Files\Java\jre6\lib\sunrsasign.jar;C:\Program Files\Java\jre6\lib\jsse.jar;C:\Program
       Files\Java\jre6\lib\jce.jar;C:\Program Files\Java\jre6\lib\charsets.jar;C:\Program Files\Java\jre6\
      classes
      java.ext.dirs: C:\Program Files\Java\jre6\lib\ext;C:\WINDOWS\Sun\Java\lib\ext
      Scala compiler classes in: C:\Program Files\Scala
      Scala version is:          Scala compiler version 2.7.2.final -- Copyright 2002-2008, LAMP/EPFL
      Scalac options are:        -deprecation
      Java binaries in:          C:\Program Files\Java\jre6\bin
      Java runtime is:           Java HotSpot(TM) Client VM (build 11.0-b15, mixed mode)
      Java options are:
      Source directory is:       C:\Program Files\Scala\misc\scala-test\files
      
      Testing individual files
      testing: [...]\files\shootout\hash.scala                              [FAILED]
      1,11c1,4
      < java.lang.NoClassDefFoundError: Files\Scala\lib\scala-compiler/jar;C:\Program
      < Caused by: java.lang.ClassNotFoundException: Files\Scala\lib\scala-compiler.jar;C:\Program
      <       at java.net.URLClassLoader$$1.run(Unknown Source)
      <       at java.security.AccessController.doPrivileged(Native Method)
      <       at java.net.URLClassLoader.findClass(Unknown Source)
      <       at java.lang.ClassLoader.loadClass(Unknown Source)
      <       at sun.misc.Launcher$$AppClassLoader.loadClass(Unknown Source)
      <       at java.lang.ClassLoader.loadClass(Unknown Source)
      <       at java.lang.ClassLoader.loadClassInternal(Unknown Source)
      < Could not find the main class: Files\Scala\lib\scala-compiler.jar;C:\Program.  Program will exit.
      < Exception in thread "main"
      ---
      > 9999
      > 9999
      > 13880
      > 18699
      
      1 of 1 tests failed (elapsed time: 00:00:05)
      
      C:\PROGRA~1\Scala>
      

      Proposed solution: call `GetShortPathName` from Java (see link below).

      http://dolf.trieschnigg.nl/eightpointthree/eightpointthree.html

        Activity

        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).

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development