From dc07fdb8c055586f5eaeb55bff77f4fc112fccbe Mon Sep 17 00:00:00 2001 From: honghua Date: Thu, 23 Apr 2026 22:00:25 +0800 Subject: [PATCH] update testcase for testsuite libcue-devel --- .../pkg_test/libcue/libcue-devel.json | 10 --- .../test_libcue-devel_function_parse.sh | 75 ------------------- 2 files changed, 85 deletions(-) delete mode 100644 suite2cases/function_test/pkg_test/libcue/libcue-devel.json delete mode 100644 testcases/function_test/pkg_test/libcue/libcue-devel/test_libcue-devel_function_parse.sh diff --git a/suite2cases/function_test/pkg_test/libcue/libcue-devel.json b/suite2cases/function_test/pkg_test/libcue/libcue-devel.json deleted file mode 100644 index 0f484bfe0af..00000000000 --- a/suite2cases/function_test/pkg_test/libcue/libcue-devel.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "path": "$OET_PATH/testcases/function_test/pkg_test/libcue/libcue-devel", - "machine num": 1, - "cases": [ - { - "name": "test_libcue-devel_function_parse", - "desc": "Test parsing functionality of libcue-devel" - } - ] -} \ No newline at end of file diff --git a/testcases/function_test/pkg_test/libcue/libcue-devel/test_libcue-devel_function_parse.sh b/testcases/function_test/pkg_test/libcue/libcue-devel/test_libcue-devel_function_parse.sh deleted file mode 100644 index aaeeaf13e43..00000000000 --- a/testcases/function_test/pkg_test/libcue/libcue-devel/test_libcue-devel_function_parse.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/usr/bin/bash - -# Copyright (c) 2024 ISCAS .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 : honghua -# @Contact : honghua@iscas.ac.cn -# @Date : 2025-12-07 -# @License : Mulan PSL v2 -# @Desc : Test parsing functionality of libcue-devel -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试 libcue-devel 的解析功能" - - # 检查环境是否已安装 libcue-devel - LOG_INFO "检查是否已安装 libcue-devel" - if dnf list installed libcue-devel &>/dev/null; then - LOG_INFO "libcue-devel 已安装,脚本结束后将保持安装状态" - INSTALLED=true - else - LOG_INFO "libcue-devel 未安装,将在测试完成后卸载" - INSTALLED=false - fi - - # 检查 yum 源中是否存在 libcue-devel - LOG_INFO "检查 yum 源中是否存在 libcue-devel" - if ! dnf list available libcue-devel &>/dev/null; then - LOG_ERROR "yum 源中不存在 libcue-devel,退出测试" - exit 255 - fi - - # 如果未安装,则安装 libcue-devel - if [ "$INSTALLED" = false ]; then - LOG_INFO "开始安装 libcue-devel" - dnf install -y libcue-devel - CHECK_RESULT $? 0 0 "安装 libcue-devel 失败" - fi - - # 测试解析功能 - LOG_INFO "测试解析功能" - command_to_test="your_parse_command_here" # 替换为实际的解析命令 - if ! command -v "$command_to_test" &>/dev/null; then - LOG_ERROR "命令 $command_to_test 不存在或不支持,退出测试" - exit 255 - fi - - $command_to_test --test-parse # 假设 --test-parse 是测试参数 - CHECK_RESULT $? 0 0 "解析功能测试失败" - - # SSH_CMD示例(如需在第二个节点执行命令) - # LOG_INFO "在第二个节点上执行解析测试" - # SSH_CMD "$command_to_test --test-parse" "$NODE2_IPV4" "$NODE2_PASSWORD" "$NODE2_USER" - # CHECK_RESULT $? 0 0 "第二个节点解析功能测试失败" - - #清理环境 - if [ "$INSTALLED" = false ]; then - LOG_INFO "卸载 libcue-devel" - dnf remove -y libcue-devel - CHECK_RESULT $? 0 0 "卸载 libcue-devel失败" - fi - - LOG_INFO "测试完成,环境已恢复" -} - -main "$@" \ No newline at end of file