[Why] The 'os', 'os_arch', 'os_version' fields to be use by test job are the same as the 'iso_os', 'iso_arch', 'iso_version' of the destination iso this time.
So delete the 'test_os', 'test_os_arch', 'test_os_version'.
Signed-off-by: Yu Chuan 13186087857@163.com --- jobs/iso2rootfs.yaml | 3 --- tests/iso2rootfs | 33 +++++++-------------------------- 2 files changed, 7 insertions(+), 29 deletions(-)
diff --git a/jobs/iso2rootfs.yaml b/jobs/iso2rootfs.yaml index 55bf71517174..222ac309d33e 100644 --- a/jobs/iso2rootfs.yaml +++ b/jobs/iso2rootfs.yaml @@ -22,8 +22,5 @@ iso2rootfs:
# submit test yaml related fields test_yaml: - test_os: - test_os_arch: - test_os_version: test_os_mount: test_testbox: diff --git a/tests/iso2rootfs b/tests/iso2rootfs index c2e823c93ff9..4f6e3e578ce4 100755 --- a/tests/iso2rootfs +++ b/tests/iso2rootfs @@ -447,17 +447,8 @@ generate_global_yaml()
generate_submit_append_str() { - local wait_add_vars=( - "os" - "os_arch" - "os_version" - "os_mount" - "testbox" - ) - for vt in "${wait_add_vars[@]}" - do - SUBMIT_APPEND_STR="${SUBMIT_APPEND_STR} ${vt}=$(eval echo "$test_${vt}")" - done + [ "$#" -eq 2 ] || die "generate_submit_append_str: please give 2 parameters." + echo "os=${iso_os} os_arch=${iso_arch} os_version=${iso_version} os_mount=$1 testbox=$2" }
submit_test_job_yaml() @@ -468,18 +459,8 @@ submit_test_job_yaml()
[ -d "${LKP_SRC}" ] || die "cannot find value of var: LKP_SRC."
- local test_yaml_vars=( - "test_os" - "test_os_arch" - "test_os_version" - "test_os_mount" - "test_testbox" - ) - - for yaml_t in "${test_yaml_vars[@]}" - do - [ -n "$(eval echo "$${yaml_t}")" ] || die "cannot fine value of var: ${yaml_t}." - done + [ -n "${test_os_mount}" ] || die "cannot fine value of var: test_os_mount." + [ -n "${test_testbox}" ] || die "cannot fine value of var: test_testbox."
cd "${LKP_SRC}" && { chmod +x ./sbin/install-dependencies.sh @@ -493,9 +474,9 @@ submit_test_job_yaml() die "cannot find test yaml in LKP_SRC/jobs. test yaml: ${test_yaml}."
- generate_submit_append_str - - "${LKP_SRC}/sbin/submit" ${SUBMIT_APPEND_STR} "${test_yaml}" + "${LKP_SRC}/sbin/submit" \ + $(generate_submit_append_str "${test_os_mount}" "${test_testbox}") \ + "${test_yaml}" }
log_info "submit ${test_yaml} finished"
On Fri, Nov 20, 2020 at 08:54:51AM +0800, Wang Yong wrote:
On Thu, Nov 19, 2020 at 08:40:30PM +0800, Yu Chuan wrote:
- [ -n "${test_os_mount}" ] || die "cannot fine value of var: test_os_mount."
- [ -n "${test_testbox}" ] || die "cannot fine value of var: test_testbox."
cannot find?
good. :)
-------- Thanks Yu Chuan
Thanks, Wang Yong