Buckminster:无头运行 JUnit 插件测试

发布于 2024-12-10 22:08:39 字数 3629 浏览 0 评论 0原文

我有一个简单的 Hudons/Buckminster 设置,其中 Hudson 从 SVN 检查四个 Java 插件项目,从 Helios 下载站点具体化(?) org.eclipse.platform,在 JFlex 等项目之一中运行一个小型 ant-job (Buckminster 没有“看到”配置外部 ANT 构建器?然后 Buckminster 构建工作区。Java

插件项目还包含与插件具有相同 ID 的 feature.xml 文件(我们已经到目前为止,我一直在使用基于 ant 的构建过程)。

我可以在前两个上成功执行...#site.p2,但第三个由于某种原因失败(但这不是最重要的)。 现在,其中一个项目有 JUnit 测试,

我可以使用无头 JUnit 插件启动配置从 Eclipse Indigo 运行注意:由于某种原因(因为我们的功能不在单独的功能项目中?),依赖项生成。检查启动配置已损坏,我已手动配置所需的最少插件集。

现在,我在 Buckminster 中运行此启动配置:

junit -l com.pon.ent/junit.launch

并得到:

错误:检测到插件验证错误: {com.pon.ent_0.0.0.qualifier=[Lorg.eclipse.osgi.service.resolver.ResolverError;@c986d2, org.eclipse.ui.views_3.5.1.M20110202-0800=[Ljava.lang.Object;@b27cca , org.eclipse.ltk.core.refactoring_3.5.100.v20100526-0800=[Ljava.lang.Object;@1ec391, org.eclipse.ui.navigator.resources_3.4.201.M20100707-0800=[Ljava.lang.Object;@1b9a026, org.eclipse.debug.ui_3.6.1.v20100901_r361=[Ljava.lang.Object;@1c126da, org.eclipse.ui.ide_3.6.1.M20100825-0800=[Ljava.lang.Object;@1dde560, org.eclipse.team.ui_3.5.101.R36x_v20100825-0800=[Ljava.lang.Object;@fe10f1, org.eclipse.ui.ide_3.6.2.M20101201-0800=[Ljava.lang.Object;@a68c8, org.eclipse.jdt.ui_3.6.1.r361_v20100825-0800=[Ljava.lang.Object;@16535fa, org.eclipse.debug.ui_3.6.3.v20101201_r362=[Ljava.lang.Object;@1baec4c, org.eclipse.ui.navigator.resources_3.4.202.M20101124-0800=[Ljava.lang.Object;@ef965e, org.eclipse.jdt.debug.ui_3.5.0.v20100602-0830=[Ljava.lang.Object;@17916a0, org.eclipse.jdt.debug.ui_3.5.2.v20100928a_r362=[Ljava.lang.Object;@bc7bc0, org.eclipse.equinox.p2.repository_2.0.2.R36x_v20110111-1500=[Lorg.eclipse.osgi.service.resolver.ResolverError;@607cad, org.eclipse.compare_3.5.100.I20100526-0800=[Ljava.lang.Object;@997c85, org.eclipse.ui.views_3.5.0.I20100527-0800=[Ljava.lang.Object;@be0e6e, org.eclipse.ui_3.6.1.M20100826-1330=[Ljava.lang.Object;@1a5688d, org.eclipse.team.ui_3.5.102.R36x_v20110203-1036=[Ljava.lang.Object;@73102f, org.eclipse.jdt.ui_3.6.2.r362_v20110203=[Ljava.lang.Object;@2baa00, org.eclipse.equinox.p2.metadata.repository_1.1.0.v20100513=[Lorg.eclipse.osgi.service.resolver.ResolverError;@a5f472, org.eclipse.ltk.core.refactoring_3.5.101.r362_v20101117-0800=[Ljava.lang.Object;@153a539, org.eclipse.swt_3.6.1.v3655c=[Ljava.lang.Object;@8445f7, org.eclipse.ui_3.6.2.M20110203-1100=[Ljava.lang.Object;@d8573, org.eclipse.ui.workbench_3.6.1.M20100826-1330=[Ljava.lang.Object;@1b4776a, org.eclipse.compare_3.5.101.R36x_v20100929-0800=[Ljava.lang.Object;@10bdf62, org.eclipse.swt_3.6.2.v3659c=[Ljava.lang.Object;@76b51c, org.eclipse.ui.workbench_3.6.2.M20110210-1200=[Ljava.lang.Object;@16c6a89} 警告:进程 /usr/jdk/instances/jdk1.6.0/bin/java(2011 年 10 月 19 日下午 9:02:53)终止,退出状态为 1。

鉴于 org.eclipse.ui.views 等内容显示为匹配,例如

org.eclipse.ui.views:osgi.bundle/[3.5.1.M20110202-0800,3.5.1.M20110202-0800]: 找到匹配的 org.eclipse.ui.views:osgi.bundle$3.5.1.M20110202-0800

我有点不知所措,实际上缺少/出了问题。我没有使用任何目标平台产品,其他来自我从获取 org.eclipse.platform 的 cquery 中获得的内容,以及来自我的插件的依赖项解析。

任何解释表示赞赏!

更新

我已经进行了一些更改,现在使用 Indigo,将 org.eclipse.rcp 包含在 Buckminster 的目标平台中,并将 JUnit 启动从插件切换到功能,并且事情已经压缩:

Waiting for jobs to end
junit '-l' 'eu.hatsproject.absplugin/junit.launch' '-o' 'eu.hatsproject.absplugin/junit.xml' '--maxTimeAwaitJunitReport' '20'
WARN:  Process /usr/jdk/instances/jdk1.6.0/bin/java (Oct 21, 2011 6:04:32 PM) terminated with exit status 1.
Doing full workspace refresh

I have a simple Hudons/Buckminster setup where Hudson checks out four Java plugin projects from SVN, materializes(?) the org.eclipse.platform from the Helios download-site, runs a small ant-job in one of the projects for JFlex etc. (Buckminster doesn't "see" the configure external ANT builder?, and then Buckminster builds the workspace.

The Java plugin projects also contain feature.xml files with the same ID as the plugin (we've been using an ant-based build-process so far).

I can successfully perform ...#site.p2 on the first two, but the third one fails for some reason (but this is not the question here).

Now, one of the projects has JUnit tests that I can run from Eclipse Indigo using a headless JUnit Plugin Launch configuration. Note: for some reason, (because we have the features not in separate feature projects?), dependency generation checking on the launch config is broken, and I have manually configured the minimal set of plugins required.

Now, I run this launch configuration in Buckminster:

junit -l com.pon.ent/junit.launch

and get:

ERROR: Plugin validation errors were detected:
{com.pon.ent_0.0.0.qualifier=[Lorg.eclipse.osgi.service.resolver.ResolverError;@c986d2, org.eclipse.ui.views_3.5.1.M20110202-0800=[Ljava.lang.Object;@b27cca,
org.eclipse.ltk.core.refactoring_3.5.100.v20100526-0800=[Ljava.lang.Object;@1ec391,
org.eclipse.ui.navigator.resources_3.4.201.M20100707-0800=[Ljava.lang.Object;@1b9a026,
org.eclipse.debug.ui_3.6.1.v20100901_r361=[Ljava.lang.Object;@1c126da,
org.eclipse.ui.ide_3.6.1.M20100825-0800=[Ljava.lang.Object;@1dde560,
org.eclipse.team.ui_3.5.101.R36x_v20100825-0800=[Ljava.lang.Object;@fe10f1,
org.eclipse.ui.ide_3.6.2.M20101201-0800=[Ljava.lang.Object;@a68c8,
org.eclipse.jdt.ui_3.6.1.r361_v20100825-0800=[Ljava.lang.Object;@16535fa,
org.eclipse.debug.ui_3.6.3.v20101201_r362=[Ljava.lang.Object;@1baec4c,
org.eclipse.ui.navigator.resources_3.4.202.M20101124-0800=[Ljava.lang.Object;@ef965e,
org.eclipse.jdt.debug.ui_3.5.0.v20100602-0830=[Ljava.lang.Object;@17916a0,
org.eclipse.jdt.debug.ui_3.5.2.v20100928a_r362=[Ljava.lang.Object;@bc7bc0,
org.eclipse.equinox.p2.repository_2.0.2.R36x_v20110111-1500=[Lorg.eclipse.osgi.service.resolver.ResolverError;@607cad,
org.eclipse.compare_3.5.100.I20100526-0800=[Ljava.lang.Object;@997c85,
org.eclipse.ui.views_3.5.0.I20100527-0800=[Ljava.lang.Object;@be0e6e,
org.eclipse.ui_3.6.1.M20100826-1330=[Ljava.lang.Object;@1a5688d,
org.eclipse.team.ui_3.5.102.R36x_v20110203-1036=[Ljava.lang.Object;@73102f,
org.eclipse.jdt.ui_3.6.2.r362_v20110203=[Ljava.lang.Object;@2baa00,
org.eclipse.equinox.p2.metadata.repository_1.1.0.v20100513=[Lorg.eclipse.osgi.service.resolver.ResolverError;@a5f472, org.eclipse.ltk.core.refactoring_3.5.101.r362_v20101117-0800=[Ljava.lang.Object;@153a539,
org.eclipse.swt_3.6.1.v3655c=[Ljava.lang.Object;@8445f7,
org.eclipse.ui_3.6.2.M20110203-1100=[Ljava.lang.Object;@d8573,
org.eclipse.ui.workbench_3.6.1.M20100826-1330=[Ljava.lang.Object;@1b4776a,
org.eclipse.compare_3.5.101.R36x_v20100929-0800=[Ljava.lang.Object;@10bdf62,
org.eclipse.swt_3.6.2.v3659c=[Ljava.lang.Object;@76b51c,
org.eclipse.ui.workbench_3.6.2.M20110210-1200=[Ljava.lang.Object;@16c6a89}
WARN: Process /usr/jdk/instances/jdk1.6.0/bin/java (Oct 19, 2011 9:02:53 PM) terminated with exit status 1.

Given that things like org.eclipse.ui.views show up as matched, e.g.

org.eclipse.ui.views:osgi.bundle/[3.5.1.M20110202-0800,3.5.1.M20110202-0800]:
Found match org.eclipse.ui.views:osgi.bundle$3.5.1.M20110202-0800

I'm a bit at a loss what is actually missing/going wrong. I am not using any products are target platforms, other from what I get from the cquery which gets org.eclipse.platform, and the dependency resolution from my plugins.

Any interpretation is appreciated!

Update:

I've switched things a bit and now use Indigo, include org.eclipse.rcp in Buckminster's target platform, and switched the JUnit launch from plugins to features, and things have condensed down do:

Waiting for jobs to end
junit '-l' 'eu.hatsproject.absplugin/junit.launch' '-o' 'eu.hatsproject.absplugin/junit.xml' '--maxTimeAwaitJunitReport' '20'
WARN:  Process /usr/jdk/instances/jdk1.6.0/bin/java (Oct 21, 2011 6:04:32 PM) terminated with exit status 1.
Doing full workspace refresh

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

地狱即天堂 2024-12-17 22:08:40

经验教训:

  • 不要混合搭配:使用 Indigo 运行 Buckminster 3.7 导入,而不是 Helios 更新站点(不确定,也许我还做错了什么)
  • --stderr --stdout进入 Buckminster junit 调用!

问题是启动配置包含特定于平台的 -X -开关,因为我从 MacOS 导出它并在 Solaris 上运行它。我不知道当您不使用上述开关时这些消息最终会出现在哪里。

Lessons learned:

  • don't mix-and-match: run Buckminster 3.7 imports with Indigo, not Helios update-site (inconclusive, maybe I did something else wrong as well)
  • put --stderr --stdout into the Buckminster junit invocation!

The problem was that the launch configuration contained platform-specific -X-switches, since I exported it from MacOS and was running it on Solaris. I have no idea where those messages end up when you don't use the above switches.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文