我试图在jenkins环境下为我的tepp项目启动cppcheck,系统是win7 7-x64:
C:\Program Files (x86)\Jenkins\cppcheck下安装了C:\Program Files (x86)\Jenkins\cppcheckC:\Windows\system32\cmd.exe"C:\Program Files (x86)\Jenkins\cppcheck\cppcheck.exe" -j 8 --enable=all --inconclusive --xml --xml-version=2 tepp 2> tepp/tepp-cppcheck.xml
它的输出是:
[tepp] $ C:\Windows\system32\cmd.exe -xe
C:\Windows\TEMP\hudson3799822801570258901.sh
Microsoft Windows [version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Tous droits r‚serv‚s.
C:\Program Files (x86)\Jenkins\workspace\tepp>Finished: SUCCESS没有xml输出文件,日志中没有任何内容,静音失败。
当我在cmd窗口下执行这个命令行时,它工作得很好:一堆日志,生成的大xml文件.
我漏掉了什么吗?
发布于 2015-03-21 23:41:02
Cppcheck必须通过"windows批处理“调用,而不是”执行shell脚本“。
我认为"shell脚本“是通过linux下的bash/sh jenkins和windows下的cmd来解释的。不是的!
发布于 2015-03-21 19:31:50
你已经测试过cppcheck插件了吗?https://wiki.jenkins-ci.org/display/JENKINS/Cppcheck+Plugin
我的团队创造了它..。而cppcheck小组现在正在使用它。
https://stackoverflow.com/questions/29176538
复制相似问题