From 1adaf8a364f806318e275ee456433339669fd985 Mon Sep 17 00:00:00 2001 From: cxy Date: Tue, 23 May 2023 03:18:39 +0000 Subject: [PATCH 01/19] update testcases/cli-test/pyyaml/oe_test_pyyaml.sh. Signed-off-by: cxy --- testcases/cli-test/pyyaml/oe_test_pyyaml.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testcases/cli-test/pyyaml/oe_test_pyyaml.sh b/testcases/cli-test/pyyaml/oe_test_pyyaml.sh index 823d80262..96c5e0435 100644 --- a/testcases/cli-test/pyyaml/oe_test_pyyaml.sh +++ b/testcases/cli-test/pyyaml/oe_test_pyyaml.sh @@ -17,7 +17,7 @@ # @Desc : pyyaml function verification # ############################################ -source ${OET_PATH}/libs/locallibs/common_lib.sh +source "${OET_PATH}"/libs/locallibs/common_lib.sh function pre_test() { LOG_INFO "Start to prepare the test environment." DNF_INSTALL "python3-pyyaml" -- Gitee From 7356baf9ef82e91203133ef8ad99793400b50822 Mon Sep 17 00:00:00 2001 From: cxy Date: Wed, 24 May 2023 04:13:20 +0000 Subject: [PATCH 02/19] =?UTF-8?q?update=20testcases/embedded-test/version?= =?UTF-8?q?=5Fbasic=5Ftests/oe=5Ftest=5Fversion=5Fposix=5Fsuite=5Ftest=5F0?= =?UTF-8?q?01/=20oe=5Ftest=5Fversion=5Fposix=5Fsuite=5Ftest=5F001.sh.?= =?UTF-8?q?=E8=84=9A=E6=9C=AC=E4=BF=AE=E6=94=B9=EF=BC=9B=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E7=BB=93=E6=9E=84=EF=BC=8C=E5=A6=82=E6=9E=9C?= =?UTF-8?q?=E8=AE=BF=E9=97=AEcomm=5Flib.sh=E6=96=87=E4=BB=B6=EF=BC=8C?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E5=BA=94=E8=AF=A5=E4=BF=AE=E6=94=B9=E4=B8=BA?= =?UTF-8?q?source=20../../common=5Flibs/comm=5Flib.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: cxy --- .../oe_test_version_posix_suite_test_001.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testcases/embedded-test/version_basic_tests/oe_test_version_posix_suite_test_001/oe_test_version_posix_suite_test_001.sh b/testcases/embedded-test/version_basic_tests/oe_test_version_posix_suite_test_001/oe_test_version_posix_suite_test_001.sh index 2b10f7d01..e48d1d9ec 100644 --- a/testcases/embedded-test/version_basic_tests/oe_test_version_posix_suite_test_001/oe_test_version_posix_suite_test_001.sh +++ b/testcases/embedded-test/version_basic_tests/oe_test_version_posix_suite_test_001/oe_test_version_posix_suite_test_001.sh @@ -16,7 +16,7 @@ #@Desc : run posix test suite ##################################### -source ../comm_lib.sh +source ../../common_libs/comm_lib.sh CUR_DATE=`date +'%Y-%m-%d %H:%M:%S'` -- Gitee From 42c0435af4bffb36cb7784c615af19cea21def90 Mon Sep 17 00:00:00 2001 From: cxy Date: Wed, 24 May 2023 06:07:43 +0000 Subject: [PATCH 03/19] update testcases/embedded-test/version_basic_tests/oe_test_version_posix_suite_test_001/ Signed-off-by: cxy --- .../oe_test_version_posix_suite_test_001.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/testcases/embedded-test/version_basic_tests/oe_test_version_posix_suite_test_001/oe_test_version_posix_suite_test_001.sh b/testcases/embedded-test/version_basic_tests/oe_test_version_posix_suite_test_001/oe_test_version_posix_suite_test_001.sh index e48d1d9ec..644716eff 100644 --- a/testcases/embedded-test/version_basic_tests/oe_test_version_posix_suite_test_001/oe_test_version_posix_suite_test_001.sh +++ b/testcases/embedded-test/version_basic_tests/oe_test_version_posix_suite_test_001/oe_test_version_posix_suite_test_001.sh @@ -18,7 +18,7 @@ source ../../common_libs/comm_lib.sh -CUR_DATE=`date +'%Y-%m-%d %H:%M:%S'` +CUR_DATE=$(date +'%Y-%m-%d %H:%M:%S') # 测试对象、测试需要的工具等安装准备 function pre_test() { @@ -27,11 +27,11 @@ function pre_test() { EXECUTE_T="180m" MAKEDIR=$(cd .. && pwd) - chmod 777 ${MAKEDIR}/make + chmod 777 "${MAKEDIR}"/make MAKE=${MAKEDIR}/make - timestap=`stat -c %Y tmp_test/build.log` - formart_date=`date '+%Y-%m-%d %H:%M:%S' -d @$timestap` + timestap=$(stat -c %Y tmp_test/build.log) + formart_date=$(date '+%Y-%m-%d %H:%M:%S' -d @$timestap) date -s "$formart_date" LOG_INFO "End to prepare the test environment." @@ -41,26 +41,26 @@ function pre_test() { function run_test() { LOG_INFO "Start to run test." - pushd tmp_test/ + pushd tmp_test/ || exit pushd posixtestsuite/ POSIX_TARGET=./ ${MAKE} run-tests > ../run.log 2>&1 - popd + popd || exit awk -F': ' '{if(($2=="build" && $3!="PASS") || ($2=="link" && $3!="PASS") || (($2=="execution" && $3=="PASS"))) print $1}' build.log > skip.name cat ../ignore.out >> skip.name awk -F': ' '{if($2=="execution" && $3!="PASS") print $1}' run.log > fail.name while read line || [[ -n $line ]]; do - grep -q $line skip.name + grep -q "$line" skip.name if [ $? -eq 0 ]; then continue fi # 单独再执行一次 - ./posixtestsuite/$line.test + ./posixtestsuite/"$line".test CHECK_RESULT $? 0 0 "run posix testcase fail case name: $line" done < fail.name - popd + popd || exit LOG_INFO "End to run test." } -- Gitee From 6d611e9999d506fc13fc3c33e1f37ef7981b6074 Mon Sep 17 00:00:00 2001 From: cxy Date: Wed, 24 May 2023 06:24:49 +0000 Subject: [PATCH 04/19] update testcases/embedded-test/version_basic_tests/oe_test_version_posix_suite_test_001/ Signed-off-by: cxy --- .../oe_test_version_posix_suite_test_001.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testcases/embedded-test/version_basic_tests/oe_test_version_posix_suite_test_001/oe_test_version_posix_suite_test_001.sh b/testcases/embedded-test/version_basic_tests/oe_test_version_posix_suite_test_001/oe_test_version_posix_suite_test_001.sh index 644716eff..415ff8524 100644 --- a/testcases/embedded-test/version_basic_tests/oe_test_version_posix_suite_test_001/oe_test_version_posix_suite_test_001.sh +++ b/testcases/embedded-test/version_basic_tests/oe_test_version_posix_suite_test_001/oe_test_version_posix_suite_test_001.sh @@ -31,7 +31,7 @@ function pre_test() { MAKE=${MAKEDIR}/make timestap=$(stat -c %Y tmp_test/build.log) - formart_date=$(date '+%Y-%m-%d %H:%M:%S' -d @$timestap) + formart_date=$(date '+%Y-%m-%d %H:%M:%S' -d @"$timestap") date -s "$formart_date" LOG_INFO "End to prepare the test environment." @@ -42,7 +42,7 @@ function run_test() { LOG_INFO "Start to run test." pushd tmp_test/ || exit - pushd posixtestsuite/ + pushd posixtestsuite/ || exit POSIX_TARGET=./ ${MAKE} run-tests > ../run.log 2>&1 popd || exit -- Gitee From 1f41973f144c3989b07db8fb93e745c0927f207f Mon Sep 17 00:00:00 2001 From: cxy Date: Wed, 24 May 2023 07:22:01 +0000 Subject: [PATCH 05/19] update testcases/embedded-test/version_basic_tests/oe_test_version_posix_suite_test_001/ Signed-off-by: cxy --- .../oe_test_version_posix_suite_test_001.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/testcases/embedded-test/version_basic_tests/oe_test_version_posix_suite_test_001/oe_test_version_posix_suite_test_001.sh b/testcases/embedded-test/version_basic_tests/oe_test_version_posix_suite_test_001/oe_test_version_posix_suite_test_001.sh index 415ff8524..6f5525f6e 100644 --- a/testcases/embedded-test/version_basic_tests/oe_test_version_posix_suite_test_001/oe_test_version_posix_suite_test_001.sh +++ b/testcases/embedded-test/version_basic_tests/oe_test_version_posix_suite_test_001/oe_test_version_posix_suite_test_001.sh @@ -24,7 +24,7 @@ CUR_DATE=$(date +'%Y-%m-%d %H:%M:%S') function pre_test() { LOG_INFO "Start to prepare the test environment." - EXECUTE_T="180m" + # EXECUTE_T="180m" MAKEDIR=$(cd .. && pwd) chmod 777 "${MAKEDIR}"/make @@ -50,9 +50,9 @@ function run_test() { cat ../ignore.out >> skip.name awk -F': ' '{if($2=="execution" && $3!="PASS") print $1}' run.log > fail.name - while read line || [[ -n $line ]]; do + while read -r line || [[ -n $line ]]; do grep -q "$line" skip.name - if [ $? -eq 0 ]; then + if mycmd; then continue fi # 单独再执行一次 -- Gitee From 050b30c7ca067cdeb59e308a3715b5fdbbc56d82 Mon Sep 17 00:00:00 2001 From: cxy Date: Wed, 24 May 2023 07:38:57 +0000 Subject: [PATCH 06/19] update testcases/embedded-test/version_basic_tests/oe_test_version_posix_suite_test_001/ Signed-off-by: cxy --- .../oe_test_version_posix_suite_test_001.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/testcases/embedded-test/version_basic_tests/oe_test_version_posix_suite_test_001/oe_test_version_posix_suite_test_001.sh b/testcases/embedded-test/version_basic_tests/oe_test_version_posix_suite_test_001/oe_test_version_posix_suite_test_001.sh index 6f5525f6e..20d8ce563 100644 --- a/testcases/embedded-test/version_basic_tests/oe_test_version_posix_suite_test_001/oe_test_version_posix_suite_test_001.sh +++ b/testcases/embedded-test/version_basic_tests/oe_test_version_posix_suite_test_001/oe_test_version_posix_suite_test_001.sh @@ -15,6 +15,7 @@ #@License : Mulan PSL v2 #@Desc : run posix test suite ##################################### +# shellcheck disable=SC1091 source ../../common_libs/comm_lib.sh -- Gitee From fbf647bbf6950d39bab3746687485c48fa07d66d Mon Sep 17 00:00:00 2001 From: cxy Date: Wed, 24 May 2023 07:39:59 +0000 Subject: [PATCH 07/19] update testcases/cli-test/pyyaml/oe_test_pyyaml.sh. Signed-off-by: cxy --- testcases/cli-test/pyyaml/oe_test_pyyaml.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testcases/cli-test/pyyaml/oe_test_pyyaml.sh b/testcases/cli-test/pyyaml/oe_test_pyyaml.sh index 96c5e0435..0d0df305a 100644 --- a/testcases/cli-test/pyyaml/oe_test_pyyaml.sh +++ b/testcases/cli-test/pyyaml/oe_test_pyyaml.sh @@ -39,7 +39,7 @@ function run_test() { function post_test() { LOG_INFO "Start to restore the test environment." - DNF_REMOVE + DNF_REMOVE $@ rm -f generate.yaml LOG_INFO "End to restore the test environment." } -- Gitee From 6198cf39df8a6736d02990b26ed8e6c01d5cf952 Mon Sep 17 00:00:00 2001 From: cxy Date: Wed, 24 May 2023 07:51:08 +0000 Subject: [PATCH 08/19] update testcases/cli-test/pyyaml/oe_test_pyyaml.sh. Signed-off-by: cxy --- testcases/cli-test/pyyaml/oe_test_pyyaml.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testcases/cli-test/pyyaml/oe_test_pyyaml.sh b/testcases/cli-test/pyyaml/oe_test_pyyaml.sh index 0d0df305a..00ffbd46c 100644 --- a/testcases/cli-test/pyyaml/oe_test_pyyaml.sh +++ b/testcases/cli-test/pyyaml/oe_test_pyyaml.sh @@ -39,7 +39,7 @@ function run_test() { function post_test() { LOG_INFO "Start to restore the test environment." - DNF_REMOVE $@ + DNF_REMOVE "$@" rm -f generate.yaml LOG_INFO "End to restore the test environment." } -- Gitee From 9c741e49733cdbd1baf6004c9bb49b151b742975 Mon Sep 17 00:00:00 2001 From: cxy Date: Thu, 25 May 2023 03:11:13 +0000 Subject: [PATCH 09/19] =?UTF-8?q?update=20testcases/cli-test/fakechroot/oe?= =?UTF-8?q?=5Ftest=5Ffakechroot=5Fchroot.sh.=20chroot=E5=91=BD=E4=BB=A4?= =?UTF-8?q?=E4=B8=8D=E4=BE=9D=E8=B5=96fakechroot=E5=8C=85=EF=BC=8C?= =?UTF-8?q?=E6=89=80=E4=BB=A5=E8=84=9A=E6=9C=AC=E6=B2=A1=E5=BF=85=E8=A6=81?= =?UTF-8?q?DNF=5FINSTALL=20fakechroot?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: cxy --- testcases/cli-test/fakechroot/oe_test_fakechroot_chroot.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/testcases/cli-test/fakechroot/oe_test_fakechroot_chroot.sh b/testcases/cli-test/fakechroot/oe_test_fakechroot_chroot.sh index 7e1ebbfe2..67ba7e247 100644 --- a/testcases/cli-test/fakechroot/oe_test_fakechroot_chroot.sh +++ b/testcases/cli-test/fakechroot/oe_test_fakechroot_chroot.sh @@ -16,12 +16,12 @@ # @License : Mulan PSL v2 # @Desc : verify the uasge of fakechroot command # ############################################ +# shellcheck disable=SC1091 -source ${OET_PATH}/libs/locallibs/common_lib.sh +source "${OET_PATH}"/libs/locallibs/common_lib.sh function pre_test() { LOG_INFO "Start environmental preparation." - DNF_INSTALL fakechroot cp ./common/hello.sh ./ chmod 777 hello.sh LOG_INFO "End of environmental preparation!" @@ -47,7 +47,6 @@ function run_test() { function post_test() { LOG_INFO "Start to restore the test environment." - DNF_REMOVE rm -rf hello.sh test LOG_INFO "Finish restore the test environment." } -- Gitee From c428a4978dd3cdd940464ab7050a22f9b576bcf0 Mon Sep 17 00:00:00 2001 From: cxy Date: Thu, 25 May 2023 03:19:26 +0000 Subject: [PATCH 10/19] =?UTF-8?q?update=20testcases/cli-test/fakechroot/oe?= =?UTF-8?q?=5Ftest=5Ffakechroot=5Fenv=5F01.sh.=20env=E5=91=BD=E4=BB=A4?= =?UTF-8?q?=E4=B8=8D=E4=BE=9D=E8=B5=96fakechroot=E5=8C=85=EF=BC=8C?= =?UTF-8?q?=E6=89=80=E4=BB=A5=E8=84=9A=E6=9C=AC=E6=B2=A1=E5=BF=85=E8=A6=81?= =?UTF-8?q?DNF=5FINSTALL=20fakechroot?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: cxy --- testcases/cli-test/fakechroot/oe_test_fakechroot_env_01.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/testcases/cli-test/fakechroot/oe_test_fakechroot_env_01.sh b/testcases/cli-test/fakechroot/oe_test_fakechroot_env_01.sh index bb59d183b..8091645e6 100644 --- a/testcases/cli-test/fakechroot/oe_test_fakechroot_env_01.sh +++ b/testcases/cli-test/fakechroot/oe_test_fakechroot_env_01.sh @@ -16,12 +16,12 @@ # @License : Mulan PSL v2 # @Desc : verify the uasge of fakechroot command # ############################################ +# shellcheck disable=SC1091 -source ${OET_PATH}/libs/locallibs/common_lib.sh +source "${OET_PATH}"/libs/locallibs/common_lib.sh function pre_test() { LOG_INFO "Start environmental preparation." - DNF_INSTALL fakechroot cp ./common/hello.sh ./ chmod 777 hello.sh mkdir test @@ -68,7 +68,6 @@ function run_test() { function post_test() { LOG_INFO "Start to restore the test environment." - DNF_REMOVE rm -rf hello.sh test LOG_INFO "Finish restore the test environment." } -- Gitee From f3a976951d8cd7a3dc82e3e9bc79b7e7cd67867a Mon Sep 17 00:00:00 2001 From: cxy Date: Thu, 25 May 2023 03:22:54 +0000 Subject: [PATCH 11/19] =?UTF-8?q?update=20testcases/cli-test/fakechroot/oe?= =?UTF-8?q?=5Ftest=5Ffakechroot=5Fenv=5F02.sh.=20env=E5=91=BD=E4=BB=A4?= =?UTF-8?q?=E4=B8=8D=E4=BE=9D=E8=B5=96fakechroot=E5=8C=85=EF=BC=8C?= =?UTF-8?q?=E6=89=80=E4=BB=A5=E8=84=9A=E6=9C=AC=E6=B2=A1=E5=BF=85=E8=A6=81?= =?UTF-8?q?DNF=5FINSTALL=20fakechroot?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: cxy --- testcases/cli-test/fakechroot/oe_test_fakechroot_env_02.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/testcases/cli-test/fakechroot/oe_test_fakechroot_env_02.sh b/testcases/cli-test/fakechroot/oe_test_fakechroot_env_02.sh index fc2cee94c..736b47d5c 100644 --- a/testcases/cli-test/fakechroot/oe_test_fakechroot_env_02.sh +++ b/testcases/cli-test/fakechroot/oe_test_fakechroot_env_02.sh @@ -16,12 +16,12 @@ # @License : Mulan PSL v2 # @Desc : verify the uasge of fakechroot command # ############################################ +# shellcheck disable=SC1091 -source ${OET_PATH}/libs/locallibs/common_lib.sh +source "${OET_PATH}"/libs/locallibs/common_lib.sh function pre_test() { LOG_INFO "Start environmental preparation." - DNF_INSTALL fakechroot cp ./common/hello.sh ./ chmod 777 hello.sh LOG_INFO "End of environmental preparation!" @@ -59,7 +59,6 @@ function run_test() { function post_test() { LOG_INFO "Start to restore the test environment." - DNF_REMOVE rm -rf hello.sh LOG_INFO "Finish restore the test environment." } -- Gitee From 8f8a72cdd619de2e173f2f1d5fdfa51fffec0060 Mon Sep 17 00:00:00 2001 From: cxy Date: Thu, 25 May 2023 03:29:07 +0000 Subject: [PATCH 12/19] update testcases/cli-test/fakechroot/oe_test_fakechroot_chroot.sh. Signed-off-by: cxy --- testcases/cli-test/fakechroot/oe_test_fakechroot_chroot.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testcases/cli-test/fakechroot/oe_test_fakechroot_chroot.sh b/testcases/cli-test/fakechroot/oe_test_fakechroot_chroot.sh index 67ba7e247..254818ad4 100644 --- a/testcases/cli-test/fakechroot/oe_test_fakechroot_chroot.sh +++ b/testcases/cli-test/fakechroot/oe_test_fakechroot_chroot.sh @@ -36,7 +36,7 @@ function run_test() { chroot --userspec=root:root --skip-chdir / ./hello.sh | grep "hello world!" CHECK_RESULT $? 0 0 "Check chroot --userspec --skip-chdir failed" - chroot --help | fgrep "Usage: chroot [OPTION]" + chroot --help | grep -F "Usage: chroot [OPTION]" CHECK_RESULT $? 0 0 "Check chroot --help failed" chroot --version | grep "chroot (GNU coreutils) [[:digit:]]" -- Gitee From 0a46641fee1cc045bc3d630945983dcdfcd98161 Mon Sep 17 00:00:00 2001 From: cxy Date: Thu, 25 May 2023 03:39:59 +0000 Subject: [PATCH 13/19] update testcases/cli-test/fakechroot/oe_test_fakechroot_env_02.sh. Signed-off-by: cxy --- testcases/cli-test/fakechroot/oe_test_fakechroot_env_02.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testcases/cli-test/fakechroot/oe_test_fakechroot_env_02.sh b/testcases/cli-test/fakechroot/oe_test_fakechroot_env_02.sh index 736b47d5c..968d7772f 100644 --- a/testcases/cli-test/fakechroot/oe_test_fakechroot_env_02.sh +++ b/testcases/cli-test/fakechroot/oe_test_fakechroot_env_02.sh @@ -48,7 +48,7 @@ function run_test() { env --debug | grep "USER=" CHECK_RESULT $? 0 0 "Check env --debug failed" - env --help | fgrep "Usage: env [OPTION]" + env --help | grep -F "Usage: env [OPTION]" CHECK_RESULT $? 0 0 "Check env --help failed" env --version | grep "env (GNU coreutils) [[:digit:]]" -- Gitee From 0296a8a98bed146bde0132ae9317d607666bbc18 Mon Sep 17 00:00:00 2001 From: cxy Date: Fri, 26 May 2023 01:43:50 +0000 Subject: [PATCH 14/19] =?UTF-8?q?update=20testcases/cli-test/nototools/oe?= =?UTF-8?q?=5Ftest=5Fnototools=5F0.2.17=5Fnotodiff/=20=E5=9B=A0=E4=B8=BA?= =?UTF-8?q?=E8=84=9A=E6=9C=ACoe=5Ftest=5Fnototools=5F0.2.17=5Fnotodiff.sh?= =?UTF-8?q?=E4=B8=AD=E6=9C=89=E7=94=A8=E5=88=B0common=5Fpre=20common=5Fpos?= =?UTF-8?q?t=E5=87=BD=E6=95=B0,=E6=89=80=E4=BB=A5=E9=9C=80=E8=A6=81source?= =?UTF-8?q?=20=20../common/common.sh=20=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: cxy --- .../oe_test_nototools_0.2.17_notodiff.sh | 40 ++++++++++--------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/testcases/cli-test/nototools/oe_test_nototools_0.2.17_notodiff/oe_test_nototools_0.2.17_notodiff.sh b/testcases/cli-test/nototools/oe_test_nototools_0.2.17_notodiff/oe_test_nototools_0.2.17_notodiff.sh index 2b8665d8a..8d16d450d 100644 --- a/testcases/cli-test/nototools/oe_test_nototools_0.2.17_notodiff/oe_test_nototools_0.2.17_notodiff.sh +++ b/testcases/cli-test/nototools/oe_test_nototools_0.2.17_notodiff/oe_test_nototools_0.2.17_notodiff.sh @@ -17,8 +17,10 @@ # @License : Mulan PSL v2 # @Desc : TEST notodiff in nototools options # ############################################# +# shellcheck disable=SC1091 -source ${OET_PATH}/libs/locallibs/common_lib.sh +source "${OET_PATH}"/libs/locallibs/common_lib.sh +source ../common/common.sh # Preloaded data, parameter configuration function config_params() { @@ -53,60 +55,60 @@ function run_test() { CHECK_RESULT $? 0 0 "option: --help error" #Test the --before,--after parameter - notodiff --before test_input/test_input_1/${TEST_FILE_1} --after test_input/test_input_1/${TEST_FILE_2} | grep -q "17 differences in glyph shape" + notodiff --before test_input/test_input_1/"${TEST_FILE_1}" --after test_input/test_input_1/"${TEST_FILE_2}" | grep -q "17 differences in glyph shape" CHECK_RESULT $? 0 0 "option: --before,--after error" #Test the -t parameter - notodiff --before test_input/test_input_1/${TEST_FILE_1} --after test_input/test_input_1/${TEST_FILE_2} -t area | grep -q "17 differences in glyph shape" + notodiff --before test_input/test_input_1/"${TEST_FILE_1}" --after test_input/test_input_1/"${TEST_FILE_2}" -t area | grep -q "17 differences in glyph shape" CHECK_RESULT $? 0 0 "option: -t area error" - notodiff --before test_input/test_input_1/${TEST_FILE_1} --after test_input/test_input_1/${TEST_FILE_2} --diff-type shape | grep -q "17 differences in glyph shape" + notodiff --before test_input/test_input_1/"${TEST_FILE_1}" --after test_input/test_input_1/"${TEST_FILE_2}" --diff-type shape | grep -q "17 differences in glyph shape" CHECK_RESULT $? 0 0 "option: --diff-type shape error" - notodiff --before test_input/test_input_1/${TEST_FILE_1} --after test_input/test_input_1/${TEST_FILE_2} -t area-shape-product | grep -q "17 differences in glyph shape" + notodiff --before test_input/test_input_1/"${TEST_FILE_1}" --after test_input/test_input_1/"${TEST_FILE_2}" -t area-shape-product | grep -q "17 differences in glyph shape" CHECK_RESULT $? 0 0 "option: -t area-shape-product error" - notodiff --before test_input/test_input_1/${TEST_FILE_1} --after test_input/test_input_1/${TEST_FILE_2} --diff-type rendered | grep -q "3 differences in glyph shape" + notodiff --before test_input/test_input_1/"${TEST_FILE_1}" --after test_input/test_input_1/"${TEST_FILE_2}" --diff-type rendered | grep -q "3 differences in glyph shape" CHECK_RESULT $? 0 0 "option: --diff-type rendered error" - notodiff --before test_input/test_input_1/${TEST_FILE_1} --after test_input/test_input_1/${TEST_FILE_2} -t gsub | grep -q "9 differences in GSUB rules" + notodiff --before test_input/test_input_1/"${TEST_FILE_1}" --after test_input/test_input_1/"${TEST_FILE_2}" -t gsub | grep -q "9 differences in GSUB rules" CHECK_RESULT $? 0 0 "option: -t gsub error" - notodiff --before test_input/test_input_1/${TEST_FILE_1} --after test_input/test_input_1/${TEST_FILE_2} --diff-type gpos | grep -qE "115 differences in mark-to-mark positioning rule coverage|0 differences in mark-to-mark positioning rule values" + notodiff --before test_input/test_input_1/"${TEST_FILE_1}" --after test_input/test_input_1/"${TEST_FILE_2}" --diff-type gpos | grep -qE "115 differences in mark-to-mark positioning rule coverage|0 differences in mark-to-mark positioning rule values" CHECK_RESULT $? 0 0 "option: --diff-type gpos error" #Test the -m parameter - notodiff --before test_input/test_input_1 --after test_input/test_input_2 -m *.ttf | grep -q "17 differences in glyph shape" + notodiff -- *glob* test_input/test_input_1 test_input/test_input_2 -m *.ttf | grep -q "17 differences in glyph shape" CHECK_RESULT $? 0 0 "option: -m error" - notodiff --before test_input/test_input_1 --after test_input/test_input_2 --match *.ttf | grep -q "17 differences in glyph shape" + notodiff -- *glob* test_input/test_input_1 test_input/test_input_2 --match *.ttf | grep -q "17 differences in glyph shape" CHECK_RESULT $? 0 0 "option: --match error" #Test the -l parameter - notodiff --before test_input/test_input_1/${TEST_FILE_1} --after test_input/test_input_1/${TEST_FILE_2} -l 10 | grep -q "17 differences in glyph shape" + notodiff --before test_input/test_input_1/"${TEST_FILE_1}" --after test_input/test_input_1/"${TEST_FILE_2}" -l 10 | grep -q "17 differences in glyph shape" CHECK_RESULT $? 0 0 "option: -l error" - notodiff --before test_input/test_input_1/${TEST_FILE_1} --after test_input/test_input_1/${TEST_FILE_2} --out-lines 10 | grep -q "17 differences in glyph shape" + notodiff --before test_input/test_input_1/"${TEST_FILE_1}" --after test_input/test_input_1/"${TEST_FILE_2}" --out-lines 10 | grep -q "17 differences in glyph shape" CHECK_RESULT $? 0 0 "option: --out-lines error" #Test the -w parameter - notodiff --before test_input/test_input_1/${TEST_FILE_1} --after test_input/test_input_1/${TEST_FILE_2} -w ${MISS_LIST} | grep -q "15 differences in glyph shape" + notodiff --before test_input/test_input_1/"${TEST_FILE_1}" --after test_input/test_input_1/"${TEST_FILE_2}" -w ${MISS_LIST}" | grep -q "15 differences in glyph shape" CHECK_RESULT $? 0 0 "option: -w error" - notodiff --before test_input/test_input_1/${TEST_FILE_1} --after test_input/test_input_1/${TEST_FILE_2} --allowlist ${MISS_LIST} | grep -q "15 differences in glyph shape" + notodiff --before test_input/test_input_1/"${TEST_FILE_1}" --after test_input/test_input_1/"${TEST_FILE_2}" --allowlist "${MISS_LIST}" | grep -q "15 differences in glyph shape" CHECK_RESULT $? 0 0 "option: --allowlist error" #Test the --font-size parameter for i in "64" "128" do - notodiff --before test_input/test_input_1/${TEST_FILE_1} --after test_input/test_input_1/${TEST_FILE_2} -t rendered --font-size ${i} | grep -q "3 differences in glyph shape" + notodiff --before test_input/test_input_1/"${TEST_FILE_1}" --after test_input/test_input_1/"${TEST_FILE_2}" -t rendered --font-size ${i} | grep -q "3 differences in glyph shape" CHECK_RESULT $? 0 0 "option: --font-size ${i} error" done #Test the --render-path parameter - notodiff --before test_input/test_input_1/${TEST_FILE_1} --after test_input/test_input_1/${TEST_FILE_2} -t rendered --render-path ${TMP_DIR} | grep -q "3 differences in glyph shape" + notodiff --before test_input/test_input_1/"${TEST_FILE_1}" --after test_input/test_input_1/"${TEST_FILE_2}" -t rendered --render-path "${TMP_DIR}" | grep -q "3 differences in glyph shape" CHECK_RESULT $? 0 0 "option: --render-path error" #Test the --diff-threshold parameter - notodiff --before test_input/test_input_1/${TEST_FILE_1} --after test_input/test_input_1/${TEST_FILE_2} --diff-threshold 1 | grep -q "17 differences in glyph shape" + notodiff --before test_input/test_input_1/"${TEST_FILE_1}" --after test_input/test_input_1/"${TEST_FILE_2}" --diff-threshold 1 | grep -q "17 differences in glyph shape" CHECK_RESULT $? 0 0 "option: --diff-threshold error" #Test the --verbose parameter for i in "debug" "info" "warning" "critical" "error" do - notodiff --before test_input/test_input_1/${TEST_FILE_1} --after test_input/test_input_1/${TEST_FILE_2} --verbose ${i} | grep -q "17 differences in glyph shape" + notodiff --before test_input/test_input_1/"${TEST_FILE_1}" --after test_input/test_input_1/"${TEST_FILE_2}" --verbose ${i} | grep -q "17 differences in glyph shape" CHECK_RESULT $? 0 0 "option: --verbose ${i} error" done @@ -117,7 +119,7 @@ function run_test() { function post_test() { LOG_INFO "Start to restore the test environment." - rm -rf ${TMP_DIR} + rm -rf "${TMP_DIR}" common_post LOG_INFO "End to restore the test environment." -- Gitee From 919bb8159fe9fedddd957c03d962f5e5d6b85271 Mon Sep 17 00:00:00 2001 From: cxy Date: Fri, 26 May 2023 01:56:18 +0000 Subject: [PATCH 15/19] update testcases/cli-test/nototools/oe_test_nototools_0.2.17_notodiff/ Signed-off-by: cxy --- .../oe_test_nototools_0.2.17_notodiff.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testcases/cli-test/nototools/oe_test_nototools_0.2.17_notodiff/oe_test_nototools_0.2.17_notodiff.sh b/testcases/cli-test/nototools/oe_test_nototools_0.2.17_notodiff/oe_test_nototools_0.2.17_notodiff.sh index 8d16d450d..5c99e9bbd 100644 --- a/testcases/cli-test/nototools/oe_test_nototools_0.2.17_notodiff/oe_test_nototools_0.2.17_notodiff.sh +++ b/testcases/cli-test/nototools/oe_test_nototools_0.2.17_notodiff/oe_test_nototools_0.2.17_notodiff.sh @@ -85,7 +85,7 @@ function run_test() { CHECK_RESULT $? 0 0 "option: --out-lines error" #Test the -w parameter - notodiff --before test_input/test_input_1/"${TEST_FILE_1}" --after test_input/test_input_1/"${TEST_FILE_2}" -w ${MISS_LIST}" | grep -q "15 differences in glyph shape" + notodiff --before test_input/test_input_1/"${TEST_FILE_1}" --after test_input/test_input_1/"${TEST_FILE_2}" -w "${MISS_LIST}" | grep -q "15 differences in glyph shape" CHECK_RESULT $? 0 0 "option: -w error" notodiff --before test_input/test_input_1/"${TEST_FILE_1}" --after test_input/test_input_1/"${TEST_FILE_2}" --allowlist "${MISS_LIST}" | grep -q "15 differences in glyph shape" CHECK_RESULT $? 0 0 "option: --allowlist error" -- Gitee From 32bf0a6e4a4b66db1a5c7582b8933fd8c4017531 Mon Sep 17 00:00:00 2001 From: cxy Date: Tue, 30 May 2023 06:26:09 +0000 Subject: [PATCH 16/19] =?UTF-8?q?update=20testcases/cli-test/libosinfo/oe?= =?UTF-8?q?=5Ftest=5Fosinfo-db-import/oe=5Ftest=5Fosinfo-db-import.sh.=20?= =?UTF-8?q?=E5=9B=A0=E4=B8=BAwget=E4=B8=8B=E8=BD=BD=E7=9A=84=E5=8C=85?= =?UTF-8?q?=E6=98=AFosinfo-db-20230308.tar.xz=EF=BC=8C=E6=89=80=E4=BB=A5te?= =?UTF-8?q?st=20-e=20=E5=91=BD=E4=BB=A4=E6=B5=8B=E8=AF=95=E7=9A=84?= =?UTF-8?q?=E5=8C=85=E5=BA=94=E8=AF=A5=E6=98=AFosinfo-db-20230308.tar.xz?= =?UTF-8?q?=E8=80=8C=E4=B8=8D=E6=98=AFosinfo-db-20230331.tar.xz?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: cxy --- .../oe_test_osinfo-db-import/oe_test_osinfo-db-import.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testcases/cli-test/libosinfo/oe_test_osinfo-db-import/oe_test_osinfo-db-import.sh b/testcases/cli-test/libosinfo/oe_test_osinfo-db-import/oe_test_osinfo-db-import.sh index 900c7986f..6f37bb710 100644 --- a/testcases/cli-test/libosinfo/oe_test_osinfo-db-import/oe_test_osinfo-db-import.sh +++ b/testcases/cli-test/libosinfo/oe_test_osinfo-db-import/oe_test_osinfo-db-import.sh @@ -35,7 +35,7 @@ function run_test() { cd testdir osinfo-db-export CHECK_RESULT $? 0 0 "Failed to export data" - test -e osinfo-db-20230331.tar.xz + test -e osinfo-db-20230308.tar.xz CHECK_RESULT $? 0 0 "Export file does not exist" LOG_INFO "End of the test." } -- Gitee From c96d2d95e72e95b3976961f2ea47a2b44d36e74a Mon Sep 17 00:00:00 2001 From: cxy Date: Tue, 30 May 2023 08:13:09 +0000 Subject: [PATCH 17/19] update testcases/cli-test/libosinfo/oe_test_osinfo-db-import/oe_test_osinfo-db-import.sh. Signed-off-by: cxy --- .../oe_test_osinfo-db-import/oe_test_osinfo-db-import.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/testcases/cli-test/libosinfo/oe_test_osinfo-db-import/oe_test_osinfo-db-import.sh b/testcases/cli-test/libosinfo/oe_test_osinfo-db-import/oe_test_osinfo-db-import.sh index 6f37bb710..e72ab5dc9 100644 --- a/testcases/cli-test/libosinfo/oe_test_osinfo-db-import/oe_test_osinfo-db-import.sh +++ b/testcases/cli-test/libosinfo/oe_test_osinfo-db-import/oe_test_osinfo-db-import.sh @@ -22,7 +22,7 @@ source "$OET_PATH/libs/locallibs/common_lib.sh" function pre_test() { LOG_INFO "Start to prepare the test environment." DNF_INSTALL "osinfo-db-tools" - pwd=`pwd` + pwd=$(pwd) LOG_INFO "Finish preparing the test environment." } @@ -32,7 +32,7 @@ function run_test() { osinfo-db-import --local osinfo-db-20230308.tar.xz CHECK_RESULT $? 0 0 "Failed to import data" mkdir testdir - cd testdir + cd testdir || exit osinfo-db-export CHECK_RESULT $? 0 0 "Failed to export data" test -e osinfo-db-20230308.tar.xz @@ -42,9 +42,9 @@ function run_test() { function post_test() { LOG_INFO "Start to restore the test environment." - cd $pwd + cd $pwd || exit rm -rf testdir osinfo-db-20230308.tar.xz - DNF_REMOVE + DNF_REMOVE "$@" LOG_INFO "Finish restoring the test environment." } -- Gitee From f0a4143de08a3c706382852442148569f1dafd93 Mon Sep 17 00:00:00 2001 From: cxy Date: Tue, 30 May 2023 08:34:45 +0000 Subject: [PATCH 18/19] update testcases/cli-test/libosinfo/oe_test_osinfo-db-import/oe_test_osinfo-db-import.sh. Signed-off-by: cxy --- .../oe_test_osinfo-db-import/oe_test_osinfo-db-import.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testcases/cli-test/libosinfo/oe_test_osinfo-db-import/oe_test_osinfo-db-import.sh b/testcases/cli-test/libosinfo/oe_test_osinfo-db-import/oe_test_osinfo-db-import.sh index e72ab5dc9..67b4ac9ed 100644 --- a/testcases/cli-test/libosinfo/oe_test_osinfo-db-import/oe_test_osinfo-db-import.sh +++ b/testcases/cli-test/libosinfo/oe_test_osinfo-db-import/oe_test_osinfo-db-import.sh @@ -42,7 +42,7 @@ function run_test() { function post_test() { LOG_INFO "Start to restore the test environment." - cd $pwd || exit + cd "$pwd" || exit rm -rf testdir osinfo-db-20230308.tar.xz DNF_REMOVE "$@" LOG_INFO "Finish restoring the test environment." -- Gitee From 7a338c6e09faa1a5f0210c1de04cf74daa22fc92 Mon Sep 17 00:00:00 2001 From: cxy Date: Thu, 1 Jun 2023 10:29:29 +0000 Subject: [PATCH 19/19] =?UTF-8?q?add=20suite2cases/log4cplus.json.=20?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B/testcases/cli-test/log4cpl?= =?UTF-8?q?us/oe=5Ftest=5Flog4cplus.sh=20=E6=B2=A1=E6=9C=89=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E5=A5=97=EF=BC=8C=E6=89=80=E4=BB=A5=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E5=A5=97=E4=BF=A1=E6=81=AFlog4cplus.json?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: cxy --- suite2cases/log4cplus.json | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 suite2cases/log4cplus.json diff --git a/suite2cases/log4cplus.json b/suite2cases/log4cplus.json new file mode 100644 index 000000000..682cdd682 --- /dev/null +++ b/suite2cases/log4cplus.json @@ -0,0 +1,9 @@ +{ + "path": "$OET_PATH/testcases/cli-test/log4cplus", + "cases": [ + { + "name": "oe_test_log4cplus" + } + + ] +} -- Gitee