[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 | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/stats/wrapper b/stats/wrapper index a44e9f31..03db5975 100755 --- a/stats/wrapper +++ b/stats/wrapper @@ -140,6 +140,13 @@ check_empty_output check_binary_output
tmpfile=$(mktemp -p /tmp -t lkp-stats.XXXXXXXX) + +if [[ ! -f $program_dir/$program ]]; then + if [[ -f $RESULT_ROOT/"stats"/$program ]]; then + program_dir=$RESULT_ROOT/"stats" + fi +fi + if [[ -f $log ]]; then $program_dir/$program $log < $log > $tmpfile || { log_error "$program_dir/$program $log < $log exit code $?, check $tmpfile"; exit 1; } else
On Mon, Nov 23, 2020 at 11:41:40AM +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
[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 | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/stats/wrapper b/stats/wrapper index a44e9f31..03db5975 100755 --- a/stats/wrapper +++ b/stats/wrapper @@ -140,6 +140,13 @@ check_empty_output check_binary_output
tmpfile=$(mktemp -p /tmp -t lkp-stats.XXXXXXXX)
+if [[ ! -f $program_dir/$program ]]; then
- if [[ -f $RESULT_ROOT/"stats"/$program ]]; then
program_dir=$RESULT_ROOT/"stats"
- fi
+fi
you can remove " ! -f " condition, i think it's clearer like this:
[[ -f $program_dir/$program ]] || { .... }
Thanks, Liushaofei
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 02:33:06PM +0800, Liu Shaofei wrote:
On Mon, Nov 23, 2020 at 11:41:40AM +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
[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 | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/stats/wrapper b/stats/wrapper index a44e9f31..03db5975 100755 --- a/stats/wrapper +++ b/stats/wrapper @@ -140,6 +140,13 @@ check_empty_output check_binary_output
tmpfile=$(mktemp -p /tmp -t lkp-stats.XXXXXXXX)
+if [[ ! -f $program_dir/$program ]]; then
- if [[ -f $RESULT_ROOT/"stats"/$program ]]; then
program_dir=$RESULT_ROOT/"stats"
- fi
+fi
you can remove " ! -f " condition, i think it's clearer like this:
[[ -f $program_dir/$program ]] || { .... }
ok, let's me try
Thanks, weitao
Thanks, Liushaofei
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