From d69cc51669f2106ac0cb2e2c0d4b4e49e6daa841 Mon Sep 17 00:00:00 2001 From: fire-kylin Date: Fri, 23 Jul 2021 15:19:34 +0800 Subject: [PATCH 1/2] init automake-test --- suite2cases/automake | 1 + testcases/cli-test/automake/amhello.tar.gz | Bin 0 -> 694 bytes .../cli-test/automake/oe_test_automake.sh | 78 ++++++++++++++++++ .../cli-test/help2man/oe_test_help2man.sh | 2 +- 4 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 suite2cases/automake create mode 100644 testcases/cli-test/automake/amhello.tar.gz create mode 100644 testcases/cli-test/automake/oe_test_automake.sh diff --git a/suite2cases/automake b/suite2cases/automake new file mode 100644 index 0000000..838b47a --- /dev/null +++ b/suite2cases/automake @@ -0,0 +1 @@ +oe_test_automake \ No newline at end of file diff --git a/testcases/cli-test/automake/amhello.tar.gz b/testcases/cli-test/automake/amhello.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..49e7001a594ef229eb427620616b5ea97fb1414e GIT binary patch literal 694 zcmV;n0!jTJiwFP!000001MQewZ<{a_fb-0+ILlsAX{A6gJan7JC{3d-7ZIX7L=~do zCRPblU^-3H{`>4Cgk@S4RSL9P{V9s0<74b_d@iOJcQZ}t_ ztmRu;s;-!ZZkQUEt6CQsEkN}xsiMefkO8zvi0^;IBza2j`x4{0i3K%_ytBXSSQi7Q zjybr24PAfI{wmT+`y<6 z;V#XfH=Kf1&~z2tV_BMEC~^#x58NL^Q=mAftP4Z1)h{0;OE3LT1^=S*|2zw8$^p-h z|6Nr_BK|kQzWrALN#yX@a~z8Qnu2!mA88u1zpiOW#Q!FEPm(Y$A`BnHG`S-SdHGqY zWI2sU%0&`MDDd6Uc}z)kBK?#A9txUw+E;w@z%0$;=w18dd?zmxOB=?PeQos|f8x3Q zVGr8!MlHj%$P!S_rC%@o65cTT{y$(D`;Np|4pv8;p-UmD^ueG!g%sU^4xB(RX=}XZ|lmB&U9qhW>@+Sxi>nosi&lQ2GC+{x32X z0FIpM51#+bs{ZRDe*dQ%x;Xzef@S;tVc+Y_x7*<61I$%f;mvKaI4!U7zATbLPP4_$ ziDV7dBYbP>jRw}W)0v;nf;fiL8P2ja<2QzwEE2A1uS-kcw)szcG`#Hh{3{kx9Cy;0 zm*>rm;Lr)4Wb;njsPeC0JMWzx&QzG literal 0 HcmV?d00001 diff --git a/testcases/cli-test/automake/oe_test_automake.sh b/testcases/cli-test/automake/oe_test_automake.sh new file mode 100644 index 0000000..1bd0349 --- /dev/null +++ b/testcases/cli-test/automake/oe_test_automake.sh @@ -0,0 +1,78 @@ +#!/usr/bin/bash + +# Copyright (c) 2021. Huawei Technologies Co.,Ltd.ALL rights reserved. +# This program is licensed under Mulan PSL v2. +# You can use it according to the terms and conditions of the Mulan PSL v2. +# http://license.coscl.org.cn/MulanPSL2 +# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +# See the Mulan PSL v2 for more details. +#################################### +#@Author : fire-kylin +#@Contact : sugarkylin@foxmail.com +#@Date : 2021-07-23 +#@License : Mulan PSL v2 +#@Version : 1.0 +#@Desc : command test automake +##################################### + +source ${OET_PATH}/libs/locallibs/common_lib.sh + +function pre_test() +{ + LOG_INFO "Start to prepare the test environment." + + DNF_INSTALL "automake" + DNF_INSTALL "autoconf" + + LOG_INFO "End to prepare the test environment." +} + +function run_test() +{ + LOG_INFO "Start to run test." + + automake --help + CHECK_RESULT $? 0 0 "log message: Failed to run command: automake --help" + + automake --version + CHECK_RESULT $? 0 0 "log message: Failed to run command: automake --version" + + tar -zxvf amhello.tar.gz + + cd ./amhello + + # autoreconf is a script that calls autoconf, automake, and a bunch of other commands in the right order. + # This will test the main features of the automake package. + autoreconf --install + CHECK_RESULT $? 0 0 "log message: Failed to run command: autoreconf --install" + + ./configure + CHECK_RESULT $? 0 0 "log message: Failed to run command: ./configure" + + make + CHECK_RESULT $? 0 0 "log message: Failed to run command: make" + + ./src/hello + CHECK_RESULT $? 0 0 "log message: Failed to run command: ./src/hello" + + make distcheck + CHECK_RESULT $? 0 0 "log message: Failed to run command: make distcheck" + + cd .. + + LOG_INFO "End to run test." +} + +function post_test() +{ + LOG_INFO "Start to restore the test environment." + + DNF_REMOVE + rm -rf ./amhello + + LOG_INFO "End to restore the test environment." +} + +main "$@" diff --git a/testcases/cli-test/help2man/oe_test_help2man.sh b/testcases/cli-test/help2man/oe_test_help2man.sh index 836ee03..f97d3e0 100644 --- a/testcases/cli-test/help2man/oe_test_help2man.sh +++ b/testcases/cli-test/help2man/oe_test_help2man.sh @@ -9,7 +9,7 @@ # MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. # See the Mulan PSL v2 for more details. #################################### -#@Author : ice-ktlin +#@Author : ice-kylin #@Contact : wminid@yeah.net #@Date : 2021-07-14 23:33:33 #@License : Mulan PSL v2 -- Gitee From 0a40d3c36a315b016d33ce267d06bad41cb1d0fa Mon Sep 17 00:00:00 2001 From: fire-kylin Date: Tue, 10 Aug 2021 14:06:38 +0800 Subject: [PATCH 2/2] init maven-test --- suite2cases/maven | 1 + testcases/cli-test/maven/maven-hello.tar.gz | Bin 0 -> 2368 bytes testcases/cli-test/maven/oe_test_maven.sh | 72 ++++++++++++++++++ .../oe_test_tpm-quote-tools.sh | 49 ++++++++++++ 4 files changed, 122 insertions(+) create mode 100644 suite2cases/maven create mode 100644 testcases/cli-test/maven/maven-hello.tar.gz create mode 100644 testcases/cli-test/maven/oe_test_maven.sh create mode 100644 testcases/cli-test/tpm-quote-tools/oe_test_tpm-quote-tools.sh diff --git a/suite2cases/maven b/suite2cases/maven new file mode 100644 index 0000000..72b1b35 --- /dev/null +++ b/suite2cases/maven @@ -0,0 +1 @@ +oe_test_maven \ No newline at end of file diff --git a/testcases/cli-test/maven/maven-hello.tar.gz b/testcases/cli-test/maven/maven-hello.tar.gz new file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