On Thu, Oct 22, 2020 at 02:23:41PM +0800, Yu Chuan wrote:
On Thu, Oct 22, 2020 at 12:17:46PM +0800, Wu Fengguang wrote:
TO ALL.
Better remove unrelated context.
ok.
That's comment for Liping. :)
- cd "${LKP_SRC}/jobs" && {
[ -f "${test_yaml}" ] ||
die "test yaml\(${test_yaml}\) exist in {LKP_SRC}/jobs !!!"
==> test yaml not exist in ${LKP_SRC}/jobs
Good point!
"test yaml not exist in" 非常容易 grep
修改之前的output, fixed string AND variable互相交织,碎片化了。 看到出错消息也很难在项目里快速gg到对应代码。
ok.
FYI 我总结了下:
+- puts/printf字符串应当容易搜索(grep)。特别注意包含足够长的固定内容substring. +例如: + die "test yaml(${test_yaml}) not exist in ${LKP_SRC}/jobs !!!" +==> + die "cannot find test yaml ($test_yaml) in $LKP_SRC/jobs" + ^^^^^^^^^^^^^^^^^^^^^ grep-friendly fixed substring +
Thanks, Fengguang