基于Python的单元测试像"鼻子"这样的框架有很多丰富的功能,我想知道我们是否可以利用它们来测试C代码.
grunt --version
grunt-cli v0.1.8
grunt v0.4.1
Run Code Online (Sandbox Code Playgroud)
$ npm -v
1.2.18
Run Code Online (Sandbox Code Playgroud)
$ node -v
v0.10.6
Run Code Online (Sandbox Code Playgroud)
当我跑来grunt init创建时Gruntfile.js,我得到错误:
$ grunt init
A valid Gruntfile could not be found. Please see the getting started guide for
more information on how to configure grunt: http://gruntjs.com/getting-started
Fatal error: Unable to find Gruntfile.
Run Code Online (Sandbox Code Playgroud)
我搜索过Grunfile.js,我得到:
/home/ka/.npm/grunt-cli/0.1.8/package/Gruntfile.js
/home/ka/tmp/npm-1464/1368671910572-0.38816986070014536/package/Gruntfile.js
/usr/local/lib/node_modules/grunt/Gruntfile.js
/usr/local/lib/node_modules/grunt/node_modules/findup-sync/Gruntfile.js
/usr/local/lib/node_modules/grunt-cli/Gruntfile.js
/usr/local/lib/node_modules/grunt-cli/node_modules/findup-sync/Gruntfile.js
/ex/co/www/dev/htdocs/unittest/node_modules/grunt/node_modules/findup-sync/Gruntfile.js
/ex/co/www/dev/htdocs/unittest/node_modules/grunt/Gruntfile.js
/root/.npm/findup-sync/0.1.2/package/Gruntfile.js
/root/.npm/grunt/0.4.1/package/Gruntfile.js
/root/.npm/grunt-cli/0.1.8/package/Gruntfile.js
Run Code Online (Sandbox Code Playgroud)
我可以将其中一个grunt文件复制到/ ex/co/www/dev/htdocs/unittest(Javascript/quint测试的地方)吗?或者还有其他我想念的东西?
我试图在Centos 6.4上运行grunt.另外,为什么不grunt init创造Gruntfile.js?
cp /root/.npm/grunt/0.4.1/package/Gruntfile.js /ex/co/www/dev/htdocs/unittest/
Run Code Online (Sandbox Code Playgroud)
我按原样复制了它,现在我得到了更好的错误:
grunt
>> Local Npm …Run Code Online (Sandbox Code Playgroud) $ pylint --reports=n main.py
Run Code Online (Sandbox Code Playgroud)
输出:
No config file found, using default configuration
Run Code Online (Sandbox Code Playgroud) 即使我们有一个Makefile或类似的东西,在运送产品时将测试代码分开.在我看来,它们应该是分开的,但我并不完全相信为什么
我有2个Jenkins主机,并且希望First Jenkins在第一个基于结果的"SUCCESS"触发远程Jenkins的工作.我看了各种插件,但它们似乎都表明了一个Jenkins主机,可以用这种方式链接多个作业.
我正在使用cppcheck进行C代码的静态分析,但似乎无法获得XML.我要求Jenkins使用XML文件
这是我到目前为止所尝试的:
runcppcheck.sh
#!/bin/sh
cd obj/msc
cppcheck --enable=all -I. -I. -I. -I. -I. -I. -I. -I. -I. -I. -I. /usr/include/ -I. obj/fap/ \
-DSUNOS -DSS -DSS_MT -DANSI -D_GNU_SOURCE -DSS_LINUX -D_REENTRANT -D__EXTENSIONS__ -DSUNOS -DCNS_PH1 -DDBG_TIMESTAMP -DLX_PRNT_TIMESTAMP \
-DDEBUGP -DLX -DLCLXT -DLXT_V1 -DLCLXUILXT -DLCXULILXT -DXU -DLX -DLCLLX -DSM -DLWLCLLX -DLCLXMILLX -DLCSMLXMILLX -DHR -DLX -DLCHRT \
-DLCHRUIHRT -DLCHRLIHIT -DLCLXLIHRT -DXU -DLCXULIHRT -DLX -DLX_RTP -DLX_FASTRC -DCMINET_BSDCOMPAT -DSS_TICKS_SEC=100 -DCMFILE_REORG_1 \
-DCM_INET2 -D_GNU_SOURCE -DCMFILE_REORG_2 -DSSINT2 -DCMKV2 -DHI_MULTI_THREADED -DxCM_PASN_DBG -DxCCPU_DEBUG -DxRNC_OUTPUT_CONSOLE \
-DxCCPU_DEBUG_TRACE -DCCPU_DEBUG1 -DSS_PERF …Run Code Online (Sandbox Code Playgroud) 一般来说,我该如何解决maven仓库中找不到的资源,是否有另一个可以添加到pom.xml的repos列表?我尝试将该解决方案列为命令行,但它没有用,即使maven将其报告为SUCCESS.
I tried to build test-analytics, but got error:
[INFO] task-segment: [install]
[INFO] ------------------------------------------------------------------------
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 6 resources
Downloading: http://repo1.maven.org/maven2/com/google/code/gwt-dnd/gwt-dnd/3.1.1/gwt-dnd-3.1.1.pom
[INFO] Unable to find resource 'com.google.code.gwt-dnd:gwt-dnd:pom:3.1.1' in repository central (http://repo1.maven.org/maven2)
Downloading: http://repo1.maven.org/maven2/com/google/code/gwt-dnd/gwt-dnd/3.1.1/gwt-dnd-3.1.1.jar
[INFO] Unable to find resource 'com.google.code.gwt-dnd:gwt-dnd:jar:3.1.1' in repository central (http://repo1.maven.org/maven2)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
Missing:
----------
1) com.google.code.gwt-dnd:gwt-dnd:jar:3.1.1
Try downloading the file manually from the project website.
Then, …Run Code Online (Sandbox Code Playgroud) 我遇到了上帝似乎很好,但我想知道是否有人知道其他过程监控和控制框架,我可以比较上帝.上帝有以下特点:
最后一个是我遇到的困难.
我有4个目录:
/home/user/test1
/home/user/test2
/home/user/test3
/home/user/test4
Run Code Online (Sandbox Code Playgroud)
我有另一个测试目录
/home/user/testing
Run Code Online (Sandbox Code Playgroud)
有文件testall.py
我怎么能将PATT附加到test,test1到test4到PYTHONPATH,以便我可以访问test1到4下的文件.
顺便说一句,test1到4有python文件所在的多个目录.
我试过了:
import sys
import os
PROJECT_ROOT = os.path.dirname(__file__)
sys.path.insert(0,os.path.join(PROJECT_ROOT,"test1"))
sys.path.insert(1,os.path.join(PROJECT_ROOT,"test2"))
sys.path.insert(2,os.path.join(PROJECT_ROOT,"test3"))
sys.path.insert(3,os.path.join(PROJECT_ROOT,"test4"))
Run Code Online (Sandbox Code Playgroud)
似乎没有用
也:
import sys
sys.path.append('/home/user/test1','/home/user/test2','/home/user/test3','/home/kahmed/test4')
from test1.common.api import GenericAPI
Run Code Online (Sandbox Code Playgroud)
不工作.
基本上:从test1.common.api导入GenericAPI应该工作