From 1542e6f9b4241bf59e462741a0490a61e17e612a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=B3=E5=90=8D=E6=89=AC?= <2464167028@qq.com> Date: Mon, 15 Aug 2022 05:58:32 +0000 Subject: [PATCH] add testcases/xapian-core/oe_test_xapian-check. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 关名扬 <2464167028@qq.com> --- .../oe_test_xapian-check/oe_test_xapian-check | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 testcases/xapian-core/oe_test_xapian-check/oe_test_xapian-check diff --git a/testcases/xapian-core/oe_test_xapian-check/oe_test_xapian-check b/testcases/xapian-core/oe_test_xapian-check/oe_test_xapian-check new file mode 100644 index 00000000..ab81c083 --- /dev/null +++ b/testcases/xapian-core/oe_test_xapian-check/oe_test_xapian-check @@ -0,0 +1,43 @@ +#!/usr/bin/bash + +# Copyright (c) 2020. 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 : GuanMingYang +#@Contact : 2464167028@qq.com +#@Date : 2022-08-15 +#@License : Mulan PSL v2 +#@Version : 1.0 +#@Desc : Take the test xapian-check command +##################################### + +source "$OET_PATH/libs/locallibs/common_lib.sh" +function pre_test(){ + LOG_INFO "start to prepare the test environment" + DNF_INSTALL xapian-core + cp -r ../common/db db + LOG_INFO "end to prepare the test environmnet" +} + +function run_test() +{ + LOG_INFO "Start to run test" + xapian-check ./db ftFbv+ + CHECK_RESULT $? 0 0 "xapian-check error" + LOG_INFO "End of the test" +} + +function post_test(){ + LOG_INFO "start environment cleanup." + DNF_REMOVE + rm -rf ./db + LOG_INFO "finish environment cleanup" +} + +main "$@" \ No newline at end of file -- Gitee