Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tycho-user] JUnit test fails on Mac 32-bit

My JUnit test is failing on Mac 32-bit, it works fine on Mac 64-bit (and all Windows and Linux). It gvies following error
-------------------------
[INFO] Command line:
        /bin/sh -c cd /Users/newuser/com.xxx.myapp.test && /System/Library/Java/JavaVirtualMachines
/1.6.0.jdk/Contents/Home/bin/java -Dosgi.noShutdown=false -Dosgi.os=macosx -Dosgi.ws=cocoa -Dosgi.arch=x86_64 -jar /Users/newuser/rp/p2/osgi/bundle/org.eclipse.equinox.launcher/1.2.0.v20110502/org.eclipse.equinox.launcher-1.2.0.v201
10502.jar -data ------- /surefire.properties
An error has occurred. See the log file
/Users/newuser/myapp/com.xxx.myapp.test/work/configuration/1328698036280.log.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] com.xxx.myapp.test ............................. FAILURE [2.013s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 46.112s
[INFO] Finished at: Wed Feb 08 02:47:17 PST 2012
[INFO] Final Memory: 51M/111M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-surefire-plugin:0.13.0:test (default-test) on project com.xxx.myapp.test
: There are test failures.
[ERROR]
 -----------------------
 
I think the problem is tycho uses "-Dosgi.arch=x86_64" default jvm argument whereas I am running on 32-bit machine. Is there any bug or I am doing something wrong? How can I owerwrite jvm osgi.arch parameter? Is there any other way to fix it?
 
My test POM looks like
 
  <groupId>com.xxx.myapp</groupId>
  <artifactId>com.xxx.myapp.test</artifactId>
  <version>1.0.0.qualifier</version>
  <packaging>eclipse-test-plugin</packaging>
  <profiles>
    <profile>
      <activation>
        <property><name>destination</name></property>
      </activation>
      <build>
        <directory>${destination}/${project.artifactId}</directory>
      </build>
    </profile>
  </profiles>
</project>
 
 
I also tried adding argLine but it did not work it shows both -Dosgi.arch=x86_64 and -Dosgi.arch=x86
 

  <build>
    <plugins>
      <plugin>
        <groupId>org.eclipse.tycho</groupId>
        <artifactId>tycho-surefire-plugin</artifactId>
        <version>${tycho.version}</version>
        <configuration>
          <argLine>-Dosgi.arch=x86</argLine>
        </configuration>
      </plugin>
    </plugins>
  </build>
 
--
Regards,
Ramesh

Back to the top