From 31f542ae9f24aabe0290415b9a86313bbd67bb85 Mon Sep 17 00:00:00 2001 From: aph <2582215315@qq.com> Date: Thu, 25 May 2023 19:10:42 +0800 Subject: [PATCH 1/3] python testcase Signed-off-by: aph <2582215315@qq.com> --- coreutils/testcase/python3.10.sh | 65 ++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100755 coreutils/testcase/python3.10.sh diff --git a/coreutils/testcase/python3.10.sh b/coreutils/testcase/python3.10.sh new file mode 100755 index 0000000..1cad673 --- /dev/null +++ b/coreutils/testcase/python3.10.sh @@ -0,0 +1,65 @@ +#!/bin/bash +############################################################################### +# @用例ID: 20230525-181234-711502825 +# @用例名称: python3.10 +# @用例级别: 3 +# @用例标签: +# @用例类型: 功能 +############################################################################### +[ -z "$TST_TS_TOPDIR" ] && { + TST_TS_TOPDIR="$(realpath "$(dirname "$0")/..")" + export TST_TS_TOPDIR +} +source "${TST_TS_TOPDIR}/tst_common/lib/common.sh" || exit 1 +############################################################################### + +g_tmpdir="$(mktemp -d)" + +tc_setup() { + msg "this is tc_setup" + if ["$(python --version)" != "3.10.*"]; + then + echo "python 3.10.* not installed!" + return 1 + fi + + # @预置条件: + # @预置条件: + return 0 +} + +do_test() { + msg "this is do_test" + cat > HelloWorld.py < Date: Thu, 25 May 2023 20:00:44 +0800 Subject: [PATCH 2/3] python testcase Signed-off-by: aph <2582215315@qq.com> --- coreutils/testcase/python3.10.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/coreutils/testcase/python3.10.sh b/coreutils/testcase/python3.10.sh index 1cad673..8a71b66 100755 --- a/coreutils/testcase/python3.10.sh +++ b/coreutils/testcase/python3.10.sh @@ -29,24 +29,22 @@ tc_setup() { } do_test() { + + @testcase step1 : create a file msg "this is do_test" cat > HelloWorld.py < Date: Sun, 28 May 2023 21:22:56 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=96=B0=E5=A2=9Epython=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E7=94=A8=E4=BE=8B=E9=AA=8C=E8=AF=81python=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: An <54012338+Aph-CUG@users.noreply.github.com> --- coreutils/testcase/python3.10.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/coreutils/testcase/python3.10.sh b/coreutils/testcase/python3.10.sh index 8a71b66..94ed8f4 100755 --- a/coreutils/testcase/python3.10.sh +++ b/coreutils/testcase/python3.10.sh @@ -16,27 +16,27 @@ source "${TST_TS_TOPDIR}/tst_common/lib/common.sh" || exit 1 g_tmpdir="$(mktemp -d)" tc_setup() { + # @测试是否安装python3.10 msg "this is tc_setup" if ["$(python --version)" != "3.10.*"]; then echo "python 3.10.* not installed!" return 1 fi - - # @预置条件: - # @预置条件: + return 0 } do_test() { - @testcase step1 : create a file + #@测试步骤1: 创建一个python文件 msg "this is do_test" cat > HelloWorld.py <