stages:
- build
- affinity-analysis
affinity-check:
stage: affinity-analysis
tags:
- kunpeng_scanner # 对应gitlab-runner注册时的标签,可选择多个
script:
- echo '====== 构建亲和 ======'
# 示例 devkit advisor constr-check -i /opt/testcase/affinity/build/wtdbg2-2.5 -c make -r html
- devkit advisor constr-check -i 待扫描的源码路径 -c 源码的构建命令 -r html
- mv ./constr-check*.html ./affinity-check.html
artifacts:
paths:
- affinity-check.html
name: constr-check
具体参数如表1所示。
参数 |
参数选项 |
参数说明 |
---|---|---|
-i/--input |
package_path |
必选参数。对应的源码文件夹路径。 |
-c/--cmd |
cmd |
必选参数。源码的构建命令。 |
-o/--output |
output_path |
可选参数。报告存放路径。报告默认存放在当前执行路径下,名称默认为“特性名称_时间戳”。 |
-b/--build-tool |
make,cmake |
可选参数。构建工具,默认为make。 |
-l/--log-level |
0,1,2,3 |
可选参数。设置日志等级,0(DEBUG)、1(INFO)、2(WARNING)、3(ERROR),默认为1(INFO)。 |
-r/--report-type |
all,json,html,csv |
可选参数。扫描报告的格式。默认为all,即默认生成json、html、csv三种报告。 |
--set-timeout |
time |
可选参数。任务超时时间。默认无超时时间,任务将持续执行直到结束。 |