1. if no $RESULT_SERVER, default to $LKP_SERVER. 2. result service according to $os_mount, if no $os_mount, default original judge.
Signed-off-by: Hu XueJiao huxuejiao1@huawei.com --- lib/job-init.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/lib/job-init.sh b/lib/job-init.sh index 0732d4b9..42cfc2bd 100755 --- a/lib/job-init.sh +++ b/lib/job-init.sh @@ -51,9 +51,14 @@ setup_result_service() { [ -n "$result_service" ] && return [ -n "$NO_NETWORK" ] && return 1 + [ -n "$RESULT_SERVER" ] || $RESULT_SERVER=$LKP_SERVER + + if [ "$os_mount" == 'nfs' ] || [ -z "$os_mount" ]; then + supports_netfs 'nfs' && result_service=$RESULT_SERVER:/result && return + elif [ "$os_mount" == 'cifs' ] || [ -z "$os_mount" ]; then + supports_netfs 'cifs' && result_service=//$RESULT_SERVER/result && return + fi
- supports_netfs 'nfs' && result_service=$LKP_SERVER:/result && return - supports_netfs 'cifs' && result_service=//$LKP_SERVER/result && return supports_raw_upload && result_service=raw_upload && return
return 1