[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 | 35 ++++++++--------------------------- 2 files changed, 8 insertions(+), 30 deletions(-)
diff --git a/jobs/iso2rootfs.yaml b/jobs/iso2rootfs.yaml index 1e1dfc862136..629b53febb2f 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 bb2da3208646..3015c6f62947 100755 --- a/tests/iso2rootfs +++ b/tests/iso2rootfs @@ -56,7 +56,7 @@ check_yaml_vars()
for yaml_t in "${yaml_vars[@]}" do - [ -n "$(eval echo "$${yaml_t}")" ] || die "cannot fine value of var: ${yaml_t}." + [ -n "$(eval echo "$${yaml_t}")" ] || die "cannot find value of var: ${yaml_t}." done }
@@ -453,17 +453,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() @@ -474,18 +465,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 find value of var: test_os_mount." + [ -n "${test_testbox}" ] || die "cannot find value of var: test_testbox."
cd "${LKP_SRC}" && { chmod +x ./sbin/install-dependencies.sh @@ -499,9 +480,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"