[Addition] Use config_rootfs as a function to maintain scalability.
Signed-off-by: Yu Chuan 13186087857@163.com --- tests/iso2rootfs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
diff --git a/tests/iso2rootfs b/tests/iso2rootfs index f864188a8b02..bf842108ae02 100755 --- a/tests/iso2rootfs +++ b/tests/iso2rootfs @@ -339,6 +339,22 @@ run_qcow2rootfs() ./run "${qcow2_path}" "${ROOTFS_DES_DIR}" }
+ +############ config rootfs ############ +config_dns_resolver() +{ + local resolv_conf_path="${ROOTFS_DES_DIR}/etc/resolv.conf" + cat <<-EOF > "${resolv_conf_path}" + nameserver 114.114.114.114 + nameserver 8.8.8.8 + EOF +} + +config_rootfs() +{ + config_dns_resolver +} + ############ test rootfs ############ get_qemu_efi_fd() { @@ -499,6 +515,8 @@ main() config_qcow2rootfs run_qcow2rootfs
+ config_rootfs + test_rootfs [ -z ${test_yaml} ] || submit_test_job_yaml
On Fri, Nov 06, 2020 at 11:15:42AM +0800, Yu Chuan wrote:
[Addition] Use config_rootfs as a function to maintain scalability.
Signed-off-by: Yu Chuan 13186087857@163.com
tests/iso2rootfs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
diff --git a/tests/iso2rootfs b/tests/iso2rootfs index f864188a8b02..bf842108ae02 100755 --- a/tests/iso2rootfs +++ b/tests/iso2rootfs @@ -339,6 +339,22 @@ run_qcow2rootfs() ./run "${qcow2_path}" "${ROOTFS_DES_DIR}" }
+############ config rootfs ############ +config_dns_resolver() +{
- local resolv_conf_path="${ROOTFS_DES_DIR}/etc/resolv.conf"
- cat <<-EOF > "${resolv_conf_path}"
- nameserver 114.114.114.114
- nameserver 8.8.8.8
- EOF
+}
+config_rootfs() +{
- config_dns_resolver
why create 2 function config_rootfs only use config_dns_resolver, why not merge them?
Thanks, Shenwei
+}
############ test rootfs ############ get_qemu_efi_fd() { @@ -499,6 +515,8 @@ main() config_qcow2rootfs run_qcow2rootfs
- config_rootfs
- test_rootfs [ -z ${test_yaml} ] || submit_test_job_yaml
-- 2.23.0
+config_rootfs() +{
- config_dns_resolver
why create 2 function config_rootfs only use config_dns_resolver, why not merge them?
[Addtion] in my changelog:
Use config_rootfs as a function to maintain scalability.
-------- Thanks Yu Chuan
Thanks, Shenwei
+}
############ test rootfs ############ get_qemu_efi_fd() { @@ -499,6 +515,8 @@ main() config_qcow2rootfs run_qcow2rootfs
- config_rootfs
- test_rootfs [ -z ${test_yaml} ] || submit_test_job_yaml
-- 2.23.0