2012-10-08 4 views
7

tycho-surefire-plugin으로 JUnit 테스트를 실행하면 tycho가 춘분 런타임을 분기합니다. 그것은 OSGi 테스트 런타임에서 일부 번들/해결 시작할 수없는 경우가 발생할 수 있습니다 드문 경우 (예를 들어, 패키지는 충돌을 사용한다). 디버그 로그 (받는다는 CLI 옵션 -X)를 읽을 경우 , 당신은 충돌을 사용하는 패키지의 경우 충분한 정보를 제공하지 않습니다tycho 테스트 실행 중 저수준 OSGi 문제를 분석하는 방법은 무엇입니까?

!ENTRY org.eclipse.osgi 2 0 2012-10-08 16:41:31.635 
!MESSAGE The following is a complete list of bundles which are not resolved, see the prior log entry for the root cause if it exists: 
!SUBENTRY 1 org.eclipse.osgi 2 0 2012-10-08 16:41:31.635 
An error has occurred. See the log file 
C:\mytestproject.tests\target\work\configuration\1349705136008.log. 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 12:03.181s 
[INFO] Finished at: Mon Oct 08 16:17:16 CEST 2012 
[INFO] Final Memory: 20M/309M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-surefire-plugin:0.15.0:test (default-test) on project mytestproject.tests: An unexpected error occured (return c 
ode 13). See log for details. -> [Help 1] 

이클립스 콘솔 로그 같은 것을 찾을 수 있습니다.

tycho가 분기 한 OSGi 테스트 런타임에서 번들을 어떻게 분석 할 수 있습니까? 원격 디버깅 모드 (간단히 CLI에 -DdebugPort=8000 지정)와 로컬 포트 ​​OSGi의 콘솔을 시작, 예를 들어에

답변

7

시작 테스트 1234 :

 <plugin> 
      <groupId>org.eclipse.tycho</groupId> 
      <artifactId>tycho-surefire-plugin</artifactId> 
      <version>${tycho-version}</version> 
      <configuration> 
       <systemProperties> 
        <osgi.console>1234</osgi.console> 
       </systemProperties> 
      </configuration> 
     </plugin> 

설정 테스트 클래스 중 하나 또는 조직/일식에 중단 점/티코/확실한/osgibooter/OsgiSurefireBooter 테스트도 시작되지 않은 경우. 그런 다음,

telnet localhost 1234 

당신은 "생체을"문제를 분석하는 ss, diag, bundle 등과 같은 보통은 OSGi 콘솔 명령을 사용할 수 있습니다.

+0

내가 하나의 추가 systemProperty를 추가했다 : 진정한. 그것으로 효과가있었습니다. 감사. –

0

또는 -consolelog으로 실행하거나 eclipse.consoleLog 속성을 true 속성으로 설정할 수 있습니다. Tycho를 사용하는 경우 <argLine>-Declipse.consoleLog=true</argLine>을 사용할 수 있습니다.

관련 문제