[PATCH v2 lkp-tests] stats/wrapper support user define file to parse result

[Why] User need debug their script which haven't commit to lkp-tests/stats [How] lkp-tests/stats/wrapper calls the program-script in result_root if lkp-tests/stats/ have no program-script [Dependence] Write job['define_files'] to file in result_root, job can query from ES DB Signed-off-by: Lu Weitao <luweitaobe@163.com> --- stats/wrapper | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stats/wrapper b/stats/wrapper index a44e9f31..d13249d2 100755 --- a/stats/wrapper +++ b/stats/wrapper @@ -140,6 +140,9 @@ check_empty_output check_binary_output tmpfile=$(mktemp -p /tmp -t lkp-stats.XXXXXXXX) + +[[ -f "$RESULT_ROOT/stats/$program" ]] && program_dir="$RESULT_ROOT/stats" + if [[ -f $log ]]; then $program_dir/$program $log < $log > $tmpfile || { log_error "$program_dir/$program $log < $log exit code $?, check $tmpfile"; exit 1; } else -- 2.23.0

On Mon, Nov 23, 2020 at 04:08:44PM +0800, Lu Weitao wrote:
[Why] User need debug their script which haven't commit to lkp-tests/stats
[How] lkp-tests/stats/wrapper calls the program-script in result_root if lkp-tests/stats/ have no program-script
if the result_root has the program-script. Thanks, Xueliang
[Dependence] Write job['define_files'] to file in result_root, job can query from ES DB
Signed-off-by: Lu Weitao <luweitaobe@163.com> --- stats/wrapper | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/stats/wrapper b/stats/wrapper index a44e9f31..d13249d2 100755 --- a/stats/wrapper +++ b/stats/wrapper @@ -140,6 +140,9 @@ check_empty_output check_binary_output
tmpfile=$(mktemp -p /tmp -t lkp-stats.XXXXXXXX) + +[[ -f "$RESULT_ROOT/stats/$program" ]] && program_dir="$RESULT_ROOT/stats" + if [[ -f $log ]]; then $program_dir/$program $log < $log > $tmpfile || { log_error "$program_dir/$program $log < $log exit code $?, check $tmpfile"; exit 1; } else -- 2.23.0

On Mon, Nov 23, 2020 at 04:46:08PM +0800, Cao Xueliang wrote:
On Mon, Nov 23, 2020 at 04:08:44PM +0800, Lu Weitao wrote:
[Why] User need debug their script which haven't commit to lkp-tests/stats
[How] lkp-tests/stats/wrapper calls the program-script in result_root if lkp-tests/stats/ have no program-script
if the result_root has the program-script.
you means call the result_root/stats/$program-script firstly, even lkp-tests/stats/ has the $program-script seems good iead Thanks, Weitao
Thanks, Xueliang
[Dependence] Write job['define_files'] to file in result_root, job can query from ES DB
Signed-off-by: Lu Weitao <luweitaobe@163.com> ---
participants (2)
-
Cao Xueliang
-
Lu Weitao