diff --git a/suite2cases/function_test/pkg_test/suitesparse/suitesparse-devel.json b/suite2cases/function_test/pkg_test/suitesparse/suitesparse-devel.json deleted file mode 100644 index ff9361fbed8..00000000000 --- a/suite2cases/function_test/pkg_test/suitesparse/suitesparse-devel.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "path": "$OET_PATH/testcases/function_test/pkg_test/suitesparse/suitesparse-devel", - "machine num": 1, - "cases": [ - { - "name": "test_suitesparse-devel_function_sparse", - "desc": "Test sparse matrix operations" - }, - { - "name": "test_suitesparse-devel_function_linear", - "desc": "Test linear algebra functions" - }, - { - "name": "test_suitesparse-devel_factor", - "desc": "Test matrix factorization" - }, - { - "name": "test_suitesparse-devel_function_graph", - "desc": "Test graph algorithms" - }, - { - "name": "test_suitesparse-devel_function_solve", - "desc": "Test linear system solving" - }, - { - "name": "test_suitesparse-devel_function_ordering", - "desc": "Test matrix ordering methods" - } - ] -} \ No newline at end of file diff --git a/testcases/function_test/pkg_test/suitesparse/suitesparse-devel/test_suitesparse-devel_factor.sh b/testcases/function_test/pkg_test/suitesparse/suitesparse-devel/test_suitesparse-devel_factor.sh deleted file mode 100644 index b7f2945b9ad..00000000000 --- a/testcases/function_test/pkg_test/suitesparse/suitesparse-devel/test_suitesparse-devel_factor.sh +++ /dev/null @@ -1,64 +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-11-28 -# @License : Mulan PSL v2 -# @Desc : Test matrix factorization -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 检查是否已安装suitesparse-devel_factor软件包 - LOG_INFO "检查是否已安装suitesparse-devel_factor软件包" - rpm -q suitesparse-devel_factor > /dev/null 2>&1 - if [ $? -eq 0 ]; then - LOG_INFO "suitesparse-devel_factor已安装,脚本结束后将保持安装状态" - INSTALLED=1 - else - LOG_INFO "suitesparse-devel_factor未安装,将在测试后卸载" - INSTALLED=0 - fi - - # 检查yum源中是否存在suitesparse-devel_factor软件包 - LOG_INFO "检查yum源中是否存在suitesparse-devel_factor软件包" - dnf list available suitesparse-devel_factor > /dev/null 2>&1 - if [ $? -ne 0 ]; then - LOG_ERROR "yum源中未找到suitesparse-devel_factor软件包" - exit 255 - fi - - # 安装suitesparse-devel_factor软件包 - LOG_INFO "开始安装suitesparse-devel_factor软件包" - dnf install -y suitesparse-devel_factor > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "安装suitesparse-devel_factor失败" - - # 测试矩阵分解功能 - LOG_INFO "测试矩阵分解功能" - test_matrix_factorization > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "矩阵分解测试失败" - - # 清理环境 - if [ $INSTALLED -eq 0 ]; then - LOG_INFO "卸载suitesparse-devel_factor软件包" - dnf remove -y suitesparse-devel_factor > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "卸载suitesparse-devel_factor失败" - else - LOG_INFO "保持suitesparse-devel_factor软件包的安装状态" - fi - - LOG_INFO "测试脚本执行完成" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/suitesparse/suitesparse-devel/test_suitesparse-devel_function_graph.sh b/testcases/function_test/pkg_test/suitesparse/suitesparse-devel/test_suitesparse-devel_function_graph.sh deleted file mode 100644 index 46db2ee6c09..00000000000 --- a/testcases/function_test/pkg_test/suitesparse/suitesparse-devel/test_suitesparse-devel_function_graph.sh +++ /dev/null @@ -1,61 +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-13 -# @License : Mulan PSL v2 -# @Desc : Test graph algorithms -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 检查是否已安装suitesparse-devel软件包 - LOG_INFO "检查是否已安装suitesparse-devel软件包" - if rpm -q suitesparse-devel &>/dev/null; then - LOG_INFO "suitesparse-devel已安装,脚本结束后保持安装状态" - installed=true - else - installed=false - fi - - # 检查yum源中是否存在suitesparse-devel软件包 - LOG_INFO "检查yum源中是否存在suitesparse-devel软件包" - if ! dnf list available suitesparse-devel &>/dev/null; then - LOG_ERROR "yum源中未找到suitesparse-devel软件包" - exit 255 - fi - - # 安装suitesparse-devel软件包(如果未安装) - if [ "$installed" = false ]; then - LOG_INFO "开始安装suitesparse-devel软件包" - dnf install -y suitesparse-devel - CHECK_RESULT $? 0 0 "安装suitesparse-devel软件包失败" - fi - - # 测试graph算法功能 - LOG_INFO "测试graph算法功能" - command_output=$(ldconfig -p | grep libsuitesparse) - CHECK_RESULT $? 0 0 "未找到libsuitesparse库" - - # 清理环境(如果脚本开始时未安装) - if [ "$installed" = false ]; then - LOG_INFO "卸载suitesparse-devel软件包" - dnf remove -y suitesparse-devel - CHECK_RESULT $? 0 0 "卸载suitesparse-devel软件包失败" - fi - - LOG_INFO "测试脚本执行完成" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/suitesparse/suitesparse-devel/test_suitesparse-devel_function_linear.sh b/testcases/function_test/pkg_test/suitesparse/suitesparse-devel/test_suitesparse-devel_function_linear.sh deleted file mode 100644 index 3728dffa52b..00000000000 --- a/testcases/function_test/pkg_test/suitesparse/suitesparse-devel/test_suitesparse-devel_function_linear.sh +++ /dev/null @@ -1,67 +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-11-28 -# @License : Mulan PSL v2 -# @Desc : Test linear algebra functions -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - - # 检查yum源中是否存在suitesparse-devel软件包 - LOG_INFO "检查yum源中是否存在suitesparse-devel软件包" - dnf list available suitesparse-devel > /dev/null 2>&1 - if [ $? -ne 0 ]; then - LOG_ERROR "yum源中未找到suitesparse-devel软件包" - exit 255 - fi - - # 检查是否已安装suitesparse-devel - LOG_INFO "检查是否已安装suitesparse-devel" - rpm -q suitesparse-devel > /dev/null 2>&1 - if [ $? -eq 0 ]; then - installed=true - LOG_INFO "suitesparse-devel已安装,脚本结束后将保持安装状态" - else - installed=false - LOG_INFO "suitesparse-devel未安装,将在测试结束后卸载" - fi - - # 安装suitesparse-devel(如果未安装) - if [ "$installed" = false ]; then - LOG_INFO "安装suitesparse-devel" - dnf install -y suitesparse-devel > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "安装suitesparse-devel失败" - fi - - # 测试线性代数功能 - LOG_INFO "测试线性代数功能" - # 假设测试命令为test_linear_algebra,参数为--function linear - test_linear_algebra --function linear > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "测试线性代数功能失败" - - # 清理环境(如果最初未安装) - if [ "$installed" = false ]; then - LOG_INFO "卸载suitesparse-devel" - dnf remove -y suitesparse-devel > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "卸载suitesparse-devel失败" - fi - - LOG_INFO "测试脚本执行完毕,环境已恢复" - -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/suitesparse/suitesparse-devel/test_suitesparse-devel_function_ordering.sh b/testcases/function_test/pkg_test/suitesparse/suitesparse-devel/test_suitesparse-devel_function_ordering.sh deleted file mode 100644 index 9ef1b865bf6..00000000000 --- a/testcases/function_test/pkg_test/suitesparse/suitesparse-devel/test_suitesparse-devel_function_ordering.sh +++ /dev/null @@ -1,68 +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-13 -# @License : Mulan PSL v2 -# @Desc : Test matrix ordering methods -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - LOG_INFO "开始测试:Test matrix ordering methods" - - # 检查是否已安装suitesparse-devel软件包 - LOG_INFO "检查suitesparse-devel是否已安装" - if dnf list installed suitesparse-devel &>/dev/null; then - LOG_INFO "suitesparse-devel已安装,脚本结束时将保持安装状态" - INSTALLED=true - else - LOG_INFO "suitesparse-devel未安装,将在测试结束后卸载" - INSTALLED=false - fi - - # 检查yum源中是否有suitesparse-devel软件包 - LOG_INFO "检查yum源中是否有suitesparse-devel软件包" - if ! dnf list available suitesparse-devel &>/dev/null; then - LOG_ERROR "yum源中未找到suitesparse-devel软件包" - exit 255 - fi - - # 如果未安装,则安装软件包 - if [ "$INSTALLED" = false ]; then - LOG_INFO "开始安装suitesparse-devel" - dnf install -y suitesparse-devel - CHECK_RESULT $? 0 0 "安装suitesparse-devel失败" - fi - - # 测试matrix ordering方法 - LOG_INFO "测试matrix ordering方法" - command_to_test="some_matrix_ordering_command --parameter" - if ! $command_to_test &>/dev/null; then - LOG_ERROR "命令参数不存在或不支持" - exit 255 - fi - CHECK_RESULT $? 0 0 "matrix ordering方法测试失败" - - # 清理环境:如果脚本开始时未安装,则卸载软件包 - if [ "$INSTALLED" = false ]; then - LOG_INFO "卸载suitesparse-devel" - dnf remove -y suitesparse-devel - CHECK_RESULT $? 0 0 "卸载suitesparse-devel失败" - fi - - LOG_INFO "测试完成:Test matrix ordering methods" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/suitesparse/suitesparse-devel/test_suitesparse-devel_function_solve.sh b/testcases/function_test/pkg_test/suitesparse/suitesparse-devel/test_suitesparse-devel_function_solve.sh deleted file mode 100644 index c058e198faf..00000000000 --- a/testcases/function_test/pkg_test/suitesparse/suitesparse-devel/test_suitesparse-devel_function_solve.sh +++ /dev/null @@ -1,66 +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-13 -# @License : Mulan PSL v2 -# @Desc : Test linear system solving -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - # 测试线性系统求解功能 - LOG_INFO "开始测试线性系统求解功能" - - # 检查软件包是否已安装 - LOG_INFO "检查suitesparse-devel软件包是否已安装" - if rpm -q suitesparse-devel >/dev/null 2>&1; then - LOG_INFO "suitesparse-devel软件包已安装" - installed=true - else - LOG_INFO "suitesparse-devel软件包未安装" - installed=false - fi - - # 检查yum源中是否存在suitesparse-devel软件包 - LOG_INFO "检查yum源中是否存在suitesparse-devel软件包" - if ! dnf list available suitesparse-devel >/dev/null 2>&1; then - LOG_ERROR "yum源中未找到suitesparse-devel软件包" - exit 255 - fi - - # 如果未安装,则安装软件包 - if [ "$installed" = false ]; then - LOG_INFO "安装suitesparse-devel软件包" - dnf install -y suitesparse-devel - CHECK_RESULT $? 0 0 "安装suitesparse-devel软件包失败" - fi - - # 测试线性系统求解功能 - LOG_INFO "测试线性系统求解功能" - result=$(echo "2x + 3y = 5; 4x + 9y = 21" | solve_linear_system) - expected="x = 1; y = 1" - CHECK_RESULT "$result" "$expected" 0 "线性系统求解结果不符合预期" - - # 如果最初未安装,则卸载软件包 - if [ "$installed" = false ]; then - LOG_INFO "卸载suitesparse-devel软件包" - dnf remove -y suitesparse-devel - CHECK_RESULT $? 0 0 "卸载suitesparse-devel软件包失败" - fi - - LOG_INFO "测试线性系统求解功能完成" -} - -main "$@" \ No newline at end of file diff --git a/testcases/function_test/pkg_test/suitesparse/suitesparse-devel/test_suitesparse-devel_function_sparse.sh b/testcases/function_test/pkg_test/suitesparse/suitesparse-devel/test_suitesparse-devel_function_sparse.sh deleted file mode 100644 index 4baeba0e446..00000000000 --- a/testcases/function_test/pkg_test/suitesparse/suitesparse-devel/test_suitesparse-devel_function_sparse.sh +++ /dev/null @@ -1,79 +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-11-28 -# @License : Mulan PSL v2 -# @Desc : Test sparse matrix operations -# ############################################ - -source "$OET_PATH/libs/locallibs/common_lib.sh" - -function run_test() { - - # 检查yum源中是否存在suitesparse-devel软件包 - LOG_INFO "检查yum源中是否存在suitesparse-devel软件包" - dnf list available suitesparse-devel > /dev/null 2>&1 - if [ $? -ne 0 ]; then - LOG_ERROR "yum源中未找到suitesparse-devel软件包" - exit 255 - fi - - # 检查是否已安装suitesparse-devel - LOG_INFO "检查是否已安装suitesparse-devel" - rpm -q suitesparse-devel > /dev/null 2>&1 - if [ $? -eq 0 ]; then - LOG_INFO "suitesparse-devel已安装,跳过安装步骤" - INSTALLED=true - else - LOG_INFO "suitesparse-devel未安装,开始安装" - dnf install -y suitesparse-devel > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "安装suitesparse-devel失败" - INSTALLED=false - fi - - # 测试sparse矩阵操作 - LOG_INFO "测试sparse矩阵操作" - TEST_COMMAND="sparse --version" - $TEST_COMMAND > /dev/null 2>&1 - if [ $? -ne 0 ]; then - LOG_ERROR "命令参数不支持或不存在: $TEST_COMMAND" - exit 255 - fi - - # 执行sparse矩阵操作测试用例 - LOG_INFO "执行sparse矩阵操作测试用例" - TEST_CASE="Test sparse matrix operations" - LOG_INFO "测试用例描述: $TEST_CASE" - - # 模拟测试步骤 - LOG_INFO "模拟执行sparse矩阵操作" - echo "模拟测试输出" > /tmp/sparse_test_output - CHECK_RESULT $? 0 0 "模拟测试失败" - - # 清理测试环境 - LOG_INFO "清理测试环境" - rm -f /tmp/sparse_test_output - - # 如果脚本开始时未安装suitesparse-devel,则卸载 - if [ "$INSTALLED" = false ]; then - LOG_INFO "卸载suitesparse-devel软件包" - dnf remove -y suitesparse-devel > /dev/null 2>&1 - CHECK_RESULT $? 0 0 "卸载suitesparse-devel失败" - fi - - LOG_INFO "测试脚本执行完毕,环境已恢复" - -} - -main "$@" \ No newline at end of file