diff --git a/docs/system_base/atk-devel/tc_atk-devel_fun_001.yaml b/docs/system_base/atk-devel/tc_atk-devel_fun_001.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2d78c2e0c0f4cf908d51c344c594be2be2f5fbef --- /dev/null +++ b/docs/system_base/atk-devel/tc_atk-devel_fun_001.yaml @@ -0,0 +1,24 @@ +作者: xufei +优先级: P1 +支持架构: noarch +执行方式: 自动 +测试类型: 功能测试 +通用标签: local +用例描述: 测试atk-devel基本安装功能 +修改人: xufei + +前置条件: +- 可访问软件仓库 +- 具有root权限 +- 安装atk-devel软件包 + +测试步骤: +- 查找ATK头文件 +- 检查包详细信息 +- 清理环境 + +期望结果: +- 成功安装atk-devel +- 成功找到头文件 +- 成功获取包信息 +- 所有命令返回码为0 \ No newline at end of file diff --git a/docs/system_base/atk-devel/tc_atk-devel_fun_002.yaml b/docs/system_base/atk-devel/tc_atk-devel_fun_002.yaml new file mode 100644 index 0000000000000000000000000000000000000000..27d883ffc84efe5ddef7a11db3f9f773a3562b94 --- /dev/null +++ b/docs/system_base/atk-devel/tc_atk-devel_fun_002.yaml @@ -0,0 +1,26 @@ +作者: xufei +优先级: P1 +支持架构: noarch +执行方式: 自动 +测试类型: 功能测试 +通用标签: local +用例描述: 测试atk-devel pkg-config功能 +修改人: xufei + +前置条件: +- 可访问软件仓库 +- 已安装atk-devel pkg-config + +测试步骤: +- 检查pkg-config模块存在性 +- 获取pkg-config编译标志 +- 获取pkg-config链接标志 +- 获取pkg-config版本信息 +- 清理环境 + +期望结果: +- 成功找到pkg-config模块 +- 成功获取编译标志 +- 成功获取链接标志 +- 成功获取版本信息 +- 所有命令返回码为0 \ No newline at end of file diff --git a/docs/system_base/atk-devel/tc_atk-devel_fun_003.yaml b/docs/system_base/atk-devel/tc_atk-devel_fun_003.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b1e4215317c83794e5a5aea51f5cdbebdc73c7da --- /dev/null +++ b/docs/system_base/atk-devel/tc_atk-devel_fun_003.yaml @@ -0,0 +1,25 @@ +作者: xufei +优先级: P1 +支持架构: noarch +执行方式: 自动 +测试类型: 功能测试 +通用标签: local +用例描述: 测试 atk-devel库文件 功能 +修改人: xufei + +前置条件: +- 可访问软件仓库 +- 已安装atk-devel +- 具有root权限 + +测试步骤: +- 查找ATK库文件 +- 检查库符号链接 +- 统计包文件数量 +- 清理环境 + +期望结果: +- 成功找到库文件 +- 成功检查符号链接 +- 包文件数量大于0 +- 所有命令返回码为0 \ No newline at end of file diff --git a/docs/system_base/atk-devel/tc_atk-devel_fun_004.yaml b/docs/system_base/atk-devel/tc_atk-devel_fun_004.yaml new file mode 100644 index 0000000000000000000000000000000000000000..68f353f43fc2cc78351cdbd65aeb763eb67eac07 --- /dev/null +++ b/docs/system_base/atk-devel/tc_atk-devel_fun_004.yaml @@ -0,0 +1,27 @@ +作者: xufei +优先级: P1 +支持架构: noarch +执行方式: 自动 +测试类型: 功能测试 +通用标签: local +用例描述: 测试 atk-devel主包集成 功能 +修改人: xufei + +前置条件: +- 可访问软件仓库 +- 已安装atk和atk-devel +- 具有root权限 + +测试步骤: +- 检查主包和开发包版本 +- 验证版本一致性 +- 检查pkg-config版本匹配 +- 检查库链接配置 +- 清理环境 + +期望结果: +- 成功获取版本信息 +- 主包和开发包版本匹配 +- pkg-config和包版本匹配 +- 成功检查库链接 +- 所有命令返回码为0 \ No newline at end of file diff --git a/docs/system_base/atk-devel/tc_atk-devel_fun_005.yaml b/docs/system_base/atk-devel/tc_atk-devel_fun_005.yaml new file mode 100644 index 0000000000000000000000000000000000000000..72ce7cf6536e831d0e89793debc28ad6fa0cf4ad --- /dev/null +++ b/docs/system_base/atk-devel/tc_atk-devel_fun_005.yaml @@ -0,0 +1,27 @@ +作者: xufei +优先级: P1 +支持架构: noarch +执行方式: 自动 +测试类型: 功能测试 +通用标签: local +用例描述: 测试atk-devel GIR/Vala绑定功能 +修改人: xufei + +前置条件: +- 可访问软件仓库 +- 已安装atk-devel +- 具有root权限 + +测试步骤: +- 查找GIR文件 +- 查找Typelib文件 +- 查找Vala绑定文件 +- 检查标准GIR位置 +- 清理环境 + +期望结果: +- 成功找到GIR文件 +- 成功找到Typelib文件 +- 成功找到Vala绑定文件 +- 成功检查GIR标准位置 +- 所有命令返回码为0 \ No newline at end of file diff --git a/tests/system_base/atk-devel/tc_atk-devel_fun_001.py b/tests/system_base/atk-devel/tc_atk-devel_fun_001.py new file mode 100644 index 0000000000000000000000000000000000000000..cd1509c9cc3d52924b24cf2d5f957793ce048b1a --- /dev/null +++ b/tests/system_base/atk-devel/tc_atk-devel_fun_001.py @@ -0,0 +1,42 @@ +# -*- encoding: utf-8 -*- + +""" +@File: tc_atk-devel_fun_001.py +@Time: 2026/03/03 13:53:53 +@Author: xufei +@Version: 1.0 +@Contact: xufei@inspur.com +@License: Mulan PSL v2 +@Modify: xufei +""" + +from common.basetest import LocalTest + + +class Test(LocalTest): + """ + See tc_atk-devel_fun_001.yaml for details + + :avocado: tags=P1,noarch,local,atk-devel + """ + PARAM_DIC = {"pkg_name": "atk-devel"} + + def setUp(self): + super().setUp(self.PARAM_DIC) + + def test(self): + self.log.info("Start to run test.") + + code1,result1=self.cmd('find /usr/include -name "*atk*.h" 2>/dev/null | head -3') + if code1 == 0: + self.log.info(f"Found header files: {result1.strip()}") + + code2,result2=self.cmd('rpm -qi atk-devel') + self.assertEqual(code2, 0, "Package info check failed") + + self.log.info("End to run test.") + + def tearDown(self): + super().tearDown(self.PARAM_DIC) + + diff --git a/tests/system_base/atk-devel/tc_atk-devel_fun_002.py b/tests/system_base/atk-devel/tc_atk-devel_fun_002.py new file mode 100644 index 0000000000000000000000000000000000000000..ac3593dd2bf94a5d114c6531aa8ddf9746a2f344 --- /dev/null +++ b/tests/system_base/atk-devel/tc_atk-devel_fun_002.py @@ -0,0 +1,51 @@ +# -*- encoding: utf-8 -*- + +""" +@File: tc_atk-devel_fun_002.py +@Time: 2026/03/03 14:23:53 +@Author: xufei +@Version: 1.0 +@Contact: xufei@inspur.com +@License: Mulan PSL v2 +@Modify: xufei +""" + +from common.basetest import LocalTest + + +class Test(LocalTest): + """ + See tc_atk-devel_fun_002.yaml for details + + :avocado: tags=P1,noarch,local,atk-devel + """ + PARAM_DIC = {"pkg_name": "atk-devel"} + + def setUp(self): + super().setUp(self.PARAM_DIC) + + def test(self): + self.log.info("Start to run test.") + + code1,result1=self.cmd('pkg-config --exists atk && echo "found"') + if "found" in result1: + self.log.info("pkg-config module found") + + code2,result2=self.cmd('pkg-config --cflags atk') + if code2 == 0: + self.log.info(f"pkg-config cflags: {result2.strip()}") + + code3,result3=self.cmd('pkg-config --libs atk') + if code3 == 0: + self.log.info(f"pkg-config libs: {result3.strip()}") + + code4,result4=self.cmd('pkg-config --modversion atk') + if code4 == 0: + self.log.info(f"pkg-config version: {result4.strip()}") + + self.log.info("End to run test.") + + def tearDown(self): + super().tearDown(self.PARAM_DIC) + + diff --git a/tests/system_base/atk-devel/tc_atk-devel_fun_003.py b/tests/system_base/atk-devel/tc_atk-devel_fun_003.py new file mode 100644 index 0000000000000000000000000000000000000000..333aab4930afeb623fb37fc9209583d288733d65 --- /dev/null +++ b/tests/system_base/atk-devel/tc_atk-devel_fun_003.py @@ -0,0 +1,49 @@ +# -*- encoding: utf-8 -*- + +""" +@File: tc_atk-devel_fun_003.py +@Time: 2026/03/03 14:53:53 +@Author: xufei +@Version: 1.0 +@Contact: xufei@inspur.com +@License: Mulan PSL v2 +@Modify: xufei +""" + +from common.basetest import LocalTest + + +class Test(LocalTest): + """ + See tc_atk-devel_fun_003.yaml for details + + :avocado: tags=P1,noarch,local,atk-devel + """ + PARAM_DIC = {"pkg_name": "atk-devel"} + + def setUp(self): + super().setUp(self.PARAM_DIC) + + def test(self): + self.log.info("Start to run test.") + + code1,result1=self.cmd('find /usr/lib* -name "*atk*.so" 2>/dev/null | head -3') + if code1 == 0: + self.log.info(f"Library files: {result1.strip()}") + + code2,result2=self.cmd('ls -la /usr/lib*/*atk*.so* 2>/dev/null | head -5') + if code2 == 0: + self.log.info(f"Library symlinks: {result2.strip()}") + + code3,result3=self.cmd('rpm -ql atk-devel | wc -l') + if code3 == 0: + file_count = int(result3.strip()) + self.assertGreater(file_count, 0, "Package contains no files") + self.log.info(f"Package contains {file_count} files") + + self.log.info("End to run test.") + + def tearDown(self): + super().tearDown(self.PARAM_DIC) + + diff --git a/tests/system_base/atk-devel/tc_atk-devel_fun_004.py b/tests/system_base/atk-devel/tc_atk-devel_fun_004.py new file mode 100644 index 0000000000000000000000000000000000000000..4a7cb1deeae97594dd7663ff1458210bb039c9ca --- /dev/null +++ b/tests/system_base/atk-devel/tc_atk-devel_fun_004.py @@ -0,0 +1,53 @@ +# -*- encoding: utf-8 -*- + +""" +@File: tc_atk-devel_fun_004.py +@Time: 2026/03/03 15:23:53 +@Author: xufei +@Version: 1.0 +@Contact: xufei@inspur.com +@License: Mulan PSL v2 +@Modify: xufei +""" + +from common.basetest import LocalTest + + +class Test(LocalTest): + """ + See tc_atk-devel_fun_004.yaml for details + + :avocado: tags=P1,noarch,local,atk-devel + """ + PARAM_DIC = {"pkg_name": "atk-devel"} + + def setUp(self): + super().setUp(self.PARAM_DIC) + + def test(self): + self.log.info("Start to run test.") + + code1,result1=self.cmd('rpm -q atk atk-devel --queryformat="%{NAME}: %{VERSION}\\n"') + if code1 == 0: + self.log.info(f"Package versions: {result1.strip()}") + versions = result1.strip().split('\n') + if len(versions) == 2 and versions[0].split(': ')[1] == versions[1].split(': ')[1]: + self.log.info("Main and devel package versions match") + + code2,result2=self.cmd('pkg-config --modversion atk') + if code2 == 0: + pkg_version = result2.strip() + code3,result3=self.cmd('rpm -q atk --queryformat="%{VERSION}"') + if code3 == 0 and pkg_version in result3.strip(): + self.log.info("pkg-config and package versions match") + + code4,result4=self.cmd('ldconfig -p | grep atk | head -3') + if code4 == 0: + self.log.info(f"Linked libraries: {result4.strip()}") + + self.log.info("End to run test.") + + def tearDown(self): + super().tearDown(self.PARAM_DIC) + + diff --git a/tests/system_base/atk-devel/tc_atk-devel_fun_005.py b/tests/system_base/atk-devel/tc_atk-devel_fun_005.py new file mode 100644 index 0000000000000000000000000000000000000000..5943a225001323e266336bff237d5b93b29716bd --- /dev/null +++ b/tests/system_base/atk-devel/tc_atk-devel_fun_005.py @@ -0,0 +1,51 @@ +# -*- encoding: utf-8 -*- + +""" +@File: tc_atk-devel_fun_005.py +@Time: 2026/03/03 15:53:53 +@Author: xufei +@Version: 1.0 +@Contact: xufei@inspur.com +@License: Mulan PSL v2 +@Modify: xufei +""" + +from common.basetest import LocalTest + + +class Test(LocalTest): + """ + See tc_atk-devel_fun_005.yaml for details + + :avocado: tags=P1,noarch,local,atk-devel + """ + PARAM_DIC = {"pkg_name": "atk-devel"} + + def setUp(self): + super().setUp(self.PARAM_DIC) + + def test(self): + self.log.info("Start to run test.") + + code1,result1=self.cmd('find /usr/share -name "*atk*.gir" 2>/dev/null | head -2') + if code1 == 0: + self.log.info(f"GIR files: {result1.strip()}") + + code2,result2=self.cmd('find /usr/share -name "*atk*.typelib" 2>/dev/null | head -2') + if code2 == 0: + self.log.info(f"Typelib files: {result2.strip()}") + + code3,result3=self.cmd('find /usr/share -name "*atk*.vapi" 2>/dev/null | head -2') + if code3 == 0: + self.log.info(f"Vala bindings: {result3.strip()}") + + code4,result4=self.cmd('find /usr/share/gir-1.0 -name "*atk*.gir" 2>/dev/null') + if code4 == 0: + self.log.info("GIR files found in standard location") + + self.log.info("End to run test.") + + def tearDown(self): + super().tearDown(self.PARAM_DIC) + +