Merge branch 'pkg' of http://10.30.190.190:54866/redrsoe2100/os-autotest into pkg
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"path": "$OET_PATH/testcases/function_test/pkg_test/arquillian-core/arquillian-testng-core",
|
||||
"machine num": 1,
|
||||
"cases": [
|
||||
{
|
||||
"name": "test_arquillian-testng-core_function_init",
|
||||
"desc": "Test initialization of arquillian-testng-core"
|
||||
},
|
||||
{
|
||||
"name": "test_arquillian-testng-core_function_execute",
|
||||
"desc": "Test execution of arquillian-testng-core"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -16,70 +16,6 @@
|
||||
"name": "test_colord-gtk_service_log",
|
||||
"desc": "测试colord-gtk服务的日志查看功能,验证服务是否可以正常查看日志",
|
||||
"machine num": 1
|
||||
},
|
||||
{
|
||||
"name": "test_colord-gtk_cd-convert__v",
|
||||
"desc": "测试cd-convert命令的详细输出模式"
|
||||
},
|
||||
{
|
||||
"name": "test_colord-gtk_cd-convert__q",
|
||||
"desc": "测试cd-convert命令的静默模式"
|
||||
},
|
||||
{
|
||||
"name": "test_colord-gtk_cd-convert__help",
|
||||
"desc": "测试cd-convert命令的帮助信息"
|
||||
},
|
||||
{
|
||||
"name": "test_colord-gtk_cd-convert__upper_v",
|
||||
"desc": "测试cd-convert命令的版本信息"
|
||||
},
|
||||
{
|
||||
"name": "test_colord-gtk_cd-convert__upper_n",
|
||||
"desc": "测试cd-convert命令使用不存在的配置文件"
|
||||
},
|
||||
{
|
||||
"name": "test_colord-gtk_cd-convert__upper_t",
|
||||
"desc": "测试cd-convert命令使用绝对色温值进行转换"
|
||||
},
|
||||
{
|
||||
"name": "test_colord-gtk_cd-convert__upper_r",
|
||||
"desc": "测试cd-convert命令使用相对色温值进行转换"
|
||||
},
|
||||
{
|
||||
"name": "test_colord-gtk_cd-convert__upper_f",
|
||||
"desc": "测试cd-convert命令指定输入文件的格式"
|
||||
},
|
||||
{
|
||||
"name": "test_colord-gtk_cd-convert__upper_o",
|
||||
"desc": "测试cd-convert命令指定输出文件的格式"
|
||||
},
|
||||
{
|
||||
"name": "test_colord-gtk_install_package",
|
||||
"desc": "测试colord-gtk软件包的安装功能,验证软件包是否可以正常安装"
|
||||
},
|
||||
{
|
||||
"name": "test_colord-gtk_check_installed",
|
||||
"desc": "检查colord-gtk软件包是否已正确安装到系统中"
|
||||
},
|
||||
{
|
||||
"name": "test_colord-gtk_service_status",
|
||||
"desc": "测试与colord-gtk相关的服务(如colord)的运行状态"
|
||||
},
|
||||
{
|
||||
"name": "test_colord-gtk_cd_profile_import",
|
||||
"desc": "测试使用colord-gtk工具导入颜色配置文件"
|
||||
},
|
||||
{
|
||||
"name": "test_colord-gtk_cd_profile_export",
|
||||
"desc": "测试使用colord-gtk工具导出颜色配置文件"
|
||||
},
|
||||
{
|
||||
"name": "test_colord-gtk_cd_create_profile",
|
||||
"desc": "测试使用colord-gtk工具创建基本的颜色配置文件"
|
||||
},
|
||||
{
|
||||
"name": "test_colord-gtk_gui_tool_open",
|
||||
"desc": "测试colord-gtk提供的图形化管理工具(如gnome-color-manager)能否正常启动"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -26,14 +26,6 @@
|
||||
{
|
||||
"name": "test_criu_function_uninstall",
|
||||
"desc": "测试criu的卸载功能,验证是否能够成功卸载软件包。"
|
||||
},
|
||||
{
|
||||
"name": "test_criu_function_restore",
|
||||
"desc": "测试criu的核心恢复功能,验证是否能从转储文件恢复进程。"
|
||||
},
|
||||
{
|
||||
"name": "test_criu_function_checkpoint",
|
||||
"desc": "测试criu的检查点功能(结合dump与restore)。"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -7,11 +7,6 @@
|
||||
"desc": "测试eclipse-jdt软件包的升级功能",
|
||||
"machine num": 1
|
||||
},
|
||||
{
|
||||
"name": "test_eclipse-jdt_rollback",
|
||||
"desc": "测试eclipse-jdt软件包的升级回滚功能",
|
||||
"machine num": 1
|
||||
},
|
||||
{
|
||||
"name": "test_eclipse-jdt_function_compile",
|
||||
"desc": "测试eclipse-jdt软件包的编译功能"
|
||||
|
||||
@@ -10,10 +10,6 @@
|
||||
"name": "test_harfbuzz-help_function_installed",
|
||||
"desc": "测试harfbuzz-help软件包在安装后是否存在于系统已安装软件包列表中。"
|
||||
},
|
||||
{
|
||||
"name": "test_harfbuzz-help_function_help_output",
|
||||
"desc": "测试执行harfbuzz-help命令是否能正常输出帮助信息(如用法、选项等)。"
|
||||
},
|
||||
{
|
||||
"name": "test_harfbuzz-help_function_uninstall",
|
||||
"desc": "测试harfbuzz-help软件包是否可以通过默认包管理器成功卸载,且卸载后相关文件被移除。"
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"path": "$OET_PATH/testcases/function_test/pkg_test/jffi/jffi-javadoc",
|
||||
"machine num": 1,
|
||||
"cases": [
|
||||
{
|
||||
"name": "test_jffi-javadoc_function_docgen",
|
||||
"desc": "Verify Javadoc generation for jffi-javadoc"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -17,22 +17,6 @@
|
||||
{
|
||||
"name": "test_mesa-filesystem_function_presence",
|
||||
"desc": "测试mesa-filesystem软件包是否已作为系统基础依赖库存在于系统中。"
|
||||
},
|
||||
{
|
||||
"name": "test_mesa-filesystem_function_version",
|
||||
"desc": "测试验证mesa-filesystem软件包的版本信息是否符合预期。"
|
||||
},
|
||||
{
|
||||
"name": "test_mesa-filesystem_function_provides",
|
||||
"desc": "测试mesa-filesystem软件包提供的核心库文件(如libGL.so)是否存在于标准路径。"
|
||||
},
|
||||
{
|
||||
"name": "test_mesa-filesystem_function_conflict",
|
||||
"desc": "测试mesa-filesystem软件包与冲突包(如闭源驱动包)的安装互斥性。"
|
||||
},
|
||||
{
|
||||
"name": "test_mesa-filesystem_function_dependency",
|
||||
"desc": "测试mesa-filesystem软件包被其他图形应用正确识别和依赖。"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -2,10 +2,6 @@
|
||||
"path": "$OET_PATH/testcases/function_test/pkg_test/metrics/metrics-log4j2",
|
||||
"machine num": 1,
|
||||
"cases": [
|
||||
{
|
||||
"name": "test_metrics-log4j2_function_logging",
|
||||
"desc": "Test basic logging functionality of metrics-log4j2"
|
||||
},
|
||||
{
|
||||
"name": "test_metrics-log4j2_function_config",
|
||||
"desc": "Test configuration loading of metrics-log4j2"
|
||||
|
||||
@@ -7,29 +7,9 @@
|
||||
"desc": "测试mythes-devel软件包的安装功能",
|
||||
"machine num": 1
|
||||
},
|
||||
{
|
||||
"name": "test_mythes-devel_function_lookup",
|
||||
"desc": "测试mythes-devel软件包的词库查询功能"
|
||||
},
|
||||
{
|
||||
"name": "test_mythes-devel_uninstall",
|
||||
"desc": "测试mythes-devel软件包的卸载功能"
|
||||
},
|
||||
{
|
||||
"name": "test_mythes-devel_headers",
|
||||
"desc": "测试mythes-devel开发头文件的存在性"
|
||||
},
|
||||
{
|
||||
"name": "test_mythes-devel_library",
|
||||
"desc": "测试mythes-devel共享库文件的存在性"
|
||||
},
|
||||
{
|
||||
"name": "test_mythes-devel_pkgconfig",
|
||||
"desc": "测试mythes-devel的pkg-config支持"
|
||||
},
|
||||
{
|
||||
"name": "test_mythes-devel_synonyms",
|
||||
"desc": "测试词库同义词查询功能"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"path": "$OET_PATH/testcases/function_test/pkg_test/polyglot/tesla-polyglot-translate-plugin",
|
||||
"machine num": 1,
|
||||
"cases": [
|
||||
{
|
||||
"name": "test_tesla-polyglot-translate-plugin_function_init",
|
||||
"desc": "Test plugin initialization"
|
||||
},
|
||||
{
|
||||
"name": "test_tesla-polyglot-translate-plugin_function_translate",
|
||||
"desc": "Test translation functionality"
|
||||
},
|
||||
{
|
||||
"name": "test_tesla-polyglot-translate-plugin_function_config",
|
||||
"desc": "Test config loading"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"path": "$OET_PATH/testcases/function_test/pkg_test/python-dockerpty/python3-dockerpty",
|
||||
"machine num": 1,
|
||||
"cases": [
|
||||
{
|
||||
"name": "test_python3-dockerpty_function_init",
|
||||
"desc": "Test initialization of dockerpty module"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -6,50 +6,6 @@
|
||||
"name": "test_python-google-auth-help_install",
|
||||
"desc": "测试python-google-auth-help软件包的安装功能",
|
||||
"machine num": 1
|
||||
},
|
||||
{
|
||||
"name": "test_python-google-auth-help_function_auth",
|
||||
"desc": "测试python-google-auth-help软件包的认证功能"
|
||||
},
|
||||
{
|
||||
"name": "test_python-google-auth-help_function_token",
|
||||
"desc": "测试python-google-auth-help软件包的令牌功能"
|
||||
},
|
||||
{
|
||||
"name": "test_python-google-auth-help_function_http",
|
||||
"desc": "测试python-google-auth-help软件包的HTTP请求功能"
|
||||
},
|
||||
{
|
||||
"name": "test_python-google-auth-help_function_credentials",
|
||||
"desc": "测试默认凭据获取"
|
||||
},
|
||||
{
|
||||
"name": "test_python-google-auth-help_function_scoped_auth",
|
||||
"desc": "测试带作用域认证"
|
||||
},
|
||||
{
|
||||
"name": "test_python-google-auth-help_function_refresh",
|
||||
"desc": "测试访问令牌刷新"
|
||||
},
|
||||
{
|
||||
"name": "test_python-google-auth-help_function_service_acct",
|
||||
"desc": "测试服务账号凭据"
|
||||
},
|
||||
{
|
||||
"name": "test_python-google-auth-help_function_http_auth",
|
||||
"desc": "测试HTTP请求授权"
|
||||
},
|
||||
{
|
||||
"name": "test_python-google-auth-help_function_id_token",
|
||||
"desc": "测试ID令牌获取"
|
||||
},
|
||||
{
|
||||
"name": "test_python-google-auth-help_function_user_auth",
|
||||
"desc": "测试用户交互认证"
|
||||
},
|
||||
{
|
||||
"name": "test_python-google-auth-help_function_uninstall",
|
||||
"desc": "测试软件包卸载"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
{
|
||||
"path": "$OET_PATH/testcases/function_test/pkg_test/python-pep517/python-pep517-help",
|
||||
"machine num": 1,
|
||||
"cases": [
|
||||
{
|
||||
"name": "test_python-pep517-help_function_build",
|
||||
"desc": "Test build functionality"
|
||||
},
|
||||
{
|
||||
"name": "test_python-pep517-help_function_install",
|
||||
"desc": "Test package installation"
|
||||
},
|
||||
{
|
||||
"name": "test_python-pep517-help_function_uninstall",
|
||||
"desc": "Test package uninstallation"
|
||||
},
|
||||
{
|
||||
"name": "test_python-pep517-help_function_import",
|
||||
"desc": "Test basic module import"
|
||||
},
|
||||
{
|
||||
"name": "test_python-pep517-help_function_usage",
|
||||
"desc": "Test common usage patterns"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -13,18 +13,6 @@
|
||||
{
|
||||
"name": "test_python3-pyrpm_function_remove",
|
||||
"desc": "Test removal of python3-pyrpm package"
|
||||
},
|
||||
{
|
||||
"name": "test_python3-pyrpm_function_read_header",
|
||||
"desc": "Test reading RPM header info"
|
||||
},
|
||||
{
|
||||
"name": "test_python3-pyrpm_function_list_files",
|
||||
"desc": "Test listing files in RPM"
|
||||
},
|
||||
{
|
||||
"name": "test_python3-pyrpm_function_check_deps",
|
||||
"desc": "Test checking RPM dependencies"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -7,17 +7,9 @@
|
||||
"desc": "测试python-smmap-help软件包的安装功能,验证安装是否成功。",
|
||||
"machine num": 1
|
||||
},
|
||||
{
|
||||
"name": "test_python-smmap-help_function_uninstall",
|
||||
"desc": "测试python-smmap-help软件包的卸载功能,验证卸载是否成功。"
|
||||
},
|
||||
{
|
||||
"name": "test_python-smmap-help_function_check_version",
|
||||
"desc": "测试python-smmap-help软件包的版本查询功能,验证是否能正确获取软件包版本信息。"
|
||||
},
|
||||
{
|
||||
"name": "test_python-smmap-help_function_import_module",
|
||||
"desc": "测试python-smmap-help模块的导入功能,验证是否能成功导入并检查其关键属性。"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -5,22 +5,6 @@
|
||||
{
|
||||
"name": "test_python3-rpm_function_verify_package",
|
||||
"desc": "测试验证已安装 RPM 包文件完整性的功能。"
|
||||
},
|
||||
{
|
||||
"name": "test_python3-rpm_function_import_module",
|
||||
"desc": "测试能否成功导入python3-rpm模块。"
|
||||
},
|
||||
{
|
||||
"name": "test_python3-rpm_function_check_install",
|
||||
"desc": "测试验证python3-rpm软件包是否已正确安装。"
|
||||
},
|
||||
{
|
||||
"name": "test_python3-rpm_function_read_header",
|
||||
"desc": "测试使用rpm模块读取已安装RPM包的头信息。"
|
||||
},
|
||||
{
|
||||
"name": "test_python3-rpm_function_query_package",
|
||||
"desc": "测试查询系统已安装的指定RPM包信息。"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -2,10 +2,6 @@
|
||||
"path": "$OET_PATH/testcases/function_test/pkg_test/rubygem-gem2rpm/rubygem-gem2rpm-doc",
|
||||
"machine num": 1,
|
||||
"cases": [
|
||||
{
|
||||
"name": "test_rubygem-gem2rpm-doc_function_docgen",
|
||||
"desc": "Test documentation generation functionality"
|
||||
},
|
||||
{
|
||||
"name": "test_rubygem-gem2rpm-doc_function_install",
|
||||
"desc": "Test package installation"
|
||||
@@ -13,18 +9,6 @@
|
||||
{
|
||||
"name": "test_rubygem-gem2rpm-doc_function_uninstall",
|
||||
"desc": "Test package removal"
|
||||
},
|
||||
{
|
||||
"name": "test_rubygem-gem2rpm-doc_function_help",
|
||||
"desc": "Test help command output"
|
||||
},
|
||||
{
|
||||
"name": "test_rubygem-gem2rpm-doc_function_version",
|
||||
"desc": "Test version command output"
|
||||
},
|
||||
{
|
||||
"name": "test_rubygem-gem2rpm-doc_function_basic_convert",
|
||||
"desc": "Test basic gem to spec conversion"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -6,10 +6,6 @@
|
||||
"name": "test_texi2html-help_function_basic",
|
||||
"desc": "Basic functionality test for texi2html-help"
|
||||
},
|
||||
{
|
||||
"name": "test_texi2html-help_function_install",
|
||||
"desc": "Test installation of texi2html-help package"
|
||||
},
|
||||
{
|
||||
"name": "test_texi2html-help_function_check",
|
||||
"desc": "Test if texi2html-help is installed and available"
|
||||
@@ -17,18 +13,6 @@
|
||||
{
|
||||
"name": "test_texi2html-help_function_help",
|
||||
"desc": "Test --help option for usage information"
|
||||
},
|
||||
{
|
||||
"name": "test_texi2html-help_function_version",
|
||||
"desc": "Test --version option to display version"
|
||||
},
|
||||
{
|
||||
"name": "test_texi2html-help_function_convert",
|
||||
"desc": "Test converting a simple .texi file to HTML"
|
||||
},
|
||||
{
|
||||
"name": "test_texi2html-help_function_uninstall",
|
||||
"desc": "Test uninstallation of texi2html-help package"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,126 +0,0 @@
|
||||
{
|
||||
"path": "$OET_PATH/testcases/function_test/pkg_test/texlive-base/texlive-epspdf",
|
||||
"machine num": 1,
|
||||
"cases": [
|
||||
{
|
||||
"name": "test_texlive-epspdf_function_uninstall",
|
||||
"desc": "Test package uninstallation"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-epspdf_epspdf_basic_eps_to_pdf",
|
||||
"desc": "测试epspdf命令将EPS文件转换为PDF文件的基本功能"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-epspdf_epspdf_basic_ps_to_pdf",
|
||||
"desc": "测试epspdf命令将PS文件转换为PDF文件的基本功能"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-epspdf_epspdf_basic_pdf_to_eps",
|
||||
"desc": "测试epspdf命令将PDF文件转换为EPS文件的基本功能"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-epspdf_epspdf_p",
|
||||
"desc": "测试epspdf命令使用-p参数指定页面进行转换"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-epspdf_epspdf_g",
|
||||
"desc": "测试epspdf命令使用-g参数将输出转换为灰度模式"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-epspdf_epspdf_b",
|
||||
"desc": "测试epspdf命令使用-b参数计算紧密的边界框"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-epspdf_epspdf_upper_t",
|
||||
"desc": "测试epspdf命令使用-T参数指定目标输出质量(如screen)"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-epspdf_epspdf_upper_n",
|
||||
"desc": "测试epspdf命令使用-N参数指定PDF版本(如1.5)"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-epspdf_epspdf_upper_u",
|
||||
"desc": "测试epspdf命令使用-U参数在可用时使用pdftops"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-epspdf_epspdf_upper_i",
|
||||
"desc": "测试epspdf命令使用-I参数反转-U参数的行为"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-epspdf_epspdf_s",
|
||||
"desc": "测试epspdf命令使用-s参数将设置保存到配置文件"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-epspdf_epspdf_i",
|
||||
"desc": "测试epspdf命令使用-i参数显示检测到的文件类型信息"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-epspdf_epspdf_d",
|
||||
"desc": "测试epspdf命令使用-d参数进行调试,不删除临时文件"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-epspdf_epspdf_v",
|
||||
"desc": "测试epspdf命令使用-v参数显示版本信息"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-epspdf_epspdf_h",
|
||||
"desc": "测试epspdf命令使用-h参数显示帮助信息"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-epspdf_epspdf_p_g",
|
||||
"desc": "测试epspdf命令组合使用-p和-g参数"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-epspdf_epspdf_p_b",
|
||||
"desc": "测试epspdf命令组合使用-p和-b参数"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-epspdf_epspdf_upper_t_upper_n",
|
||||
"desc": "测试epspdf命令组合使用-T和-N参数"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-epspdf_epspdf_upper_u_upper_i",
|
||||
"desc": "测试epspdf命令组合使用-U和-I参数"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-epspdf_epspdftk_v",
|
||||
"desc": "测试显示版本信息"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-epspdf_epspdftk_h",
|
||||
"desc": "测试显示帮助信息"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-epspdf_function_install",
|
||||
"desc": "测试软件包安装功能"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-epspdf_function_check",
|
||||
"desc": "检查epspdf命令是否安装"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-epspdf_function_eps2pdf",
|
||||
"desc": "测试EPS转PDF常用功能"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-epspdf_function_ps2pdf",
|
||||
"desc": "测试PS转PDF常用功能"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-epspdf_function_pdf2eps",
|
||||
"desc": "测试PDF转EPS常用功能"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-epspdf_function_grayscale",
|
||||
"desc": "测试灰度转换功能"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-epspdf_function_crop",
|
||||
"desc": "测试裁剪边界框功能"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-epspdf_function_quality",
|
||||
"desc": "测试指定输出质量"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -2,34 +2,6 @@
|
||||
"path": "$OET_PATH/testcases/function_test/pkg_test/texlive-base/texlive-tex4ht",
|
||||
"machine num": 1,
|
||||
"cases": [
|
||||
{
|
||||
"name": "test_texlive-tex4ht_ht__v",
|
||||
"desc": "测试 ht 命令的 -v 参数"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htcontext__v",
|
||||
"desc": "测试 htcontext 命令的 -v 参数"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htlatex__upper_v",
|
||||
"desc": "测试 htlatex 命令的 V 参数"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htlatex__v",
|
||||
"desc": "测试 htlatex 命令的 v 参数"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htmex_v",
|
||||
"desc": "测试 htmex 命令的 -v 参数"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htmex_upper_v",
|
||||
"desc": "测试 htmex 命令的 -V 参数"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htmex_num_1",
|
||||
"desc": "测试 htmex 命令的 -1 参数"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_httex_v",
|
||||
"desc": "测试 httex 命令的 -v 参数"
|
||||
@@ -38,797 +10,9 @@
|
||||
"name": "test_texlive-tex4ht_httexi_upper_v",
|
||||
"desc": "测试 httexi 命令的 -V 参数功能"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htxelatex__v",
|
||||
"desc": "测试 htxelatex 命令的 -v 参数,验证是否显示版本信息"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htxetex_v",
|
||||
"desc": "测试 htxetex 命令的 -v 参数"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htxetex_upper_v",
|
||||
"desc": "测试 htxetex 命令的 -V 参数"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htxetex_num_1",
|
||||
"desc": "测试 htxetex 命令的 -1 参数"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_mk4ht_htlatex",
|
||||
"desc": "测试使用 htlatex 命令生成 HTML 文件"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_mk4ht_xhlatex",
|
||||
"desc": "测试使用 xhlatex 命令生成 HTML 文件"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_mk4ht_oolatex",
|
||||
"desc": "测试使用 oolatex 命令生成 HTML 文件"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_mk4ht_dblatex",
|
||||
"desc": "测试使用 dblatex 命令生成 HTML 文件"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_mk4ht_dbmlatex",
|
||||
"desc": "测试使用 dbmlatex 命令生成 HTML 文件"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_mk4ht_jhlatex",
|
||||
"desc": "测试使用 jhlatex 命令生成 HTML 文件"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_mk4ht_eslatex",
|
||||
"desc": "测试使用 eslatex 命令生成 HTML 文件"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_mk4ht_teilatex",
|
||||
"desc": "测试使用 teilatex 命令生成 HTML 文件"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_mk4ht_xetex",
|
||||
"desc": "测试使用 xetex 命令生成 HTML 文件"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_t4ht_b",
|
||||
"desc": "测试忽略 -d -m -M 参数对位图的影响"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_t4ht_c",
|
||||
"desc": "测试选择环境文件中的命名段"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_t4ht_d",
|
||||
"desc": "测试指定输出文件的目录"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_t4ht_e",
|
||||
"desc": "测试指定 tex4ht.env 文件的位置"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_t4ht_i",
|
||||
"desc": "测试调试信息的输出"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_t4ht_g",
|
||||
"desc": "测试忽略系统调用中的错误"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_t4ht_m",
|
||||
"desc": "测试设置新输出文件的权限"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_t4ht_p",
|
||||
"desc": "测试不转换图片的功能"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_t4ht_r",
|
||||
"desc": "测试替换所有字形的位图"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_t4ht_upper_m",
|
||||
"desc": "测试设置所有输出文件的权限"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_t4ht_upper_q",
|
||||
"desc": "测试在 tex4ht.c 出现问题时退出程序的功能"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_t4ht_upper_s",
|
||||
"desc": "测试系统调用的权限设置"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_t4ht_upper_x",
|
||||
"desc": "测试 X 脚本中 %%3 字段的内容设置"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_xhlatex_upper_v",
|
||||
"desc": "测试 xhlatex 命令的 -V 参数"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_xhlatex_v",
|
||||
"desc": "测试 xhlatex 命令的 -v 参数"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_xhlatex_num_1",
|
||||
"desc": "测试 xhlatex 命令的 -1 参数"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_function_htlatex_html",
|
||||
"desc": "测试 htlatex 命令生成 HTML 文件的功能"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_ht_upper_v",
|
||||
"desc": "测试ht命令的详细模式"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_ht_upper_d",
|
||||
"desc": "测试ht命令的调试模式"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_ht_upper_f",
|
||||
"desc": "测试ht命令的强制模式"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_ht_upper_q",
|
||||
"desc": "测试ht命令的安静模式"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_ht_upper_i",
|
||||
"desc": "测试ht命令的交互模式"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_ht_upper_a",
|
||||
"desc": "测试ht命令的ASCII模式"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_ht_upper_e",
|
||||
"desc": "测试ht命令的错误处理模式"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_ht_upper_o",
|
||||
"desc": "测试ht命令的输出文件参数"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_ht_upper_l",
|
||||
"desc": "测试ht命令的语言参数"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_ht_upper_m",
|
||||
"desc": "测试ht命令的数学模式参数"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htcontext_version",
|
||||
"desc": "测试显示htcontext命令的版本信息"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htcontext_help",
|
||||
"desc": "测试显示htcontext命令的帮助信息"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htcontext_upper_v",
|
||||
"desc": "测试htcontext命令的详细输出模式"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htcontext_upper_q",
|
||||
"desc": "测试htcontext命令的安静模式"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htcontext_upper_d",
|
||||
"desc": "测试htcontext命令的调试模式"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htcontext_upper_f",
|
||||
"desc": "测试htcontext命令的强制模式"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htcontext_upper_i",
|
||||
"desc": "测试htcontext命令的交互模式"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htcontext_upper_s",
|
||||
"desc": "测试htcontext命令的模拟运行模式"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htcontext_upper_u",
|
||||
"desc": "测试htcontext命令的UTF-8模式"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htlatex_upper_v",
|
||||
"desc": "测试htlatex命令的-V参数,用于显示版本信息"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htlatex_h",
|
||||
"desc": "测试htlatex命令的-h参数,用于显示帮助信息"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htlatex_l",
|
||||
"desc": "测试htlatex命令的-l参数,用于指定LaTeX格式"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htlatex_upper_f",
|
||||
"desc": "测试htlatex命令的-F参数,用于指定配置文件"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htlatex_upper_i",
|
||||
"desc": "测试htlatex命令的-I参数,用于指定输入文件"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htlatex_upper_d",
|
||||
"desc": "测试htlatex命令的-D参数,用于指定输出目录"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htlatex_upper_j",
|
||||
"desc": "测试htlatex命令的-J参数,用于指定编码"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htlatex_upper_c",
|
||||
"desc": "测试htlatex命令的-C参数,用于指定自定义配置"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htlatex_upper_a",
|
||||
"desc": "测试htlatex命令的-A参数,用于指定额外的DVI过滤器参数"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htlatex_upper_v_upper_f",
|
||||
"desc": "测试htlatex命令的-V和-F参数组合,显示版本信息并指定配置文件"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htlatex_h_upper_i",
|
||||
"desc": "测试htlatex命令的-h和-I参数组合,显示帮助信息并指定输入文件"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htlatex_l_upper_d",
|
||||
"desc": "测试htlatex命令的-l和-D参数组合,指定LaTeX格式和输出目录"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htlatex_upper_j_upper_c",
|
||||
"desc": "测试htlatex命令的-J和-C参数组合,指定编码和自定义配置"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htmex__upper_v",
|
||||
"desc": "测试 htmex 命令的详细模式,用于显示处理过程中的详细信息"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htmex__upper_f",
|
||||
"desc": "测试 htmex 命令的强制模式,用于强制重新生成所有输出文件"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htmex__upper_d",
|
||||
"desc": "测试 htmex 命令的调试模式,用于输出调试信息"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htmex__upper_h",
|
||||
"desc": "测试 htmex 命令的帮助信息,用于显示命令的使用说明"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htmex__upper_o",
|
||||
"desc": "测试 htmex 命令的输出目录指定功能,用于将生成的文件输出到指定目录"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htmex__upper_i",
|
||||
"desc": "测试 htmex 命令的交互模式,用于在转换过程中进行交互式操作"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htmex__upper_a",
|
||||
"desc": "测试 htmex 命令的自动模式,用于自动处理文件转换过程中的依赖关系"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htmex__upper_c",
|
||||
"desc": "测试 htmex 命令的配置模式,用于指定配置文件"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htmex__upper_s",
|
||||
"desc": "测试 htmex 命令的静默模式,用于减少输出信息"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htmex__upper_t",
|
||||
"desc": "测试 htmex 命令的临时文件模式,用于保留临时文件以便调试"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_httex_upper_v",
|
||||
"desc": "测试httex命令的详细版本信息输出"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_httex_upper_h",
|
||||
"desc": "测试httex命令显示帮助信息"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_httex_upper_i",
|
||||
"desc": "测试httex命令的交互模式"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_httex_upper_j",
|
||||
"desc": "测试httex命令的字符集处理"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_httex_upper_u",
|
||||
"desc": "测试httex命令的Unicode支持"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_httex_upper_l",
|
||||
"desc": "测试httex命令的LaTeX模式"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_httex_upper_t",
|
||||
"desc": "测试httex命令的TeX模式"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_httex_upper_f",
|
||||
"desc": "测试httex命令的配置文件参数"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_httex_upper_d",
|
||||
"desc": "测试httex命令的调试输出选项"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_httex_upper_c",
|
||||
"desc": "测试httex命令的CSS样式表输出"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_httex_upper_s",
|
||||
"desc": "测试httex命令的数学公式输出样式"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_httex_upper_a",
|
||||
"desc": "测试httex命令的ASCII输出模式"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_httex_upper_e",
|
||||
"desc": "测试httex命令的编码设置"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_httexi_upper_h",
|
||||
"desc": "测试httexi命令的帮助信息输出"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_httexi_upper_q",
|
||||
"desc": "测试httexi命令的安静模式,减少输出"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_httexi_upper_f",
|
||||
"desc": "测试httexi命令的强制模式,覆盖现有文件"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_httexi_upper_l",
|
||||
"desc": "测试httexi命令的LaTeX模式,使用latex命令处理"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_httexi_upper_p",
|
||||
"desc": "测试httexi命令的PDF模式,使用pdflatex命令处理"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_httexi_upper_x",
|
||||
"desc": "测试httexi命令的XeTeX模式,使用xelatex命令处理"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_httexi_upper_lu",
|
||||
"desc": "测试httexi命令的LuaTeX模式,使用lualatex命令处理"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htxelatex_no_args",
|
||||
"desc": "测试不带任何参数执行htxelatex命令"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htxelatex_upper_i",
|
||||
"desc": "测试htxelatex命令的-I参数,用于指定输入文件"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htxelatex_upper_o",
|
||||
"desc": "测试htxelatex命令的-O参数,用于指定输出目录"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htxelatex_upper_j",
|
||||
"desc": "测试htxelatex命令的-J参数,用于指定配置文件"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htxelatex_upper_p",
|
||||
"desc": "测试htxelatex命令的-P参数,用于指定配置文件路径"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htxelatex_upper_c",
|
||||
"desc": "测试htxelatex命令的-C参数,用于指定配置文件"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htxelatex_upper_d",
|
||||
"desc": "测试htxelatex命令的-D参数,用于指定输出目录"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htxelatex_upper_a",
|
||||
"desc": "测试htxelatex命令的-A参数,用于指定额外的参数传递给tex4ht"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htxelatex_upper_m",
|
||||
"desc": "测试htxelatex命令的-M参数,用于指定make4ht的构建文件"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htxelatex_upper_e",
|
||||
"desc": "测试htxelatex命令的-E参数,用于指定使用指定的引擎"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htxelatex_upper_x",
|
||||
"desc": "测试htxelatex命令的-X参数,用于指定执行额外的命令"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htxelatex_upper_u",
|
||||
"desc": "测试htxelatex命令的-U参数,用于更新make4ht的数据库"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htxelatex_upper_q",
|
||||
"desc": "测试htxelatex命令的-Q参数,用于静默模式"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htxelatex_upper_v",
|
||||
"desc": "测试htxelatex命令的-V参数,用于显示版本信息"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htxelatex_upper_h",
|
||||
"desc": "测试htxelatex命令的-H参数,用于显示帮助信息"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htxelatex_upper_l",
|
||||
"desc": "测试htxelatex命令的-L参数,用于显示许可证信息"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htxelatex_upper_s",
|
||||
"desc": "测试htxelatex命令的-S参数,用于显示系统信息"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htxetex_help",
|
||||
"desc": "测试 htxetex 命令的 --help 参数,验证是否显示帮助信息"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htxetex_version",
|
||||
"desc": "测试 htxetex 命令的 --version 参数,验证是否显示版本信息"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htxetex_upper_i",
|
||||
"desc": "测试 htxetex 命令的 -I 参数,验证是否显示提示信息"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htxetex_upper_j",
|
||||
"desc": "测试 htxetex 命令的 -J 参数,验证是否指定字体文件"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htxetex_upper_k",
|
||||
"desc": "测试 htxetex 命令的 -K 参数,验证是否处理特定字符集"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htxetex_upper_l",
|
||||
"desc": "测试 htxetex 命令的 -L 参数,验证是否使用特定语言设置"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htxetex_upper_m",
|
||||
"desc": "测试 htxetex 命令的 -M 参数,验证是否使用特定模式"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htxetex_upper_n",
|
||||
"desc": "测试 htxetex 命令的 -N 参数,验证是否禁止特定功能"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htxetex_upper_o",
|
||||
"desc": "测试 htxetex 命令的 -O 参数,验证是否设置输出选项"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htxetex_upper_p",
|
||||
"desc": "测试 htxetex 命令的 -P 参数,验证是否使用特定配置文件"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htxetex_upper_q",
|
||||
"desc": "测试 htxetex 命令的 -Q 参数,验证是否静默模式运行"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htxetex_upper_r",
|
||||
"desc": "测试 htxetex 命令的 -R 参数,验证是否递归处理文件"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htxetex_upper_s",
|
||||
"desc": "测试 htxetex 命令的 -S 参数,验证是否使用安全模式"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htxetex_upper_t",
|
||||
"desc": "测试 htxetex 命令的 -T 参数,验证是否指定输出类型"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htxetex_upper_u",
|
||||
"desc": "测试 htxetex 命令的 -U 参数,验证是否使用Unicode编码"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htxetex_upper_w",
|
||||
"desc": "测试 htxetex 命令的 -W 参数,验证是否显示警告信息"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htxetex_upper_x",
|
||||
"desc": "测试 htxetex 命令的 -X 参数,验证是否使用扩展功能"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htxetex_upper_y",
|
||||
"desc": "测试 htxetex 命令的 -Y 参数,验证是否使用特定年份"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_htxetex_upper_z",
|
||||
"desc": "测试 htxetex 命令的 -Z 参数,验证是否压缩输出"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_mk4ht_htlatex_with_tex_args",
|
||||
"desc": "使用 htlatex 处理 .tex 文件,并为 latex 命令指定额外参数"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_mk4ht_htlatex_with_tex4ht_args",
|
||||
"desc": "使用 htlatex 处理 .tex 文件,并为 tex4ht.c 指定额外参数"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_mk4ht_htlatex_with_t4ht_args",
|
||||
"desc": "使用 htlatex 处理 .tex 文件,并为 t4ht.c 指定额外参数"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_mk4ht_ht",
|
||||
"desc": "使用 mk4ht ht 格式,指定 latex 引擎处理 .tex 文件"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_mk4ht_tex",
|
||||
"desc": "使用 tex 引擎(而非 latex)处理 .tex 文件"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_mk4ht_xelatex",
|
||||
"desc": "使用 xelatex 引擎处理 .tex 文件"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_mk4ht_no_filename",
|
||||
"desc": "不带文件名参数调用 mk4ht,触发未初始化变量警告"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_t4ht_special_dot",
|
||||
"desc": "测试为.脚本中的%%2字段提供内容的功能"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_tex4ht_f_path_separator",
|
||||
"desc": "测试使用 -f 参数指定路径分隔符"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_tex4ht_dot_ext",
|
||||
"desc": "测试使用 -. 参数指定替换默认的 .dvi 文件扩展名"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_tex4ht_c_tag_name",
|
||||
"desc": "测试使用 -c 参数选择环境文件中的指定段"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_tex4ht_e_env_file",
|
||||
"desc": "测试使用 -e 参数指定环境文件"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_tex4ht_f_path_separator_ch",
|
||||
"desc": "测试使用 -f 参数从文件名中移除路径"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_tex4ht_upper_f_ch_code",
|
||||
"desc": "测试使用 -F 参数指定缺失字体字符的替换码"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_tex4ht_g_bitmap_file_ext",
|
||||
"desc": "测试使用 -g 参数指定位图文件扩展名"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_tex4ht_h_e",
|
||||
"desc": "测试使用 -h 参数并启用 e 选项来跟踪错误/警告"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_tex4ht_h_f",
|
||||
"desc": "测试使用 -h 参数并启用 f 选项来跟踪 htf 字体"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_tex4ht_h_upper_f",
|
||||
"desc": "测试使用 -h 参数并启用 F 选项来跟踪 htf 字体搜索"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_tex4ht_h_g",
|
||||
"desc": "测试使用 -h 参数并启用 g 选项来跟踪组"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_tex4ht_h_s",
|
||||
"desc": "测试使用 -h 参数并启用 s 选项来跟踪特殊命令"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_tex4ht_h_v",
|
||||
"desc": "测试使用 -h 参数并启用 v 选项来跟踪环境变量"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_tex4ht_h_upper_v",
|
||||
"desc": "测试使用 -h 参数并启用 V 选项来跟踪环境变量搜索"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_tex4ht_h_upper_a",
|
||||
"desc": "测试使用 -h 参数并启用 A 选项来跟踪所有信息"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_tex4ht_i_htf_font_dir",
|
||||
"desc": "测试使用 -i 参数指定 htf 字体目录"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_tex4ht_l_bookkeeping_file",
|
||||
"desc": "测试使用 -l 参数指定簿记文件"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_tex4ht_upper_p_star",
|
||||
"desc": "测试使用 -P 参数并指定 * 以始终允许系统调用"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_tex4ht_upper_p_filter",
|
||||
"desc": "测试使用 -P 参数并指定过滤器以控制系统调用权限"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_tex4ht_upper_s_image_script",
|
||||
"desc": "测试使用 -S 参数指定图像脚本"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_tex4ht_s_css_file_ext",
|
||||
"desc": "测试使用 -s 参数指定 CSS 文件扩展名,默认 -s4cs"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_tex4ht_t_tfm_font_dir",
|
||||
"desc": "测试使用 -t 参数指定 tfm 字体目录"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_tex4ht_u_num_10",
|
||||
"desc": "测试使用 -u10 参数以 10 为基数处理 Unicode 字符"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_tex4ht_utf8",
|
||||
"desc": "测试使用 -utf8 参数指定 Unicode 字符使用 UTF-8 编码"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_tex4ht_v_idv_version",
|
||||
"desc": "测试使用 -v 参数替换给定的 dvi 版本"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_tex4ht_xs",
|
||||
"desc": "测试使用 -xs 参数为自动生成的 GIF 文件使用 MS-DOS 文件名"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_xhlatex_no_args",
|
||||
"desc": "测试不带参数运行xhlatex命令"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_xhlatex_upper_h",
|
||||
"desc": "测试带-H参数运行xhlatex命令"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_xhlatex_upper_i",
|
||||
"desc": "测试带-I参数运行xhlatex命令"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_xhlatex_upper_d",
|
||||
"desc": "测试带-D参数运行xhlatex命令"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_xhlatex_upper_f",
|
||||
"desc": "测试带-F参数运行xhlatex命令"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_xhlatex_upper_m",
|
||||
"desc": "测试带-M参数运行xhlatex命令"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_xhlatex_upper_s",
|
||||
"desc": "测试带-S参数运行xhlatex命令"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_xhlatex_upper_c",
|
||||
"desc": "测试带-C参数运行xhlatex命令"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_xhlatex_upper_a",
|
||||
"desc": "测试带-A参数运行xhlatex命令"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_xhlatex_upper_l",
|
||||
"desc": "测试带-L参数运行xhlatex命令"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_xhlatex_upper_x",
|
||||
"desc": "测试带-X参数运行xhlatex命令"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_xhlatex_upper_u",
|
||||
"desc": "测试带-U参数运行xhlatex命令"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_xhlatex_upper_q",
|
||||
"desc": "测试带-Q参数运行xhlatex命令"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_xhlatex_upper_p",
|
||||
"desc": "测试带-P参数运行xhlatex命令"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_xhlatex_upper_o",
|
||||
"desc": "测试带-O参数运行xhlatex命令"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_xhlatex_upper_n",
|
||||
"desc": "测试带-N参数运行xhlatex命令"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_xhlatex_upper_e",
|
||||
"desc": "测试带-E参数运行xhlatex命令"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_xhlatex_upper_t",
|
||||
"desc": "测试带-T参数运行xhlatex命令"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_xhlatex_upper_r",
|
||||
"desc": "测试带-R参数运行xhlatex命令"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_xhlatex_upper_w",
|
||||
"desc": "测试带-W参数运行xhlatex命令"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_xhlatex_upper_y",
|
||||
"desc": "测试带-Y参数运行xhlatex命令"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_xhlatex_upper_z",
|
||||
"desc": "测试带-Z参数运行xhlatex命令"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_xhlatex_upper_j",
|
||||
"desc": "测试带-J参数运行xhlatex命令"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_xhlatex_upper_k",
|
||||
"desc": "测试带-K参数运行xhlatex命令"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_xhlatex_upper_g",
|
||||
"desc": "测试带-G参数运行xhlatex命令"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_xhlatex_upper_b",
|
||||
"desc": "测试带-B参数运行xhlatex命令"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_function_install",
|
||||
"desc": "测试 texlive-tex4ht 软件包的安装功能"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_function_uninstall",
|
||||
"desc": "测试 texlive-tex4ht 软件包的卸载功能"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_function_check",
|
||||
"desc": "检查 texlive-tex4ht 软件包是否已安装"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_function_basic_usage",
|
||||
"desc": "测试使用 htlatex 转换基本 LaTeX 文件为 HTML"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_function_make4ht_usage",
|
||||
"desc": "测试使用 mk4ht 命令处理 LaTeX 文件"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_function_config_file",
|
||||
"desc": "测试使用自定义配置文件转换 LaTeX"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_function_output_dir",
|
||||
"desc": "测试指定输出目录的 LaTeX 到 HTML 转换"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_function_convert_with_images",
|
||||
"desc": "测试转换包含图片的 LaTeX 文件"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_function_convert_math",
|
||||
"desc": "测试转换包含数学公式的 LaTeX 文件"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-tex4ht_function_batch_convert",
|
||||
"desc": "测试批量转换多个 LaTeX 文件为 HTML"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -2,22 +2,6 @@
|
||||
"path": "$OET_PATH/testcases/function_test/pkg_test/texlive-split-c/texlive-biolett-bst",
|
||||
"machine num": 1,
|
||||
"cases": [
|
||||
{
|
||||
"name": "test_texlive-biolett-bst_function_bibstyle",
|
||||
"desc": "Verify bibstyle generation"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-biolett-bst_function_install",
|
||||
"desc": "Verify package installation"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-biolett-bst_function_latexdoc",
|
||||
"desc": "Verify LaTeX document compilation with biolett.bst"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-biolett-bst_function_bibtexrun",
|
||||
"desc": "Verify BibTeX processes bibliography using biolett.bst"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-biolett-bst_function_uninstall",
|
||||
"desc": "Verify package uninstallation"
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"path": "$OET_PATH/testcases/function_test/pkg_test/texlive-split-d/texlive-cite",
|
||||
"machine num": 1,
|
||||
"cases": [
|
||||
{
|
||||
"name": "test_texlive-cite_function_bib",
|
||||
"desc": "Test bibliography citation"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"path": "$OET_PATH/testcases/function_test/pkg_test/texlive-split-f/texlive-ctex",
|
||||
"machine num": 1,
|
||||
"cases": [
|
||||
{
|
||||
"name": "test_texlive-ctex_function_basic",
|
||||
"desc": "Test basic commands"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"path": "$OET_PATH/testcases/function_test/pkg_test/texlive-split-f/texlive-dcpic",
|
||||
"machine num": 1,
|
||||
"cases": [
|
||||
{
|
||||
"name": "test_texlive-dcpic_function_basic",
|
||||
"desc": "Basic functionality test"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"path": "$OET_PATH/testcases/function_test/pkg_test/texlive-split-h/texlive-eulervm",
|
||||
"machine num": 1,
|
||||
"cases": [
|
||||
{
|
||||
"name": "test_texlive-eulervm_function_rendering",
|
||||
"desc": "Test rendering of EulerVM fonts"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"path": "$OET_PATH/testcases/function_test/pkg_test/texlive-split-i/texlive-fixfoot-doc",
|
||||
"machine num": 1,
|
||||
"cases": [
|
||||
{
|
||||
"name": "test_texlive-fixfoot-doc_function_install",
|
||||
"desc": "Test package installation"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -9,18 +9,6 @@
|
||||
{
|
||||
"name": "test_texlive-footmisc-doc_function_check_installed",
|
||||
"desc": "Check if the package is installed on the system"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-footmisc-doc_function_verify_files",
|
||||
"desc": "Verify the existence of key documentation files"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-footmisc-doc_function_use_manpage",
|
||||
"desc": "Test accessing the package man page"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-footmisc-doc_function_use_info",
|
||||
"desc": "Test accessing the package info documentation"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -6,21 +6,9 @@
|
||||
"name": "test_texlive-hyphen-basque_function_install",
|
||||
"desc": "Test package installation"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-hyphen-basque_function_check_installed",
|
||||
"desc": "Verify the package is correctly installed"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-hyphen-basque_function_remove",
|
||||
"desc": "Test package removal"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-hyphen-basque_function_verify_patterns",
|
||||
"desc": "Verify Basque hyphenation patterns exist"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-hyphen-basque_function_usage",
|
||||
"desc": "Test basic LaTeX hyphenation usage"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -2,10 +2,6 @@
|
||||
"path": "$OET_PATH/testcases/function_test/pkg_test/texlive-split-o/texlive-mattens",
|
||||
"machine num": 1,
|
||||
"cases": [
|
||||
{
|
||||
"name": "test_texlive-mattens_function_install",
|
||||
"desc": "Test package installation"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-mattens_function_remove",
|
||||
"desc": "Test package removal"
|
||||
@@ -13,10 +9,6 @@
|
||||
{
|
||||
"name": "test_texlive-mattens_function_exist",
|
||||
"desc": "Test if package is installed"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-mattens_function_usage",
|
||||
"desc": "Test LaTeX document compile"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -5,10 +5,6 @@
|
||||
{
|
||||
"name": "test_texlive-nkarta_function_uninstall",
|
||||
"desc": "Test package uninstallation"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-nkarta_function_basic",
|
||||
"desc": "Test basic functionality"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"path": "$OET_PATH/testcases/function_test/pkg_test/texlive-split-u/texlive-sectionbreak",
|
||||
"machine num": 1,
|
||||
"cases": [
|
||||
{
|
||||
"name": "test_texlive-sectionbreak_function_sectionbreak",
|
||||
"desc": "Test the section break functionality in texlive-sectionbreak"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"path": "$OET_PATH/testcases/function_test/pkg_test/texlive-split-y/texlive-dpcircling",
|
||||
"machine num": 1,
|
||||
"cases": [
|
||||
{
|
||||
"name": "test_texlive-dpcircling_function_basic",
|
||||
"desc": "Basic functionality test"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-dpcircling_function_install",
|
||||
"desc": "Test installation of the texlive-dpcircling package"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-dpcircling_function_basic_cmd",
|
||||
"desc": "Test basic circling command usage"
|
||||
},
|
||||
{
|
||||
"name": "test_texlive-dpcircling_function_remove",
|
||||
"desc": "Test removal of the texlive-dpcircling package"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"path": "$OET_PATH/testcases/function_test/pkg_test/texlive-split-y/texlive-wordlike-doc",
|
||||
"machine num": 1,
|
||||
"cases": [
|
||||
{
|
||||
"name": "test_texlive-wordlike-doc_function_install",
|
||||
"desc": "Test installation of texlive-wordlike-doc"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"path": "$OET_PATH/testcases/function_test/pkg_test/texlive-split-z/texlive-zxjatype",
|
||||
"machine num": 1,
|
||||
"cases": [
|
||||
{
|
||||
"name": "test_texlive-zxjatype_function_install",
|
||||
"desc": "Test package installation"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -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-12-10
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : Test execution of arquillian-testng-core
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
LOG_INFO "开始测试:Test execution of arquillian-testng-core"
|
||||
|
||||
# 检查是否已安装arquillian-testng-core
|
||||
LOG_INFO "检查是否已安装arquillian-testng-core"
|
||||
dnf list installed arquillian-testng-core > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "arquillian-testng-core已安装,测试结束后将保持安装状态"
|
||||
INSTALLED=true
|
||||
else
|
||||
LOG_INFO "arquillian-testng-core未安装,测试结束后将卸载"
|
||||
INSTALLED=false
|
||||
fi
|
||||
|
||||
# 检查yum源中是否有arquillian-testng-core软件包
|
||||
LOG_INFO "检查yum源中是否有arquillian-testng-core软件包"
|
||||
dnf list available arquillian-testng-core > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 255 "yum源中未找到arquillian-testng-core软件包"
|
||||
|
||||
# 安装arquillian-testng-core
|
||||
if [ "$INSTALLED" = false ]; then
|
||||
LOG_INFO "开始安装arquillian-testng-core"
|
||||
dnf install -y arquillian-testng-core > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "安装arquillian-testng-core失败"
|
||||
fi
|
||||
|
||||
# 测试arquillian-testng-core功能
|
||||
LOG_INFO "测试arquillian-testng-core功能执行"
|
||||
test_command="arquillian-testng-core --version"
|
||||
eval $test_command > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 255 "arquillian-testng-core命令执行失败或参数不支持"
|
||||
|
||||
# 清理环境
|
||||
if [ "$INSTALLED" = false ]; then
|
||||
LOG_INFO "卸载arquillian-testng-core"
|
||||
dnf remove -y arquillian-testng-core > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "卸载arquillian-testng-core失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成:Test execution of arquillian-testng-core"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,63 +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-29
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : Test initialization of arquillian-testng-core
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
|
||||
# 检查arquillian-testng-core是否已安装
|
||||
LOG_INFO "检查arquillian-testng-core是否已安装"
|
||||
rpm -q arquillian-testng-core > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "arquillian-testng-core已安装,脚本结束时将保持安装状态"
|
||||
INSTALLED=true
|
||||
else
|
||||
LOG_INFO "arquillian-testng-core未安装,将在测试结束后卸载"
|
||||
INSTALLED=false
|
||||
fi
|
||||
|
||||
# 检查yum源中是否有arquillian-testng-core软件包
|
||||
LOG_INFO "检查yum源中是否有arquillian-testng-core软件包"
|
||||
dnf list available arquillian-testng-core > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 255 "yum源中未找到arquillian-testng-core软件包"
|
||||
|
||||
# 安装arquillian-testng-core
|
||||
if [ "$INSTALLED" = false ]; then
|
||||
LOG_INFO "安装arquillian-testng-core"
|
||||
dnf install -y arquillian-testng-core
|
||||
CHECK_RESULT $? 0 0 "安装arquillian-testng-core失败"
|
||||
fi
|
||||
|
||||
# 测试初始化功能
|
||||
LOG_INFO "测试arquillian-testng-core的初始化功能"
|
||||
arquillian-testng-core --init
|
||||
CHECK_RESULT $? 0 255 "arquillian-testng-core初始化失败或参数不支持"
|
||||
|
||||
# 清理环境
|
||||
if [ "$INSTALLED" = false ]; then
|
||||
LOG_INFO "卸载arquillian-testng-core"
|
||||
dnf remove -y arquillian-testng-core
|
||||
CHECK_RESULT $? 0 0 "卸载arquillian-testng-core失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试脚本执行完毕,环境已恢复"
|
||||
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,89 +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 : 2026-04-05
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试cd-convert命令的帮助信息
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
LOG_INFO "开始测试:测试cd-convert命令的帮助信息"
|
||||
LOG_INFO "步骤1:检查colord-gtk软件包是否已在yum源中"
|
||||
if ! dnf list available colord-gtk 2>/dev/null | grep -q colord-gtk; then
|
||||
LOG_ERROR "yum源中未找到colord-gtk软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
LOG_INFO "步骤2:检查系统是否已安装colord-gtk软件包"
|
||||
if rpm -q colord-gtk >/dev/null 2>&1; then
|
||||
LOG_INFO "colord-gtk软件包已安装,测试后保持安装状态"
|
||||
INSTALLED=true
|
||||
else
|
||||
LOG_INFO "colord-gtk软件包未安装,将进行安装"
|
||||
INSTALLED=false
|
||||
fi
|
||||
|
||||
if [ "$INSTALLED" = false ]; then
|
||||
LOG_INFO "步骤3:安装colord-gtk软件包"
|
||||
dnf install -y colord-gtk
|
||||
CHECK_RESULT $? 0 0 "安装colord-gtk软件包失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "步骤4:检查cd-convert命令是否存在"
|
||||
if ! command -v cd-convert >/dev/null 2>&1; then
|
||||
LOG_ERROR "cd-convert命令不存在"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
LOG_INFO "步骤5:测试cd-convert命令的帮助信息参数"
|
||||
LOG_INFO "执行命令:cd-convert --help"
|
||||
cd-convert --help
|
||||
CHECK_RESULT $? 0 0 "执行cd-convert --help命令失败"
|
||||
|
||||
LOG_INFO "步骤6:检查cd-convert命令是否支持--help参数"
|
||||
if cd-convert --help 2>&1 | grep -q "用法\|Usage\|help"; then
|
||||
LOG_INFO "cd-convert命令支持--help参数"
|
||||
else
|
||||
LOG_ERROR "cd-convert命令不支持--help参数"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
LOG_INFO "步骤7:测试cd-convert命令的-h参数"
|
||||
LOG_INFO "执行命令:cd-convert -h"
|
||||
cd-convert -h
|
||||
CHECK_RESULT $? 0 0 "执行cd-convert -h命令失败"
|
||||
|
||||
LOG_INFO "步骤8:检查cd-convert命令是否支持-h参数"
|
||||
if cd-convert -h 2>&1 | grep -q "用法\|Usage\|help"; then
|
||||
LOG_INFO "cd-convert命令支持-h参数"
|
||||
else
|
||||
LOG_ERROR "cd-convert命令不支持-h参数"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
LOG_INFO "步骤9:环境恢复"
|
||||
if [ "$INSTALLED" = false ]; then
|
||||
LOG_INFO "卸载colord-gtk软件包"
|
||||
dnf remove -y colord-gtk
|
||||
CHECK_RESULT $? 0 0 "卸载colord-gtk软件包失败"
|
||||
else
|
||||
LOG_INFO "保持colord-gtk软件包安装状态"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成:cd-convert命令的帮助信息测试结束"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -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 : 2026-04-05
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试cd-convert命令的静默模式
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
LOG_INFO "开始测试cd-convert命令的静默模式"
|
||||
|
||||
# 检查是否已经安装了colord-gtk软件包
|
||||
LOG_INFO "检查colord-gtk软件包是否已安装"
|
||||
if rpm -q colord-gtk &> /dev/null; then
|
||||
LOG_INFO "colord-gtk已安装,将保持安装状态"
|
||||
already_installed=true
|
||||
else
|
||||
LOG_INFO "colord-gtk未安装,将在测试过程中安装"
|
||||
already_installed=false
|
||||
fi
|
||||
|
||||
# 检查yum源中是否有colord-gtk软件包
|
||||
LOG_INFO "检查yum源中是否有colord-gtk软件包"
|
||||
if dnf list available colord-gtk &> /dev/null; then
|
||||
LOG_INFO "yum源中存在colord-gtk软件包"
|
||||
else
|
||||
LOG_ERROR "yum源中不存在colord-gtk软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 如果未安装,则安装colord-gtk
|
||||
if ! $already_installed; then
|
||||
LOG_INFO "安装colord-gtk软件包"
|
||||
dnf install -y colord-gtk
|
||||
CHECK_RESULT $? 0 0 "安装colord-gtk失败"
|
||||
fi
|
||||
|
||||
# 检查cd-convert命令是否支持--quiet参数
|
||||
LOG_INFO "检查cd-convert命令是否支持--quiet参数"
|
||||
if cd-convert --help 2>&1 | grep -q -- "--quiet"; then
|
||||
LOG_INFO "cd-convert命令支持--quiet参数"
|
||||
else
|
||||
LOG_ERROR "cd-convert命令不支持--quiet参数"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 测试cd-convert命令的静默模式
|
||||
LOG_INFO "测试cd-convert命令的静默模式"
|
||||
cd-convert --quiet
|
||||
CHECK_RESULT $? 0 0 "cd-convert命令静默模式执行失败"
|
||||
|
||||
# 清理环境:如果测试前未安装,则卸载软件包
|
||||
if ! $already_installed; then
|
||||
LOG_INFO "卸载colord-gtk软件包"
|
||||
dnf remove -y colord-gtk
|
||||
CHECK_RESULT $? 0 0 "卸载colord-gtk失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成,环境已恢复"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,107 +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 : 2026-04-05
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试cd-convert命令指定输入文件的格式
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
# 检查是否已安装colord-gtk软件包
|
||||
LOG_INFO "检查是否已安装colord-gtk软件包"
|
||||
rpm -q colord-gtk > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "colord-gtk已安装,脚本结束后将保持安装状态"
|
||||
ALREADY_INSTALLED=1
|
||||
else
|
||||
LOG_INFO "colord-gtk未安装,将在测试前安装并在结束后卸载"
|
||||
ALREADY_INSTALLED=0
|
||||
fi
|
||||
|
||||
# 检查yum源中是否存在colord-gtk软件包
|
||||
LOG_INFO "检查yum源中是否存在colord-gtk软件包"
|
||||
dnf list available colord-gtk > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中未找到colord-gtk软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 如果未安装,则安装colord-gtk软件包
|
||||
if [ $ALREADY_INSTALLED -eq 0 ]; then
|
||||
LOG_INFO "安装colord-gtk软件包"
|
||||
dnf install -y colord-gtk
|
||||
CHECK_RESULT $? 0 0 "安装colord-gtk软件包失败"
|
||||
fi
|
||||
|
||||
# 检查cd-convert命令是否支持指定输入文件格式的参数
|
||||
LOG_INFO "检查cd-convert命令是否支持指定输入文件格式的参数"
|
||||
cd-convert --help 2>&1 | grep -q "\-\-input\-format"
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "cd-convert命令不支持--input-format参数"
|
||||
# 如果之前未安装,则卸载软件包
|
||||
if [ $ALREADY_INSTALLED -eq 0 ]; then
|
||||
LOG_INFO "卸载colord-gtk软件包"
|
||||
dnf remove -y colord-gtk
|
||||
fi
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 准备测试用的ICC文件
|
||||
LOG_INFO "准备测试用的ICC文件"
|
||||
TEST_ICC_FILE="/tmp/test_colord_gtk_cd_convert.icc"
|
||||
cat > $TEST_ICC_FILE << EOF
|
||||
test icc file content
|
||||
EOF
|
||||
CHECK_RESULT $? 0 0 "创建测试ICC文件失败"
|
||||
|
||||
# 测试cd-convert命令指定输入文件的格式为icc
|
||||
LOG_INFO "测试cd-convert命令指定输入文件的格式为icc"
|
||||
cd-convert --input-format=icc $TEST_ICC_FILE /tmp/test_output.icc 2>&1
|
||||
CHECK_RESULT $? 0 0 "cd-convert命令指定输入文件格式为icc执行失败"
|
||||
|
||||
# 测试cd-convert命令指定输入文件的格式为未知格式(预期失败)
|
||||
LOG_INFO "测试cd-convert命令指定输入文件的格式为未知格式(预期失败)"
|
||||
cd-convert --input-format=unknownformat $TEST_ICC_FILE /tmp/test_output2.icc 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_ERROR "cd-convert命令指定未知输入文件格式应失败但实际成功"
|
||||
# 清理临时文件
|
||||
rm -f $TEST_ICC_FILE /tmp/test_output.icc /tmp/test_output2.icc
|
||||
# 如果之前未安装,则卸载软件包
|
||||
if [ $ALREADY_INSTALLED -eq 0 ]; then
|
||||
LOG_INFO "卸载colord-gtk软件包"
|
||||
dnf remove -y colord-gtk
|
||||
fi
|
||||
exit 1
|
||||
else
|
||||
LOG_INFO "cd-convert命令指定未知输入文件格式失败(符合预期)"
|
||||
fi
|
||||
|
||||
# 清理临时文件
|
||||
LOG_INFO "清理临时文件"
|
||||
rm -f $TEST_ICC_FILE /tmp/test_output.icc /tmp/test_output2.icc
|
||||
CHECK_RESULT $? 0 0 "清理临时文件失败"
|
||||
|
||||
# 如果测试开始时未安装,则卸载colord-gtk软件包
|
||||
if [ $ALREADY_INSTALLED -eq 0 ]; then
|
||||
LOG_INFO "卸载colord-gtk软件包"
|
||||
dnf remove -y colord-gtk
|
||||
CHECK_RESULT $? 0 0 "卸载colord-gtk软件包失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,73 +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 : 2026-04-05
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试cd-convert命令使用不存在的配置文件
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
LOG_INFO "开始测试:测试cd-convert命令使用不存在的配置文件"
|
||||
|
||||
LOG_INFO "步骤1:检查软件包colord-gtk是否在yum源中"
|
||||
dnf list available colord-gtk 2>/dev/null | grep -q colord-gtk
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "软件包colord-gtk在yum源中不存在"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
LOG_INFO "步骤2:检查系统是否已经安装colord-gtk"
|
||||
rpm -q colord-gtk >/dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "colord-gtk已经安装,测试结束后保持安装状态"
|
||||
INSTALLED=true
|
||||
else
|
||||
LOG_INFO "colord-gtk未安装,将安装作为测试步骤"
|
||||
INSTALLED=false
|
||||
fi
|
||||
|
||||
if [ "$INSTALLED" = "false" ]; then
|
||||
LOG_INFO "步骤3:安装colord-gtk软件包"
|
||||
dnf install -y colord-gtk
|
||||
CHECK_RESULT $? 0 0 "安装colord-gtk失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "步骤4:检查cd-convert命令是否存在"
|
||||
which cd-convert >/dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "cd-convert命令不存在"
|
||||
|
||||
LOG_INFO "步骤5:检查cd-convert命令是否支持--config参数"
|
||||
cd-convert --help 2>&1 | grep -q "\-\-config"
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "cd-convert命令不支持--config参数"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
LOG_INFO "步骤6:使用不存在的配置文件执行cd-convert命令"
|
||||
cd-convert --config /tmp/nonexistent_config_file.conf 2>&1
|
||||
CHECK_RESULT $? 1 0 "使用不存在的配置文件执行cd-convert命令未返回预期错误码"
|
||||
|
||||
LOG_INFO "步骤7:清理环境"
|
||||
if [ "$INSTALLED" = "false" ]; then
|
||||
LOG_INFO "卸载colord-gtk软件包"
|
||||
dnf remove -y colord-gtk
|
||||
CHECK_RESULT $? 0 0 "卸载colord-gtk失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,94 +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 : 2026-04-05
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试cd-convert命令指定输出文件的格式
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
LOG_INFO "开始测试cd-convert命令指定输出文件的格式"
|
||||
|
||||
# 定义软件包名
|
||||
PACKAGE_NAME="colord-gtk"
|
||||
|
||||
# 检查yum源中是否存在该软件包
|
||||
LOG_INFO "检查yum源中是否存在${PACKAGE_NAME}软件包"
|
||||
dnf list available ${PACKAGE_NAME} &>/dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中不存在${PACKAGE_NAME}软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 检查是否已安装
|
||||
LOG_INFO "检查${PACKAGE_NAME}是否已安装"
|
||||
rpm -q ${PACKAGE_NAME} &>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "${PACKAGE_NAME}已安装,测试结束后保持安装状态"
|
||||
INSTALLED_BEFORE=true
|
||||
else
|
||||
LOG_INFO "${PACKAGE_NAME}未安装,将在测试前安装"
|
||||
INSTALLED_BEFORE=false
|
||||
fi
|
||||
|
||||
# 如果未安装,则安装软件包
|
||||
if [ "${INSTALLED_BEFORE}" = "false" ]; then
|
||||
LOG_INFO "安装${PACKAGE_NAME}软件包"
|
||||
dnf install -y ${PACKAGE_NAME}
|
||||
CHECK_RESULT $? 0 0 "安装${PACKAGE_NAME}失败"
|
||||
fi
|
||||
|
||||
# 测试cd-convert命令指定输出文件的格式
|
||||
LOG_INFO "测试cd-convert命令指定输出文件的格式"
|
||||
cd-convert --help | grep -q "\-\-output"
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "cd-convert命令不支持--output参数"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 创建测试输入文件
|
||||
LOG_INFO "创建测试输入文件"
|
||||
cat > test_input.icc << EOF
|
||||
test icc file content
|
||||
EOF
|
||||
CHECK_RESULT $? 0 0 "创建测试输入文件失败"
|
||||
|
||||
# 执行cd-convert命令指定输出文件的格式
|
||||
LOG_INFO "执行cd-convert命令指定输出文件的格式"
|
||||
cd-convert --output test_output.icc test_input.icc
|
||||
CHECK_RESULT $? 0 0 "cd-convert命令执行失败"
|
||||
|
||||
# 检查输出文件是否存在
|
||||
LOG_INFO "检查输出文件是否存在"
|
||||
[ -f test_output.icc ]
|
||||
CHECK_RESULT $? 0 0 "输出文件未生成"
|
||||
|
||||
# 清理测试文件
|
||||
LOG_INFO "清理测试文件"
|
||||
rm -f test_input.icc test_output.icc
|
||||
CHECK_RESULT $? 0 0 "清理测试文件失败"
|
||||
|
||||
# 如果测试前未安装,则卸载软件包
|
||||
if [ "${INSTALLED_BEFORE}" = "false" ]; then
|
||||
LOG_INFO "卸载${PACKAGE_NAME}软件包"
|
||||
dnf remove -y ${PACKAGE_NAME}
|
||||
CHECK_RESULT $? 0 0 "卸载${PACKAGE_NAME}失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试cd-convert命令指定输出文件的格式完成"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,101 +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 : 2026-04-05
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试cd-convert命令使用相对色温值进行转换
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
# 设置环境变量
|
||||
SCRIPT_DIR=$(cd $(dirname $0); pwd)
|
||||
LOG_INFO "当前脚本目录:$SCRIPT_DIR"
|
||||
|
||||
# 检查是否已安装colord-gtk
|
||||
LOG_INFO "检查colord-gtk是否已安装"
|
||||
rpm -q colord-gtk > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "colord-gtk已安装,记录安装状态"
|
||||
PRE_INSTALLED=true
|
||||
else
|
||||
LOG_INFO "colord-gtk未安装"
|
||||
PRE_INSTALLED=false
|
||||
fi
|
||||
|
||||
# 检查yum源中是否有colord-gtk软件包
|
||||
LOG_INFO "检查yum源中是否有colord-gtk软件包"
|
||||
dnf list available colord-gtk > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中未找到colord-gtk软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 如果未安装则安装软件包
|
||||
if [ "$PRE_INSTALLED" = "false" ]; then
|
||||
LOG_INFO "开始安装colord-gtk"
|
||||
dnf install -y colord-gtk
|
||||
CHECK_RESULT $? 0 0 "安装colord-gtk失败"
|
||||
fi
|
||||
|
||||
# 检查cd-convert命令是否存在
|
||||
LOG_INFO "检查cd-convert命令是否存在"
|
||||
command -v cd-convert > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "cd-convert命令不存在"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 检查cd-convert是否支持--temperature参数
|
||||
LOG_INFO "检查cd-convert是否支持--temperature参数"
|
||||
cd-convert --help 2>&1 | grep -q "\-\-temperature"
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "cd-convert不支持--temperature参数"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 测试cd-convert命令使用相对色温值进行转换
|
||||
LOG_INFO "测试cd-convert命令使用相对色温值进行转换"
|
||||
cd-convert --temperature 6500 test_input.icc test_output.icc > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "cd-convert使用相对色温值转换失败"
|
||||
|
||||
# 检查输出文件是否生成
|
||||
LOG_INFO "检查输出文件是否生成"
|
||||
if [ -f "test_output.icc" ]; then
|
||||
LOG_INFO "输出文件test_output.icc已生成"
|
||||
rm -f test_output.icc
|
||||
CHECK_RESULT $? 0 0 "删除测试输出文件失败"
|
||||
else
|
||||
LOG_ERROR "输出文件test_output.icc未生成"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 清理临时文件
|
||||
LOG_INFO "清理临时文件"
|
||||
rm -f test_input.icc test_output.icc
|
||||
|
||||
# 环境恢复:如果之前未安装,则卸载软件包
|
||||
if [ "$PRE_INSTALLED" = "false" ]; then
|
||||
LOG_INFO "卸载colord-gtk软件包"
|
||||
dnf remove -y colord-gtk
|
||||
CHECK_RESULT $? 0 0 "卸载colord-gtk失败"
|
||||
else
|
||||
LOG_INFO "保持colord-gtk安装状态"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,73 +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 : 2026-04-05
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试cd-convert命令使用绝对色温值进行转换
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
LOG_INFO "1. 检查yum源中是否存在colord-gtk软件包"
|
||||
dnf list available colord-gtk 2>/dev/null | grep -q colord-gtk
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中未找到colord-gtk软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
LOG_INFO "2. 检查系统是否已安装colord-gtk"
|
||||
rpm -q colord-gtk > /dev/null 2>&1
|
||||
installed=$?
|
||||
|
||||
if [ $installed -ne 0 ]; then
|
||||
LOG_INFO "3. 系统未安装colord-gtk,开始安装"
|
||||
dnf install -y colord-gtk
|
||||
CHECK_RESULT $? 0 0 "安装colord-gtk失败"
|
||||
else
|
||||
LOG_INFO "3. 系统已安装colord-gtk,跳过安装步骤"
|
||||
fi
|
||||
|
||||
LOG_INFO "4. 检查cd-convert命令是否支持--temperature参数"
|
||||
cd-convert --help 2>&1 | grep -q -- --temperature
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "cd-convert命令不支持--temperature参数"
|
||||
if [ $installed -ne 0 ]; then
|
||||
LOG_INFO "清理环境:卸载colord-gtk"
|
||||
dnf remove -y colord-gtk
|
||||
fi
|
||||
exit 255
|
||||
fi
|
||||
|
||||
LOG_INFO "5. 测试cd-convert命令使用绝对色温值进行转换"
|
||||
cd-convert --temperature 6500 /usr/share/color/icc/colord/sRGB.icc /tmp/test_output.icc
|
||||
CHECK_RESULT $? 0 0 "使用绝对色温值转换失败"
|
||||
|
||||
LOG_INFO "6. 验证生成的ICC文件"
|
||||
file /tmp/test_output.icc | grep -q "ICC Profile"
|
||||
CHECK_RESULT $? 0 0 "生成的ICC文件格式不正确"
|
||||
|
||||
LOG_INFO "7. 清理临时文件"
|
||||
rm -f /tmp/test_output.icc
|
||||
|
||||
if [ $installed -ne 0 ]; then
|
||||
LOG_INFO "8. 恢复环境:卸载colord-gtk"
|
||||
dnf remove -y colord-gtk
|
||||
CHECK_RESULT $? 0 0 "卸载colord-gtk失败"
|
||||
else
|
||||
LOG_INFO "8. 保持colord-gtk安装状态"
|
||||
fi
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,80 +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 : 2026-04-05
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试cd-convert命令的版本信息
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
# 定义日志函数
|
||||
LOG_INFO() {
|
||||
echo "[INFO] $1"
|
||||
}
|
||||
|
||||
LOG_ERROR() {
|
||||
echo "[ERROR] $1"
|
||||
}
|
||||
|
||||
# 定义软件包名称
|
||||
PACKAGE_NAME="colord-gtk"
|
||||
|
||||
# 检查软件包是否在yum源中
|
||||
LOG_INFO "检查yum源中是否存在软件包 $PACKAGE_NAME"
|
||||
if ! dnf list available "$PACKAGE_NAME" &>/dev/null; then
|
||||
LOG_ERROR "yum源中未找到软件包 $PACKAGE_NAME"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 检查是否已安装软件包
|
||||
LOG_INFO "检查系统是否已安装软件包 $PACKAGE_NAME"
|
||||
if rpm -q "$PACKAGE_NAME" &>/dev/null; then
|
||||
LOG_INFO "软件包 $PACKAGE_NAME 已安装,脚本结束后将保持安装状态"
|
||||
INSTALLED_BEFORE=true
|
||||
else
|
||||
LOG_INFO "软件包 $PACKAGE_NAME 未安装,将在测试过程中安装"
|
||||
INSTALLED_BEFORE=false
|
||||
fi
|
||||
|
||||
# 如果未安装,则安装软件包
|
||||
if [ "$INSTALLED_BEFORE" = false ]; then
|
||||
LOG_INFO "安装软件包 $PACKAGE_NAME"
|
||||
dnf install -y "$PACKAGE_NAME"
|
||||
CHECK_RESULT $? 0 0 "安装软件包 $PACKAGE_NAME 失败"
|
||||
fi
|
||||
|
||||
# 测试 cd-convert 命令的版本信息
|
||||
LOG_INFO "测试 cd-convert 命令的版本信息"
|
||||
if ! command -v cd-convert &>/dev/null; then
|
||||
LOG_ERROR "cd-convert 命令不存在或不支持"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 执行 cd-convert --version 命令
|
||||
cd-convert --version
|
||||
CHECK_RESULT $? 0 0 "执行 cd-convert --version 命令失败"
|
||||
|
||||
# 环境恢复:如果之前未安装,则卸载软件包
|
||||
if [ "$INSTALLED_BEFORE" = false ]; then
|
||||
LOG_INFO "卸载软件包 $PACKAGE_NAME"
|
||||
dnf remove -y "$PACKAGE_NAME"
|
||||
CHECK_RESULT $? 0 0 "卸载软件包 $PACKAGE_NAME 失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试脚本执行完成"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,84 +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 : 2026-04-05
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试cd-convert命令的详细输出模式
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
LOG_INFO "开始测试:测试cd-convert命令的详细输出模式"
|
||||
|
||||
# 定义软件包名称
|
||||
PACKAGE_NAME="colord-gtk"
|
||||
|
||||
# 步骤1:检查yum源中是否有指定软件包
|
||||
LOG_INFO "步骤1:检查yum源中是否有${PACKAGE_NAME}软件包"
|
||||
if ! dnf list available "${PACKAGE_NAME}" &>/dev/null; then
|
||||
LOG_ERROR "yum源中未找到${PACKAGE_NAME}软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 步骤2:检查环境是否已安装软件包
|
||||
LOG_INFO "步骤2:检查环境是否已安装${PACKAGE_NAME}"
|
||||
if rpm -q "${PACKAGE_NAME}" &>/dev/null; then
|
||||
LOG_INFO "环境已安装${PACKAGE_NAME},测试结束后将保持安装状态"
|
||||
INSTALLED_BEFORE_TEST=true
|
||||
else
|
||||
LOG_INFO "环境未安装${PACKAGE_NAME},将在测试过程中安装"
|
||||
INSTALLED_BEFORE_TEST=false
|
||||
fi
|
||||
|
||||
# 步骤3:如果未安装,则安装软件包
|
||||
if [ "${INSTALLED_BEFORE_TEST}" = "false" ]; then
|
||||
LOG_INFO "步骤3:安装${PACKAGE_NAME}软件包"
|
||||
dnf install -y "${PACKAGE_NAME}"
|
||||
CHECK_RESULT $? 0 0 "安装${PACKAGE_NAME}软件包失败"
|
||||
fi
|
||||
|
||||
# 步骤4:检查cd-convert命令是否存在
|
||||
LOG_INFO "步骤4:检查cd-convert命令是否存在"
|
||||
if ! command -v cd-convert &>/dev/null; then
|
||||
LOG_ERROR "cd-convert命令不存在"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 步骤5:检查cd-convert命令是否支持--verbose参数
|
||||
LOG_INFO "步骤5:检查cd-convert命令是否支持--verbose参数"
|
||||
if ! cd-convert --help 2>&1 | grep -q -- "--verbose"; then
|
||||
LOG_ERROR "cd-convert命令不支持--verbose参数"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 步骤6:执行cd-convert命令的详细输出模式测试
|
||||
LOG_INFO "步骤6:执行cd-convert命令的详细输出模式测试"
|
||||
cd-convert --verbose
|
||||
CHECK_RESULT $? 0 0 "cd-convert命令详细输出模式执行失败"
|
||||
|
||||
# 步骤7:清理环境,恢复到之前的状态
|
||||
LOG_INFO "步骤7:清理环境,恢复到之前的状态"
|
||||
if [ "${INSTALLED_BEFORE_TEST}" = "false" ]; then
|
||||
LOG_INFO "卸载${PACKAGE_NAME}软件包"
|
||||
dnf remove -y "${PACKAGE_NAME}"
|
||||
CHECK_RESULT $? 0 0 "卸载${PACKAGE_NAME}软件包失败"
|
||||
else
|
||||
LOG_INFO "测试前已安装${PACKAGE_NAME},保持安装状态"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成:cd-convert命令的详细输出模式测试通过"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,102 +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 : 2026-04-05
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试使用colord-gtk工具创建基本的颜色配置文件
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
LOG_INFO "开始测试colord-gtk创建基本颜色配置文件功能"
|
||||
|
||||
# 检查环境是否已安装colord-gtk
|
||||
LOG_INFO "检查colord-gtk是否已安装"
|
||||
if rpm -q colord-gtk > /dev/null 2>&1; then
|
||||
LOG_INFO "colord-gtk已安装,测试后保持安装状态"
|
||||
installed_before=true
|
||||
else
|
||||
LOG_INFO "colord-gtk未安装,将在测试过程中安装"
|
||||
installed_before=false
|
||||
fi
|
||||
|
||||
# 检查yum源中是否有colord-gtk软件包
|
||||
LOG_INFO "检查yum源中是否存在colord-gtk软件包"
|
||||
if ! dnf list available colord-gtk > /dev/null 2>&1; then
|
||||
LOG_ERROR "yum源中未找到colord-gtk软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 如果未安装,则安装colord-gtk
|
||||
if [ "$installed_before" = false ]; then
|
||||
LOG_INFO "安装colord-gtk软件包"
|
||||
dnf install -y colord-gtk
|
||||
CHECK_RESULT $? 0 0 "安装colord-gtk失败"
|
||||
fi
|
||||
|
||||
# 检查colord-gtk-cd-create-profile命令是否存在
|
||||
LOG_INFO "检查colord-gtk-cd-create-profile命令"
|
||||
if ! command -v colord-gtk-cd-create-profile > /dev/null 2>&1; then
|
||||
LOG_ERROR "colord-gtk-cd-create-profile命令不存在"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 检查colord-gtk-cd-create-profile命令是否支持基本参数
|
||||
LOG_INFO "检查colord-gtk-cd-create-profile命令参数支持"
|
||||
if ! colord-gtk-cd-create-profile --help > /dev/null 2>&1; then
|
||||
LOG_ERROR "colord-gtk-cd-create-profile命令不支持--help参数"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 创建临时目录用于测试
|
||||
LOG_INFO "创建临时测试目录"
|
||||
temp_dir=$(mktemp -d)
|
||||
CHECK_RESULT $? 0 0 "创建临时目录失败"
|
||||
|
||||
# 测试创建基本的颜色配置文件
|
||||
LOG_INFO "测试创建基本颜色配置文件"
|
||||
colord-gtk-cd-create-profile --output "$temp_dir/test_profile.icc"
|
||||
CHECK_RESULT $? 0 0 "创建颜色配置文件失败"
|
||||
|
||||
# 验证配置文件是否创建成功
|
||||
LOG_INFO "验证配置文件是否生成"
|
||||
if [ -f "$temp_dir/test_profile.icc" ]; then
|
||||
LOG_INFO "颜色配置文件创建成功"
|
||||
file_info=$(file "$temp_dir/test_profile.icc")
|
||||
LOG_INFO "文件信息: $file_info"
|
||||
else
|
||||
LOG_ERROR "颜色配置文件未生成"
|
||||
CHECK_RESULT 1 0 0 "配置文件未生成"
|
||||
fi
|
||||
|
||||
# 清理临时文件
|
||||
LOG_INFO "清理临时测试文件"
|
||||
rm -rf "$temp_dir"
|
||||
CHECK_RESULT $? 0 0 "清理临时文件失败"
|
||||
|
||||
# 如果测试前未安装,则卸载colord-gtk
|
||||
if [ "$installed_before" = false ]; then
|
||||
LOG_INFO "卸载测试安装的colord-gtk软件包"
|
||||
dnf remove -y colord-gtk
|
||||
CHECK_RESULT $? 0 0 "卸载colord-gtk失败"
|
||||
LOG_INFO "环境已恢复到测试前状态"
|
||||
else
|
||||
LOG_INFO "保持colord-gtk安装状态"
|
||||
fi
|
||||
|
||||
LOG_INFO "colord-gtk创建基本颜色配置文件测试完成"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,107 +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 : 2026-04-05
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试使用colord-gtk工具导出颜色配置文件
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
# 设置环境变量
|
||||
SCRIPT_NAME="test_colord-gtk_cd_profile_export"
|
||||
LOG_FILE="/tmp/${SCRIPT_NAME}.log"
|
||||
|
||||
# 定义软件包名称
|
||||
PACKAGE_NAME="colord-gtk"
|
||||
|
||||
# 定义颜色配置文件路径
|
||||
PROFILE_FILE="/tmp/test_profile.icc"
|
||||
|
||||
# 清理函数
|
||||
cleanup() {
|
||||
LOG_INFO "开始清理测试环境"
|
||||
if [ "${INSTALLED_BEFORE}" -eq 0 ]; then
|
||||
LOG_INFO "测试前未安装${PACKAGE_NAME},卸载软件包"
|
||||
dnf remove -y ${PACKAGE_NAME} > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "卸载${PACKAGE_NAME}失败"
|
||||
else
|
||||
LOG_INFO "测试前已安装${PACKAGE_NAME},保持安装状态"
|
||||
fi
|
||||
# 删除临时文件
|
||||
rm -f ${PROFILE_FILE}
|
||||
LOG_INFO "清理完成"
|
||||
}
|
||||
|
||||
# 错误处理
|
||||
trap cleanup EXIT
|
||||
|
||||
# 检查软件包是否在yum源中
|
||||
LOG_INFO "检查yum源中是否存在${PACKAGE_NAME}软件包"
|
||||
dnf list available ${PACKAGE_NAME} > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中不存在${PACKAGE_NAME}软件包"
|
||||
exit 255
|
||||
fi
|
||||
LOG_INFO "yum源中存在${PACKAGE_NAME}软件包"
|
||||
|
||||
# 检查软件包是否已安装
|
||||
LOG_INFO "检查系统是否已安装${PACKAGE_NAME}"
|
||||
rpm -q ${PACKAGE_NAME} > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "${PACKAGE_NAME}已安装"
|
||||
INSTALLED_BEFORE=1
|
||||
else
|
||||
LOG_INFO "${PACKAGE_NAME}未安装"
|
||||
INSTALLED_BEFORE=0
|
||||
fi
|
||||
|
||||
# 如果未安装,则安装软件包
|
||||
if [ ${INSTALLED_BEFORE} -eq 0 ]; then
|
||||
LOG_INFO "安装${PACKAGE_NAME}软件包"
|
||||
dnf install -y ${PACKAGE_NAME} > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "安装${PACKAGE_NAME}失败"
|
||||
LOG_INFO "安装${PACKAGE_NAME}成功"
|
||||
fi
|
||||
|
||||
# 检查colord-gtk-cd-profile-export命令是否存在
|
||||
LOG_INFO "检查colord-gtk-cd-profile-export命令是否存在"
|
||||
which colord-gtk-cd-profile-export > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "colord-gtk-cd-profile-export命令不存在"
|
||||
|
||||
# 检查colord-gtk-cd-profile-export命令参数
|
||||
LOG_INFO "检查colord-gtk-cd-profile-export命令参数"
|
||||
colord-gtk-cd-profile-export --help > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "colord-gtk-cd-profile-export命令参数不支持"
|
||||
|
||||
# 测试导出颜色配置文件
|
||||
LOG_INFO "测试导出颜色配置文件"
|
||||
colord-gtk-cd-profile-export --output ${PROFILE_FILE} > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "导出颜色配置文件失败"
|
||||
|
||||
# 检查导出的文件是否存在
|
||||
LOG_INFO "检查导出的颜色配置文件是否存在"
|
||||
[ -f ${PROFILE_FILE} ]
|
||||
CHECK_RESULT $? 0 0 "导出的颜色配置文件不存在"
|
||||
|
||||
# 检查导出的文件是否有效
|
||||
LOG_INFO "检查导出的颜色配置文件是否有效"
|
||||
file ${PROFILE_FILE} | grep -q "ICC profile"
|
||||
CHECK_RESULT $? 0 0 "导出的颜色配置文件无效"
|
||||
|
||||
LOG_INFO "颜色配置文件导出测试完成"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,122 +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 : 2026-04-05
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试使用colord-gtk工具导入颜色配置文件
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
# 定义日志函数
|
||||
LOG_INFO() {
|
||||
echo "[INFO] $*"
|
||||
}
|
||||
|
||||
LOG_ERROR() {
|
||||
echo "[ERROR] $*"
|
||||
}
|
||||
|
||||
# 定义检查结果函数
|
||||
CHECK_RESULT() {
|
||||
local actual=$1
|
||||
local expected=$2
|
||||
local error_code=$3
|
||||
local error_msg=$4
|
||||
if [ "$actual" -ne "$expected" ]; then
|
||||
LOG_ERROR "$error_msg"
|
||||
exit $error_code
|
||||
fi
|
||||
}
|
||||
|
||||
# 定义SSH命令函数
|
||||
SSH_CMD() {
|
||||
local cmd=$1
|
||||
local node_ip=$2
|
||||
local node_password=$3
|
||||
local node_user=$4
|
||||
sshpass -p "$node_password" ssh -o StrictHostKeyChecking=no "$node_user@$node_ip" "$cmd"
|
||||
}
|
||||
|
||||
# 定义软件包名称
|
||||
PACKAGE_NAME="colord-gtk"
|
||||
|
||||
# 步骤1: 检查yum源中是否存在colord-gtk软件包
|
||||
LOG_INFO "步骤1: 检查yum源中是否存在$PACKAGE_NAME软件包"
|
||||
dnf list available "$PACKAGE_NAME" > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中不存在$PACKAGE_NAME软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 步骤2: 检查是否已经安装了colord-gtk
|
||||
LOG_INFO "步骤2: 检查是否已经安装了$PACKAGE_NAME"
|
||||
rpm -q "$PACKAGE_NAME" > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "$PACKAGE_NAME已经安装,脚本结束时将保持安装状态"
|
||||
INSTALLED=true
|
||||
else
|
||||
LOG_INFO "$PACKAGE_NAME未安装,将在测试步骤中安装"
|
||||
INSTALLED=false
|
||||
fi
|
||||
|
||||
# 步骤3: 安装colord-gtk(如果未安装)
|
||||
if [ "$INSTALLED" = false ]; then
|
||||
LOG_INFO "步骤3: 安装$PACKAGE_NAME软件包"
|
||||
dnf install -y "$PACKAGE_NAME"
|
||||
CHECK_RESULT $? 0 0 "安装$PACKAGE_NAME失败"
|
||||
fi
|
||||
|
||||
# 步骤4: 检查colord-gtk命令是否支持导入颜色配置文件参数
|
||||
LOG_INFO "步骤4: 检查colord-gtk命令是否支持导入颜色配置文件参数"
|
||||
colord-gtk --help 2>&1 | grep -q "import"
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "colord-gtk命令不支持导入颜色配置文件参数"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 步骤5: 创建一个临时的颜色配置文件用于测试
|
||||
LOG_INFO "步骤5: 创建一个临时的颜色配置文件用于测试"
|
||||
cat > /tmp/test_color_profile.icc << EOF
|
||||
这是一个临时的颜色配置文件,用于测试colord-gtk导入功能。
|
||||
EOF
|
||||
CHECK_RESULT $? 0 0 "创建临时颜色配置文件失败"
|
||||
|
||||
# 步骤6: 使用colord-gtk导入颜色配置文件
|
||||
LOG_INFO "步骤6: 使用colord-gtk导入颜色配置文件"
|
||||
colord-gtk import /tmp/test_color_profile.icc
|
||||
CHECK_RESULT $? 0 0 "导入颜色配置文件失败"
|
||||
|
||||
# 步骤7: 验证颜色配置文件是否成功导入
|
||||
LOG_INFO "步骤7: 验证颜色配置文件是否成功导入"
|
||||
colord-gtk list | grep -q "test_color_profile"
|
||||
CHECK_RESULT $? 0 0 "颜色配置文件未成功导入"
|
||||
|
||||
# 步骤8: 清理临时文件
|
||||
LOG_INFO "步骤8: 清理临时文件"
|
||||
rm -f /tmp/test_color_profile.icc
|
||||
CHECK_RESULT $? 0 0 "清理临时文件失败"
|
||||
|
||||
# 步骤9: 卸载colord-gtk(如果测试前未安装)
|
||||
if [ "$INSTALLED" = false ]; then
|
||||
LOG_INFO "步骤9: 卸载$PACKAGE_NAME软件包"
|
||||
dnf remove -y "$PACKAGE_NAME"
|
||||
CHECK_RESULT $? 0 0 "卸载$PACKAGE_NAME失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成,所有步骤执行成功"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -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 : 2026-04-05
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 检查colord-gtk软件包是否已正确安装到系统中
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
LOG_INFO "开始检查colord-gtk软件包是否已正确安装到系统中"
|
||||
|
||||
# 检查是否已安装colord-gtk
|
||||
LOG_INFO "检查colord-gtk是否已安装"
|
||||
rpm -q colord-gtk > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "colord-gtk已安装,记录安装状态以便后续恢复"
|
||||
INSTALLED=1
|
||||
else
|
||||
LOG_INFO "colord-gtk未安装"
|
||||
INSTALLED=0
|
||||
fi
|
||||
|
||||
# 检查yum源中是否有colord-gtk软件包
|
||||
LOG_INFO "检查yum源中是否存在colord-gtk软件包"
|
||||
dnf list available colord-gtk > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中未找到colord-gtk软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 如果未安装,则安装colord-gtk
|
||||
if [ $INSTALLED -eq 0 ]; then
|
||||
LOG_INFO "开始安装colord-gtk软件包"
|
||||
dnf install -y colord-gtk > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "安装colord-gtk失败"
|
||||
LOG_INFO "colord-gtk安装成功"
|
||||
fi
|
||||
|
||||
# 验证colord-gtk是否正确安装
|
||||
LOG_INFO "验证colord-gtk是否正确安装"
|
||||
rpm -q colord-gtk > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "colord-gtk未正确安装"
|
||||
|
||||
# 检查colord-gtk相关命令是否可用
|
||||
LOG_INFO "检查colord-gtk相关命令是否可用"
|
||||
which colormgr > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "colormgr命令不可用"
|
||||
|
||||
# 如果测试前未安装,则卸载colord-gtk以恢复环境
|
||||
if [ $INSTALLED -eq 0 ]; then
|
||||
LOG_INFO "恢复环境:卸载colord-gtk软件包"
|
||||
dnf remove -y colord-gtk > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "卸载colord-gtk失败"
|
||||
LOG_INFO "环境恢复完成"
|
||||
else
|
||||
LOG_INFO "环境已保持原有安装状态"
|
||||
fi
|
||||
|
||||
LOG_INFO "colord-gtk软件包安装检查完成"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,86 +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 : 2026-04-05
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试colord-gtk提供的图形化管理工具(如gnome-color-manager)能否正常启动
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
LOG_INFO "开始测试colord-gtk图形化管理工具启动"
|
||||
LOG_INFO "步骤1:检查colord-gtk软件包是否在yum源中"
|
||||
if ! dnf list available colord-gtk 2>/dev/null | grep -q colord-gtk; then
|
||||
LOG_ERROR "yum源中未找到colord-gtk软件包"
|
||||
exit 255
|
||||
fi
|
||||
LOG_INFO "colord-gtk软件包在yum源中存在"
|
||||
|
||||
LOG_INFO "步骤2:检查gnome-color-manager软件包是否在yum源中"
|
||||
if ! dnf list available gnome-color-manager 2>/dev/null | grep -q gnome-color-manager; then
|
||||
LOG_ERROR "yum源中未找到gnome-color-manager软件包"
|
||||
exit 255
|
||||
fi
|
||||
LOG_INFO "gnome-color-manager软件包在yum源中存在"
|
||||
|
||||
LOG_INFO "步骤3:检查系统是否已安装colord-gtk和gnome-color-manager"
|
||||
if rpm -q colord-gtk >/dev/null 2>&1 && rpm -q gnome-color-manager >/dev/null 2>&1; then
|
||||
LOG_INFO "colord-gtk和gnome-color-manager已安装,测试结束后将保持安装状态"
|
||||
ALREADY_INSTALLED=true
|
||||
else
|
||||
LOG_INFO "colord-gtk和gnome-color-manager未安装,将进行安装"
|
||||
ALREADY_INSTALLED=false
|
||||
fi
|
||||
|
||||
if [ "$ALREADY_INSTALLED" = false ]; then
|
||||
LOG_INFO "步骤4:安装colord-gtk和gnome-color-manager软件包"
|
||||
dnf install -y colord-gtk gnome-color-manager
|
||||
CHECK_RESULT $? 0 0 "安装colord-gtk和gnome-color-manager失败"
|
||||
LOG_INFO "colord-gtk和gnome-color-manager安装成功"
|
||||
fi
|
||||
|
||||
LOG_INFO "步骤5:检查gnome-color-manager命令是否存在"
|
||||
if ! command -v gnome-color-manager >/dev/null 2>&1; then
|
||||
LOG_ERROR "gnome-color-manager命令不存在"
|
||||
exit 255
|
||||
fi
|
||||
LOG_INFO "gnome-color-manager命令存在"
|
||||
|
||||
LOG_INFO "步骤6:检查gnome-color-manager是否支持--help参数"
|
||||
if ! gnome-color-manager --help >/dev/null 2>&1; then
|
||||
LOG_ERROR "gnome-color-manager不支持--help参数"
|
||||
exit 255
|
||||
fi
|
||||
LOG_INFO "gnome-color-manager支持--help参数"
|
||||
|
||||
LOG_INFO "步骤7:测试启动gnome-color-manager图形化管理工具(使用--help参数模拟启动检查)"
|
||||
gnome-color-manager --help
|
||||
CHECK_RESULT $? 0 0 "gnome-color-manager启动失败"
|
||||
|
||||
LOG_INFO "gnome-color-manager图形化管理工具启动测试成功"
|
||||
|
||||
if [ "$ALREADY_INSTALLED" = false ]; then
|
||||
LOG_INFO "步骤8:清理环境,卸载测试安装的软件包"
|
||||
dnf remove -y colord-gtk gnome-color-manager
|
||||
CHECK_RESULT $? 0 0 "卸载colord-gtk和gnome-color-manager失败"
|
||||
LOG_INFO "环境清理完成,已恢复到测试前状态"
|
||||
else
|
||||
LOG_INFO "步骤8:环境保持原状,不卸载已安装的软件包"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,65 +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 : 2026-04-05
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试colord-gtk软件包的安装功能,验证软件包是否可以正常安装
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
# 检查是否已安装colord-gtk
|
||||
LOG_INFO "检查colord-gtk软件包是否已安装"
|
||||
rpm -q colord-gtk > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "colord-gtk软件包已安装,测试结束后将保持安装状态"
|
||||
INSTALLED="true"
|
||||
else
|
||||
LOG_INFO "colord-gtk软件包未安装,将在测试过程中安装并最终卸载"
|
||||
INSTALLED="false"
|
||||
fi
|
||||
|
||||
# 检查yum源中是否存在colord-gtk软件包
|
||||
LOG_INFO "检查yum源中是否存在colord-gtk软件包"
|
||||
dnf list available colord-gtk > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 255 "yum源中未找到colord-gtk软件包"
|
||||
|
||||
# 安装colord-gtk软件包
|
||||
if [ "$INSTALLED" = "false" ]; then
|
||||
LOG_INFO "开始安装colord-gtk软件包"
|
||||
dnf install -y colord-gtk
|
||||
CHECK_RESULT $? 0 0 "colord-gtk软件包安装失败"
|
||||
LOG_INFO "colord-gtk软件包安装成功"
|
||||
fi
|
||||
|
||||
# 验证colord-gtk软件包安装是否成功
|
||||
LOG_INFO "验证colord-gtk软件包安装是否成功"
|
||||
rpm -q colord-gtk > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "colord-gtk软件包未正确安装"
|
||||
|
||||
# 清理环境:如果测试前未安装,则卸载软件包
|
||||
if [ "$INSTALLED" = "false" ]; then
|
||||
LOG_INFO "清理环境:卸载colord-gtk软件包"
|
||||
dnf remove -y colord-gtk
|
||||
CHECK_RESULT $? 0 0 "colord-gtk软件包卸载失败"
|
||||
LOG_INFO "colord-gtk软件包卸载成功"
|
||||
else
|
||||
LOG_INFO "测试前colord-gtk已安装,保持安装状态,无需卸载"
|
||||
fi
|
||||
|
||||
LOG_INFO "colord-gtk软件包安装功能测试完成"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,107 +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 : 2026-04-05
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试与colord-gtk相关的服务(如colord)的运行状态
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
# 测试环境初始化检查
|
||||
LOG_INFO "开始测试colord-gtk相关服务状态"
|
||||
LOG_INFO "检查colord-gtk软件包是否已安装"
|
||||
|
||||
# 检查软件包是否已安装
|
||||
if rpm -q colord-gtk >/dev/null 2>&1; then
|
||||
LOG_INFO "colord-gtk软件包已安装,标记为需要保持安装状态"
|
||||
KEEP_INSTALLED=true
|
||||
else
|
||||
LOG_INFO "colord-gtk软件包未安装,标记为需要测试后卸载"
|
||||
KEEP_INSTALLED=false
|
||||
fi
|
||||
|
||||
# 检查yum源中是否有colord-gtk软件包
|
||||
LOG_INFO "检查yum源中是否存在colord-gtk软件包"
|
||||
dnf list available colord-gtk >/dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中未找到colord-gtk软件包"
|
||||
exit 255
|
||||
fi
|
||||
LOG_INFO "yum源中存在colord-gtk软件包"
|
||||
|
||||
# 如果未安装,则安装软件包
|
||||
if [ "$KEEP_INSTALLED" = "false" ]; then
|
||||
LOG_INFO "开始安装colord-gtk软件包"
|
||||
dnf install -y colord-gtk
|
||||
CHECK_RESULT $? 0 0 "安装colord-gtk软件包失败"
|
||||
LOG_INFO "colord-gtk软件包安装成功"
|
||||
fi
|
||||
|
||||
# 测试步骤1:检查colord服务是否存在
|
||||
LOG_INFO "检查colord服务是否存在"
|
||||
systemctl list-unit-files | grep -q colord.service
|
||||
CHECK_RESULT $? 0 0 "colord服务不存在"
|
||||
|
||||
# 测试步骤2:检查colord服务状态
|
||||
LOG_INFO "检查colord服务状态"
|
||||
systemctl status colord --no-pager >/dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "colord服务正在运行"
|
||||
# 测试步骤3:重启colord服务
|
||||
LOG_INFO "重启colord服务"
|
||||
systemctl restart colord
|
||||
CHECK_RESULT $? 0 0 "重启colord服务失败"
|
||||
|
||||
# 测试步骤4:检查重启后服务状态
|
||||
LOG_INFO "检查重启后colord服务状态"
|
||||
systemctl status colord --no-pager >/dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "colord服务重启后未正常运行"
|
||||
else
|
||||
LOG_INFO "colord服务未运行,尝试启动服务"
|
||||
# 测试步骤5:启动colord服务
|
||||
systemctl start colord
|
||||
CHECK_RESULT $? 0 0 "启动colord服务失败"
|
||||
|
||||
# 测试步骤6:检查启动后服务状态
|
||||
LOG_INFO "检查启动后colord服务状态"
|
||||
systemctl status colord --no-pager >/dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "colord服务启动后未正常运行"
|
||||
fi
|
||||
|
||||
# 测试步骤7:检查colord服务是否开机自启
|
||||
LOG_INFO "检查colord服务是否开机自启"
|
||||
systemctl is-enabled colord >/dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "colord服务已设置为开机自启"
|
||||
else
|
||||
LOG_INFO "colord服务未设置为开机自启"
|
||||
fi
|
||||
|
||||
# 环境清理
|
||||
LOG_INFO "开始清理测试环境"
|
||||
if [ "$KEEP_INSTALLED" = "false" ]; then
|
||||
LOG_INFO "卸载colord-gtk软件包"
|
||||
dnf remove -y colord-gtk
|
||||
CHECK_RESULT $? 0 0 "卸载colord-gtk软件包失败"
|
||||
LOG_INFO "colord-gtk软件包卸载成功"
|
||||
else
|
||||
LOG_INFO "保持colord-gtk软件包安装状态"
|
||||
fi
|
||||
|
||||
LOG_INFO "colord-gtk相关服务状态测试完成"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,110 +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 : 2026-04-04
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试criu的检查点功能(结合dump与restore)。
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
set -e
|
||||
|
||||
LOG_INFO "开始测试criu的检查点功能(结合dump与restore)"
|
||||
|
||||
LOG_INFO "步骤1:检查criu软件包是否在yum源中"
|
||||
if ! dnf list available criu 2>&1 | grep -q "criu"; then
|
||||
LOG_ERROR "yum源中未找到criu软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
LOG_INFO "步骤2:检查当前环境是否已安装criu"
|
||||
if command -v criu &> /dev/null; then
|
||||
LOG_INFO "criu已安装,标记为环境已存在安装"
|
||||
ENV_INSTALLED="true"
|
||||
else
|
||||
LOG_INFO "criu未安装,标记为需要安装"
|
||||
ENV_INSTALLED="false"
|
||||
fi
|
||||
|
||||
if [ "$ENV_INSTALLED" = "false" ]; then
|
||||
LOG_INFO "步骤3:安装criu软件包"
|
||||
dnf install -y criu
|
||||
CHECK_RESULT $? 0 0 "安装criu失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "步骤4:检查criu命令是否支持dump和restore参数"
|
||||
criu check --feature dump
|
||||
CHECK_RESULT $? 0 0 "criu不支持dump功能"
|
||||
criu check --feature restore
|
||||
CHECK_RESULT $? 0 0 "criu不支持restore功能"
|
||||
|
||||
LOG_INFO "步骤5:创建一个简单的测试进程用于检查点操作"
|
||||
TEST_PROG="/tmp/test_criu_prog"
|
||||
cat > $TEST_PROG << "EOF"
|
||||
|
||||
while true; do
|
||||
echo "Test process is running..."
|
||||
sleep 5
|
||||
done
|
||||
EOF
|
||||
chmod +x $TEST_PROG
|
||||
bash $TEST_PROG &
|
||||
TEST_PID=$!
|
||||
sleep 2
|
||||
LOG_INFO "测试进程PID: $TEST_PID"
|
||||
|
||||
LOG_INFO "步骤6:使用criu dump创建检查点"
|
||||
mkdir -p /tmp/criu_dump
|
||||
criu dump -t $TEST_PID -D /tmp/criu_dump --shell-job
|
||||
CHECK_RESULT $? 0 0 "criu dump失败"
|
||||
|
||||
LOG_INFO "步骤7:停止原始测试进程"
|
||||
kill -9 $TEST_PID 2>/dev/null || true
|
||||
wait $TEST_PID 2>/dev/null
|
||||
|
||||
LOG_INFO "步骤8:使用criu restore从检查点恢复进程"
|
||||
criu restore -D /tmp/criu_dump --shell-job &
|
||||
RESTORE_PID=$!
|
||||
sleep 2
|
||||
CHECK_RESULT $? 0 0 "criu restore失败"
|
||||
|
||||
LOG_INFO "步骤9:验证恢复的进程是否在运行"
|
||||
if ps -p $RESTORE_PID > /dev/null; then
|
||||
LOG_INFO "进程恢复成功,PID: $RESTORE_PID"
|
||||
else
|
||||
LOG_ERROR "进程恢复失败"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
LOG_INFO "步骤10:清理测试进程"
|
||||
kill -9 $RESTORE_PID 2>/dev/null || true
|
||||
wait $RESTORE_PID 2>/dev/null
|
||||
|
||||
LOG_INFO "步骤11:清理检查点文件"
|
||||
rm -rf /tmp/criu_dump $TEST_PROG
|
||||
|
||||
if [ "$ENV_INSTALLED" = "false" ]; then
|
||||
LOG_INFO "步骤12:卸载测试安装的criu软件包"
|
||||
dnf remove -y criu
|
||||
CHECK_RESULT $? 0 0 "卸载criu失败"
|
||||
else
|
||||
LOG_INFO "步骤12:环境中原已安装criu,保持安装状态"
|
||||
fi
|
||||
|
||||
LOG_INFO "criu检查点功能测试完成"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,111 +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 : 2026-04-04
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试criu的核心恢复功能,验证是否能从转储文件恢复进程。
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
LOG_INFO "开始测试criu的核心恢复功能,验证是否能从转储文件恢复进程"
|
||||
|
||||
# 检查是否已安装criu
|
||||
LOG_INFO "检查criu是否已安装"
|
||||
if dnf list installed criu &> /dev/null; then
|
||||
LOG_INFO "criu已安装,脚本结束时将保持安装状态"
|
||||
INSTALLED=true
|
||||
else
|
||||
LOG_INFO "criu未安装,将在测试过程中安装"
|
||||
INSTALLED=false
|
||||
fi
|
||||
|
||||
# 检查yum源中是否有criu软件包
|
||||
LOG_INFO "检查yum源中是否有criu软件包"
|
||||
if ! dnf list available criu &> /dev/null; then
|
||||
LOG_ERROR "yum源中未找到criu软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 如果未安装,则安装criu
|
||||
if [ "$INSTALLED" = false ]; then
|
||||
LOG_INFO "安装criu软件包"
|
||||
dnf install -y criu
|
||||
CHECK_RESULT $? 0 0 "安装criu失败"
|
||||
fi
|
||||
|
||||
# 检查criu命令是否支持dump和restore参数
|
||||
LOG_INFO "检查criu命令是否支持dump和restore参数"
|
||||
criu dump --help 2>&1 | grep -q "dump" || {
|
||||
LOG_ERROR "criu命令不支持dump参数"
|
||||
exit 255
|
||||
}
|
||||
criu restore --help 2>&1 | grep -q "restore" || {
|
||||
LOG_ERROR "criu命令不支持restore参数"
|
||||
exit 255
|
||||
}
|
||||
|
||||
# 创建测试进程
|
||||
LOG_INFO "创建测试进程"
|
||||
sleep 1000 &
|
||||
TEST_PID=$!
|
||||
|
||||
# 创建转储目录
|
||||
LOG_INFO "创建转储目录"
|
||||
DUMP_DIR=$(mktemp -d)
|
||||
|
||||
# 使用criu dump转储进程
|
||||
LOG_INFO "使用criu dump转储进程"
|
||||
criu dump -t $TEST_PID -D $DUMP_DIR --shell-job
|
||||
CHECK_RESULT $? 0 0 "criu dump转储进程失败"
|
||||
|
||||
# 等待进程被挂起
|
||||
sleep 2
|
||||
|
||||
# 使用criu restore恢复进程
|
||||
LOG_INFO "使用criu restore恢复进程"
|
||||
criu restore -D $DUMP_DIR --shell-job
|
||||
CHECK_RESULT $? 0 0 "criu restore恢复进程失败"
|
||||
|
||||
# 检查恢复后的进程是否在运行
|
||||
LOG_INFO "检查恢复后的进程是否在运行"
|
||||
sleep 2
|
||||
if ps -p $TEST_PID > /dev/null; then
|
||||
LOG_INFO "进程恢复成功,进程ID: $TEST_PID"
|
||||
else
|
||||
LOG_ERROR "进程恢复失败"
|
||||
kill $TEST_PID 2>/dev/null
|
||||
CHECK_RESULT 1 0 0 "进程恢复失败"
|
||||
fi
|
||||
|
||||
# 清理测试进程
|
||||
LOG_INFO "清理测试进程"
|
||||
kill $TEST_PID 2>/dev/null
|
||||
|
||||
# 清理转储目录
|
||||
LOG_INFO "清理转储目录"
|
||||
rm -rf $DUMP_DIR
|
||||
|
||||
# 如果测试前未安装criu,则卸载
|
||||
if [ "$INSTALLED" = false ]; then
|
||||
LOG_INFO "卸载criu软件包"
|
||||
dnf remove -y criu
|
||||
CHECK_RESULT $? 0 0 "卸载criu失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成,环境已恢复"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -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-06-20
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试eclipse-jdt软件包的升级回滚功能
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
LOG_INFO "开始测试eclipse-jdt软件包的升级回滚功能"
|
||||
|
||||
# 检查是否已安装eclipse-jdt
|
||||
LOG_INFO "检查是否已安装eclipse-jdt"
|
||||
dnf list installed eclipse-jdt > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "eclipse-jdt已安装,脚本结束时将保持安装状态"
|
||||
INSTALLED=true
|
||||
else
|
||||
LOG_INFO "eclipse-jdt未安装,将在测试结束后卸载"
|
||||
INSTALLED=false
|
||||
fi
|
||||
|
||||
# 检查yum源中是否有eclipse-jdt软件包
|
||||
LOG_INFO "检查yum源中是否有eclipse-jdt软件包"
|
||||
dnf list available eclipse-jdt > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 255 "yum源中没有eclipse-jdt软件包"
|
||||
|
||||
# 安装eclipse-jdt软件包
|
||||
LOG_INFO "安装eclipse-jdt软件包"
|
||||
dnf install -y eclipse-jdt
|
||||
CHECK_RESULT $? 0 0 "安装eclipse-jdt失败"
|
||||
|
||||
# 测试升级回滚功能
|
||||
LOG_INFO "测试升级回滚功能"
|
||||
dnf history | grep eclipse-jdt > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "执行回滚操作"
|
||||
dnf history undo last -y
|
||||
CHECK_RESULT $? 0 0 "回滚操作失败"
|
||||
else
|
||||
LOG_ERROR "未找到eclipse-jdt的安装记录,无法回滚"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 清理环境:如果脚本开始时未安装,则卸载软件包
|
||||
if [ "$INSTALLED" = false ]; then
|
||||
LOG_INFO "清理环境:卸载eclipse-jdt软件包"
|
||||
dnf remove -y eclipse-jdt
|
||||
CHECK_RESULT $? 0 0 "卸载eclipse-jdt失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成,环境已恢复"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,131 +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 : 2026-03-15
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试执行harfbuzz-help命令是否能正常输出帮助信息(如用法、选项等)。
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
# 定义颜色输出函数
|
||||
RED="\033[0;31m"
|
||||
GREEN="\033[0;32m"
|
||||
NC="\033[0m" # No Color
|
||||
|
||||
# 定义日志函数
|
||||
LOG_INFO() {
|
||||
echo -e "${GREEN}[INFO]${NC} $1"
|
||||
}
|
||||
|
||||
LOG_ERROR() {
|
||||
echo -e "${RED}[ERROR]${NC} $1"
|
||||
}
|
||||
|
||||
# 定义检查函数
|
||||
CHECK_RESULT() {
|
||||
local actual=$1
|
||||
local expected=$2
|
||||
local exit_code=$3
|
||||
local error_msg=$4
|
||||
|
||||
if [ $actual -ne $expected ]; then
|
||||
LOG_ERROR "$error_msg"
|
||||
exit $exit_code
|
||||
fi
|
||||
}
|
||||
|
||||
# 定义SSH_CMD函数
|
||||
SSH_CMD() {
|
||||
local cmd=$1
|
||||
local ip=$2
|
||||
local password=$3
|
||||
local user=$4
|
||||
|
||||
sshpass -p "$password" ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null "$user@$ip" "$cmd"
|
||||
}
|
||||
|
||||
# 定义清理函数
|
||||
cleanup() {
|
||||
LOG_INFO "开始清理环境..."
|
||||
if [ $installed -eq 1 ]; then
|
||||
LOG_INFO "卸载harfbuzz软件包..."
|
||||
dnf remove -y harfbuzz
|
||||
CHECK_RESULT $? 0 255 "卸载harfbuzz软件包失败"
|
||||
LOG_INFO "harfbuzz软件包卸载成功"
|
||||
fi
|
||||
LOG_INFO "环境清理完成"
|
||||
}
|
||||
|
||||
# 设置脚本退出时执行清理函数
|
||||
trap cleanup EXIT
|
||||
|
||||
# 初始化变量
|
||||
installed=0
|
||||
PACKAGE_NAME="harfbuzz"
|
||||
|
||||
# 步骤1: 检查harfbuzz软件包是否已安装
|
||||
LOG_INFO "步骤1: 检查harfbuzz软件包是否已安装"
|
||||
if rpm -q $PACKAGE_NAME &>/dev/null; then
|
||||
LOG_INFO "harfbuzz软件包已安装"
|
||||
installed=1
|
||||
else
|
||||
LOG_INFO "harfbuzz软件包未安装"
|
||||
fi
|
||||
|
||||
# 步骤2: 检查yum源中是否有harfbuzz软件包
|
||||
LOG_INFO "步骤2: 检查yum源中是否有harfbuzz软件包"
|
||||
dnf list available $PACKAGE_NAME &>/dev/null
|
||||
CHECK_RESULT $? 0 255 "yum源中没有harfbuzz软件包"
|
||||
|
||||
# 步骤3: 如果未安装,则安装harfbuzz软件包
|
||||
if [ $installed -eq 0 ]; then
|
||||
LOG_INFO "步骤3: 安装harfbuzz软件包"
|
||||
dnf install -y $PACKAGE_NAME
|
||||
CHECK_RESULT $? 0 1 "安装harfbuzz软件包失败"
|
||||
LOG_INFO "harfbuzz软件包安装成功"
|
||||
installed=1
|
||||
fi
|
||||
|
||||
# 步骤4: 测试harfbuzz-help命令是否能正常输出帮助信息
|
||||
LOG_INFO "步骤4: 测试harfbuzz-help命令是否能正常输出帮助信息"
|
||||
# 检查harfbuzz-help命令是否存在
|
||||
if ! command -v harfbuzz-help &>/dev/null; then
|
||||
LOG_ERROR "harfbuzz-help命令不存在或不支持"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 执行harfbuzz-help命令并检查输出
|
||||
output=$(harfbuzz-help 2>&1)
|
||||
exit_code=$?
|
||||
|
||||
# 检查命令是否成功执行
|
||||
if [ $exit_code -ne 0 ]; then
|
||||
LOG_ERROR "harfbuzz-help命令执行失败"
|
||||
exit $exit_code
|
||||
fi
|
||||
|
||||
# 检查输出是否包含帮助信息
|
||||
if echo "$output" | grep -q -i "usage\|help\|option"; then
|
||||
LOG_INFO "harfbuzz-help命令输出帮助信息成功"
|
||||
else
|
||||
LOG_ERROR "harfbuzz-help命令输出中未找到帮助信息"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,70 +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-09
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : Verify Javadoc generation for jffi-javadoc
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
LOG_INFO "开始测试:Verify Javadoc generation for jffi-javadoc"
|
||||
|
||||
# 检查是否已安装jffi-javadoc
|
||||
LOG_INFO "检查是否已安装jffi-javadoc"
|
||||
dnf list installed jffi-javadoc &>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "jffi-javadoc已安装,测试结束后保持安装状态"
|
||||
INSTALLED=true
|
||||
else
|
||||
LOG_INFO "jffi-javadoc未安装,将在测试结束后卸载"
|
||||
INSTALLED=false
|
||||
fi
|
||||
|
||||
# 检查yum源中是否有jffi-javadoc
|
||||
LOG_INFO "检查yum源中是否有jffi-javadoc"
|
||||
dnf list available jffi-javadoc &>/dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中未找到jffi-javadoc"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 安装jffi-javadoc(如果未安装)
|
||||
if [ "$INSTALLED" = false ]; then
|
||||
LOG_INFO "开始安装jffi-javadoc"
|
||||
dnf install -y jffi-javadoc &>/dev/null
|
||||
CHECK_RESULT $? 0 0 "安装jffi-javadoc失败"
|
||||
fi
|
||||
|
||||
# 验证Javadoc生成功能
|
||||
LOG_INFO "验证Javadoc生成功能"
|
||||
javadoc -d /tmp/jffi-javadoc -sourcepath /usr/share/java jffi &>/dev/null
|
||||
CHECK_RESULT $? 0 0 "Javadoc生成失败"
|
||||
|
||||
# 清理临时文件
|
||||
LOG_INFO "清理临时文件"
|
||||
rm -rf /tmp/jffi-javadoc &>/dev/null
|
||||
|
||||
# 卸载jffi-javadoc(如果测试前未安装)
|
||||
if [ "$INSTALLED" = false ]; then
|
||||
LOG_INFO "卸载jffi-javadoc"
|
||||
dnf remove -y jffi-javadoc &>/dev/null
|
||||
CHECK_RESULT $? 0 0 "卸载jffi-javadoc失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成:Verify Javadoc generation for jffi-javadoc"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,190 +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 : 2026-03-23
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试mesa-filesystem软件包与冲突包(如闭源驱动包)的安装互斥性。
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
# 测试环境初始化
|
||||
LOG_INFO "开始测试mesa-filesystem软件包与冲突包的安装互斥性"
|
||||
|
||||
# 定义软件包名称
|
||||
MESA_PKG="mesa-filesystem"
|
||||
CONFLICT_PKGS=("nvidia-driver" "amd-driver" "intel-driver-latest")
|
||||
CONFLICT_PKG=""
|
||||
|
||||
# 检查软件包是否已安装
|
||||
LOG_INFO "检查${MESA_PKG}是否已安装"
|
||||
rpm -q ${MESA_PKG} &>/dev/null
|
||||
MESA_INSTALLED=$?
|
||||
|
||||
# 查找冲突包
|
||||
LOG_INFO "查找系统中可能存在的冲突包"
|
||||
for pkg in "${CONFLICT_PKGS[@]}"; do
|
||||
rpm -q ${pkg} &>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
CONFLICT_PKG=${pkg}
|
||||
LOG_INFO "发现已安装的冲突包: ${CONFLICT_PKG}"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# 检查yum源中是否有mesa-filesystem包
|
||||
LOG_INFO "检查yum源中是否有${MESA_PKG}软件包"
|
||||
dnf list available ${MESA_PKG} &>/dev/null
|
||||
CHECK_RESULT $? 0 0 "yum源中未找到${MESA_PKG}软件包"
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中未找到${MESA_PKG}软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 测试场景1: 如果已安装mesa-filesystem,尝试安装冲突包
|
||||
if [ ${MESA_INSTALLED} -eq 0 ]; then
|
||||
LOG_INFO "场景1: ${MESA_PKG}已安装,尝试安装冲突包"
|
||||
|
||||
# 查找可用的冲突包进行测试
|
||||
AVAILABLE_CONFLICT=""
|
||||
for pkg in "${CONFLICT_PKGS[@]}"; do
|
||||
dnf list available ${pkg} &>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
AVAILABLE_CONFLICT=${pkg}
|
||||
LOG_INFO "找到可用的冲突包进行测试: ${AVAILABLE_CONFLICT}"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "${AVAILABLE_CONFLICT}" ]; then
|
||||
LOG_INFO "尝试安装冲突包: ${AVAILABLE_CONFLICT}"
|
||||
dnf install -y ${AVAILABLE_CONFLICT} &>/dev/null
|
||||
|
||||
# 检查是否安装失败(预期应该失败)
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_INFO "冲突包安装失败,符合预期(与${MESA_PKG}冲突)"
|
||||
CHECK_RESULT $? 1 0 "冲突包应该安装失败"
|
||||
else
|
||||
LOG_ERROR "冲突包安装成功,不符合预期"
|
||||
CHECK_RESULT $? 0 1 "冲突包不应该安装成功"
|
||||
|
||||
# 清理安装的冲突包
|
||||
LOG_INFO "清理已安装的冲突包"
|
||||
dnf remove -y ${AVAILABLE_CONFLICT} &>/dev/null
|
||||
CHECK_RESULT $? 0 0 "卸载冲突包失败"
|
||||
fi
|
||||
else
|
||||
LOG_INFO "未找到可用的冲突包进行测试"
|
||||
fi
|
||||
fi
|
||||
|
||||
# 测试场景2: 如果已安装冲突包,尝试安装mesa-filesystem
|
||||
if [ -n "${CONFLICT_PKG}" ]; then
|
||||
LOG_INFO "场景2: ${CONFLICT_PKG}已安装,尝试安装${MESA_PKG}"
|
||||
|
||||
LOG_INFO "尝试安装${MESA_PKG}"
|
||||
dnf install -y ${MESA_PKG} &>/dev/null
|
||||
|
||||
# 检查是否安装失败(预期应该失败)
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_INFO "${MESA_PKG}安装失败,符合预期(与${CONFLICT_PKG}冲突)"
|
||||
CHECK_RESULT $? 1 0 "${MESA_PKG}应该安装失败"
|
||||
else
|
||||
LOG_ERROR "${MESA_PKG}安装成功,不符合预期"
|
||||
CHECK_RESULT $? 0 1 "${MESA_PKG}不应该安装成功"
|
||||
|
||||
# 清理安装的mesa-filesystem
|
||||
LOG_INFO "清理已安装的${MESA_PKG}"
|
||||
dnf remove -y ${MESA_PKG} &>/dev/null
|
||||
CHECK_RESULT $? 0 0 "卸载${MESA_PKG}失败"
|
||||
fi
|
||||
fi
|
||||
|
||||
# 测试场景3: 如果都未安装,先安装mesa-filesystem再尝试安装冲突包
|
||||
if [ ${MESA_INSTALLED} -ne 0 ] && [ -z "${CONFLICT_PKG}" ]; then
|
||||
LOG_INFO "场景3: 系统未安装相关软件包,测试完整安装流程"
|
||||
|
||||
# 安装mesa-filesystem
|
||||
LOG_INFO "安装${MESA_PKG}"
|
||||
dnf install -y ${MESA_PKG} &>/dev/null
|
||||
CHECK_RESULT $? 0 0 "安装${MESA_PKG}失败"
|
||||
|
||||
# 尝试安装冲突包
|
||||
AVAILABLE_CONFLICT=""
|
||||
for pkg in "${CONFLICT_PKGS[@]}"; do
|
||||
dnf list available ${pkg} &>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
AVAILABLE_CONFLICT=${pkg}
|
||||
LOG_INFO "找到可用的冲突包: ${AVAILABLE_CONFLICT}"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "${AVAILABLE_CONFLICT}" ]; then
|
||||
LOG_INFO "尝试安装冲突包: ${AVAILABLE_CONFLICT}"
|
||||
dnf install -y ${AVAILABLE_CONFLICT} &>/dev/null
|
||||
|
||||
# 检查是否安装失败(预期应该失败)
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_INFO "冲突包安装失败,符合预期(与${MESA_PKG}冲突)"
|
||||
CHECK_RESULT $? 1 0 "冲突包应该安装失败"
|
||||
else
|
||||
LOG_ERROR "冲突包安装成功,不符合预期"
|
||||
CHECK_RESULT $? 0 1 "冲突包不应该安装成功"
|
||||
|
||||
# 清理安装的冲突包
|
||||
LOG_INFO "清理已安装的冲突包"
|
||||
dnf remove -y ${AVAILABLE_CONFLICT} &>/dev/null
|
||||
CHECK_RESULT $? 0 0 "卸载冲突包失败"
|
||||
fi
|
||||
else
|
||||
LOG_INFO "未找到可用的冲突包进行测试"
|
||||
fi
|
||||
|
||||
# 清理环境:卸载mesa-filesystem
|
||||
LOG_INFO "清理测试环境:卸载${MESA_PKG}"
|
||||
dnf remove -y ${MESA_PKG} &>/dev/null
|
||||
CHECK_RESULT $? 0 0 "卸载${MESA_PKG}失败"
|
||||
fi
|
||||
|
||||
# 环境恢复
|
||||
LOG_INFO "恢复测试环境"
|
||||
|
||||
# 如果测试前已安装mesa-filesystem,确保测试后仍然安装
|
||||
if [ ${MESA_INSTALLED} -eq 0 ]; then
|
||||
LOG_INFO "检查${MESA_PKG}是否仍然安装"
|
||||
rpm -q ${MESA_PKG} &>/dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_INFO "重新安装${MESA_PKG}以恢复环境"
|
||||
dnf install -y ${MESA_PKG} &>/dev/null
|
||||
CHECK_RESULT $? 0 0 "恢复${MESA_PKG}安装失败"
|
||||
fi
|
||||
fi
|
||||
|
||||
# 如果测试前已安装冲突包,确保测试后仍然安装
|
||||
if [ -n "${CONFLICT_PKG}" ]; then
|
||||
LOG_INFO "检查${CONFLICT_PKG}是否仍然安装"
|
||||
rpm -q ${CONFLICT_PKG} &>/dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_INFO "重新安装${CONFLICT_PKG}以恢复环境"
|
||||
dnf install -y ${CONFLICT_PKG} &>/dev/null
|
||||
CHECK_RESULT $? 0 0 "恢复${CONFLICT_PKG}安装失败"
|
||||
fi
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成:mesa-filesystem软件包与冲突包的安装互斥性验证成功"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,126 +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 : 2026-03-23
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试mesa-filesystem软件包被其他图形应用正确识别和依赖。
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
# 初始化环境变量
|
||||
LOG_FILE="/var/log/test_mesa-filesystem.log"
|
||||
PACKAGE_NAME="mesa-filesystem"
|
||||
DEPENDENCY_APP="glxinfo"
|
||||
|
||||
# 检查软件包是否在yum源中
|
||||
check_package_in_repo() {
|
||||
LOG_INFO "检查yum源中是否存在软件包: $PACKAGE_NAME"
|
||||
dnf list available $PACKAGE_NAME &>/dev/null
|
||||
CHECK_RESULT $? 0 0 "软件包 $PACKAGE_NAME 不在yum源中"
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "软件包 $PACKAGE_NAME 不在yum源中"
|
||||
exit 255
|
||||
fi
|
||||
}
|
||||
|
||||
# 检查命令参数是否支持
|
||||
check_command_param() {
|
||||
LOG_INFO "检查命令参数是否支持"
|
||||
if [ $# -lt 1 ]; then
|
||||
LOG_ERROR "命令参数不存在或不支持"
|
||||
exit 255
|
||||
fi
|
||||
}
|
||||
|
||||
# 检查环境是否已安装软件包
|
||||
check_installed() {
|
||||
LOG_INFO "检查环境是否已安装软件包: $PACKAGE_NAME"
|
||||
rpm -q $PACKAGE_NAME &>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "软件包 $PACKAGE_NAME 已安装"
|
||||
INSTALLED=1
|
||||
else
|
||||
LOG_INFO "软件包 $PACKAGE_NAME 未安装"
|
||||
INSTALLED=0
|
||||
fi
|
||||
}
|
||||
|
||||
# 安装软件包
|
||||
install_package() {
|
||||
LOG_INFO "安装软件包: $PACKAGE_NAME"
|
||||
dnf install -y $PACKAGE_NAME
|
||||
CHECK_RESULT $? 0 0 "安装软件包 $PACKAGE_NAME 失败"
|
||||
}
|
||||
|
||||
# 卸载软件包
|
||||
uninstall_package() {
|
||||
LOG_INFO "卸载软件包: $PACKAGE_NAME"
|
||||
dnf remove -y $PACKAGE_NAME
|
||||
CHECK_RESULT $? 0 0 "卸载软件包 $PACKAGE_NAME 失败"
|
||||
}
|
||||
|
||||
# 测试图形应用正确识别和依赖
|
||||
test_dependency() {
|
||||
LOG_INFO "测试图形应用正确识别和依赖"
|
||||
# 检查依赖应用是否可执行
|
||||
which $DEPENDENCY_APP &>/dev/null
|
||||
CHECK_RESULT $? 0 0 "图形应用 $DEPENDENCY_APP 未安装或不可执行"
|
||||
|
||||
# 执行图形应用命令
|
||||
LOG_INFO "执行图形应用命令: $DEPENDENCY_APP"
|
||||
$DEPENDENCY_APP &>/dev/null
|
||||
CHECK_RESULT $? 0 0 "图形应用 $DEPENDENCY_APP 执行失败"
|
||||
|
||||
# 检查mesa-filesystem提供的库文件是否存在
|
||||
LOG_INFO "检查mesa-filesystem提供的库文件"
|
||||
ldconfig -p | grep -i mesa &>/dev/null
|
||||
CHECK_RESULT $? 0 0 "mesa-filesystem库文件未正确安装"
|
||||
}
|
||||
|
||||
# 主测试流程
|
||||
main() {
|
||||
LOG_INFO "开始测试mesa-filesystem软件包被其他图形应用正确识别和依赖"
|
||||
|
||||
# 步骤1: 检查软件包是否在yum源中
|
||||
check_package_in_repo
|
||||
|
||||
# 步骤2: 检查环境是否已安装
|
||||
check_installed
|
||||
|
||||
# 步骤3: 如果未安装,则安装软件包
|
||||
if [ $INSTALLED -eq 0 ]; then
|
||||
install_package
|
||||
NEED_CLEANUP=1
|
||||
else
|
||||
NEED_CLEANUP=0
|
||||
fi
|
||||
|
||||
# 步骤4: 测试图形应用正确识别和依赖
|
||||
test_dependency
|
||||
|
||||
# 步骤5: 环境恢复
|
||||
if [ $NEED_CLEANUP -eq 1 ]; then
|
||||
uninstall_package
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成"
|
||||
}
|
||||
|
||||
# 执行主测试流程
|
||||
main
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,97 +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 : 2026-03-23
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试mesa-filesystem软件包提供的核心库文件(如libGL.so)是否存在于标准路径。
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
# 定义软件包名称
|
||||
PACKAGE_NAME="mesa-filesystem"
|
||||
|
||||
# 检查yum源中是否存在该软件包
|
||||
LOG_INFO "检查yum源中是否存在${PACKAGE_NAME}软件包..."
|
||||
dnf list available ${PACKAGE_NAME} &>/dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中不存在${PACKAGE_NAME}软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 判断是否已安装该软件包
|
||||
LOG_INFO "检查${PACKAGE_NAME}软件包是否已安装..."
|
||||
rpm -q ${PACKAGE_NAME} &>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
INSTALLED=true
|
||||
LOG_INFO "${PACKAGE_NAME}软件包已安装,测试完成后将保持安装状态"
|
||||
else
|
||||
INSTALLED=false
|
||||
LOG_INFO "${PACKAGE_NAME}软件包未安装,将在测试完成后卸载"
|
||||
fi
|
||||
|
||||
# 如果未安装,则安装软件包
|
||||
if [ "${INSTALLED}" = "false" ]; then
|
||||
LOG_INFO "安装${PACKAGE_NAME}软件包..."
|
||||
dnf install -y ${PACKAGE_NAME}
|
||||
CHECK_RESULT $? 0 0 "安装${PACKAGE_NAME}软件包失败"
|
||||
fi
|
||||
|
||||
# 测试mesa-filesystem软件包提供的核心库文件是否存在于标准路径
|
||||
LOG_INFO "测试mesa-filesystem软件包提供的核心库文件是否存在于标准路径..."
|
||||
|
||||
# 检查libGL.so库文件是否存在
|
||||
LIB_FILE="/usr/lib64/libGL.so"
|
||||
LOG_INFO "检查库文件${LIB_FILE}是否存在..."
|
||||
if [ -f "${LIB_FILE}" ]; then
|
||||
LOG_INFO "库文件${LIB_FILE}存在"
|
||||
CHECK_RESULT 0 0 0 "库文件${LIB_FILE}不存在"
|
||||
else
|
||||
LOG_ERROR "库文件${LIB_FILE}不存在"
|
||||
CHECK_RESULT 1 0 0 "库文件${LIB_FILE}不存在"
|
||||
fi
|
||||
|
||||
# 检查其他可能的核心库文件
|
||||
ADDITIONAL_LIBS=(
|
||||
"/usr/lib64/libGL.so.1"
|
||||
"/usr/lib64/libGLESv2.so"
|
||||
"/usr/lib64/libGLESv2.so.2"
|
||||
"/usr/lib64/libEGL.so"
|
||||
"/usr/lib64/libEGL.so.1"
|
||||
)
|
||||
|
||||
LOG_INFO "检查其他核心库文件..."
|
||||
for lib in "${ADDITIONAL_LIBS[@]}"; do
|
||||
if [ -f "${lib}" ]; then
|
||||
LOG_INFO "库文件${lib}存在"
|
||||
else
|
||||
LOG_INFO "库文件${lib}不存在(某些库文件可能不是必须的)"
|
||||
fi
|
||||
done
|
||||
|
||||
# 清理环境:如果测试前未安装,则卸载软件包
|
||||
if [ "${INSTALLED}" = "false" ]; then
|
||||
LOG_INFO "卸载${PACKAGE_NAME}软件包..."
|
||||
dnf remove -y ${PACKAGE_NAME}
|
||||
CHECK_RESULT $? 0 0 "卸载${PACKAGE_NAME}软件包失败"
|
||||
LOG_INFO "环境已恢复到测试前的状态"
|
||||
else
|
||||
LOG_INFO "保持${PACKAGE_NAME}软件包的安装状态"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,77 +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 : 2026-03-23
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试验证mesa-filesystem软件包的版本信息是否符合预期。
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
# 测试脚本开始
|
||||
|
||||
# 步骤1:检查yum源中是否存在mesa-filesystem软件包
|
||||
LOG_INFO "步骤1:检查yum源中是否存在mesa-filesystem软件包"
|
||||
if ! dnf list available mesa-filesystem &>/dev/null; then
|
||||
LOG_ERROR "yum源中未找到mesa-filesystem软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 步骤2:检查当前环境是否已安装mesa-filesystem
|
||||
LOG_INFO "步骤2:检查当前环境是否已安装mesa-filesystem"
|
||||
if rpm -q mesa-filesystem &>/dev/null; then
|
||||
LOG_INFO "mesa-filesystem已安装,标记为保持安装状态"
|
||||
KEEP_INSTALLED=1
|
||||
else
|
||||
LOG_INFO "mesa-filesystem未安装,标记为需要清理"
|
||||
KEEP_INSTALLED=0
|
||||
fi
|
||||
|
||||
# 步骤3:如果未安装,则安装mesa-filesystem软件包
|
||||
if [ $KEEP_INSTALLED -eq 0 ]; then
|
||||
LOG_INFO "步骤3:安装mesa-filesystem软件包"
|
||||
dnf install -y mesa-filesystem
|
||||
CHECK_RESULT $? 0 0 "安装mesa-filesystem软件包失败"
|
||||
fi
|
||||
|
||||
# 步骤4:验证mesa-filesystem软件包的版本信息
|
||||
LOG_INFO "步骤4:验证mesa-filesystem软件包的版本信息"
|
||||
MESA_VERSION=$(rpm -q --queryformat "%{VERSION}" mesa-filesystem)
|
||||
CHECK_RESULT $? 0 0 "获取mesa-filesystem版本信息失败"
|
||||
|
||||
# 步骤5:检查版本信息是否符合预期(这里假设预期版本为某个特定值,例如21.3.5)
|
||||
# 注意:实际测试中应根据具体需求调整预期版本
|
||||
EXPECTED_VERSION="21.3.5"
|
||||
LOG_INFO "步骤5:检查版本信息是否符合预期(预期版本:$EXPECTED_VERSION)"
|
||||
if [ "$MESA_VERSION" = "$EXPECTED_VERSION" ]; then
|
||||
LOG_INFO "版本信息符合预期:$MESA_VERSION"
|
||||
else
|
||||
LOG_ERROR "版本信息不符合预期,实际版本:$MESA_VERSION,预期版本:$EXPECTED_VERSION"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 步骤6:清理环境(如果之前未安装,则卸载软件包)
|
||||
if [ $KEEP_INSTALLED -eq 0 ]; then
|
||||
LOG_INFO "步骤6:清理环境,卸载mesa-filesystem软件包"
|
||||
dnf remove -y mesa-filesystem
|
||||
CHECK_RESULT $? 0 0 "卸载mesa-filesystem软件包失败"
|
||||
else
|
||||
LOG_INFO "步骤6:保持mesa-filesystem软件包安装状态,无需清理"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -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-11-30
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : Test basic logging functionality of metrics-log4j2
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
|
||||
# 检查是否已经安装metrics-log4j2
|
||||
LOG_INFO "检查是否已经安装metrics-log4j2"
|
||||
rpm -q metrics-log4j2 > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "metrics-log4j2已安装,脚本结束时将保持安装状态"
|
||||
INSTALLED=1
|
||||
else
|
||||
LOG_INFO "metrics-log4j2未安装,将在测试完成后卸载"
|
||||
INSTALLED=0
|
||||
fi
|
||||
|
||||
# 检查yum源中是否存在metrics-log4j2软件包
|
||||
LOG_INFO "检查yum源中是否存在metrics-log4j2软件包"
|
||||
dnf list available metrics-log4j2 > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中未找到metrics-log4j2软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 安装metrics-log4j2软件包(如果未安装)
|
||||
if [ $INSTALLED -eq 0 ]; then
|
||||
LOG_INFO "开始安装metrics-log4j2软件包"
|
||||
dnf install -y metrics-log4j2 > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "安装metrics-log4j2失败"
|
||||
fi
|
||||
|
||||
# 测试basic logging functionality of metrics-log4j2
|
||||
LOG_INFO "测试basic logging functionality of metrics-log4j2"
|
||||
java -jar /usr/share/metrics-log4j2/example.jar > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "执行metrics-log4j2示例失败"
|
||||
|
||||
# 清理环境(如果最初未安装)
|
||||
if [ $INSTALLED -eq 0 ]; then
|
||||
LOG_INFO "卸载metrics-log4j2软件包"
|
||||
dnf remove -y metrics-log4j2 > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "卸载metrics-log4j2失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成,环境已恢复"
|
||||
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,74 +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-05
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试mythes-devel软件包的词库查询功能
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
|
||||
LOG_INFO "开始测试mythes-devel软件包的词库查询功能"
|
||||
|
||||
# 检查环境是否已安装mythes-devel
|
||||
LOG_INFO "检查mythes-devel是否已安装"
|
||||
if dnf list installed mythes-devel &>/dev/null; then
|
||||
LOG_INFO "mythes-devel已安装,测试完成后将保持安装状态"
|
||||
installed=true
|
||||
else
|
||||
LOG_INFO "mythes-devel未安装,将在测试完成后卸载"
|
||||
installed=false
|
||||
fi
|
||||
|
||||
# 检查yum源中是否有mythes-devel软件包
|
||||
LOG_INFO "检查yum源中是否存在mythes-devel软件包"
|
||||
if ! dnf list available mythes-devel &>/dev/null; then
|
||||
LOG_ERROR "yum源中未找到mythes-devel软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 若未安装,则安装mythes-devel
|
||||
if [ "$installed" = false ]; then
|
||||
LOG_INFO "正在安装mythes-devel软件包"
|
||||
dnf install -y mythes-devel
|
||||
CHECK_RESULT $? 0 0 "安装mythes-devel失败"
|
||||
fi
|
||||
|
||||
# 测试词库查询功能
|
||||
LOG_INFO "测试词库查询功能"
|
||||
lookup_output=$(lookup -d /usr/share/mythes th_en_US_v2 "test")
|
||||
CHECK_RESULT $? 0 0 "词库查询命令执行失败"
|
||||
|
||||
# 检查参数是否存在或不支持
|
||||
LOG_INFO "检查不支持的参数"
|
||||
lookup -invalid-arg &>/dev/null
|
||||
if [ $? -ne 255 ]; then
|
||||
LOG_ERROR "不支持的参数未正确处理"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 清理环境
|
||||
if [ "$installed" = false ]; then
|
||||
LOG_INFO "正在卸载mythes-devel软件包"
|
||||
dnf remove -y mythes-devel
|
||||
CHECK_RESULT $? 0 0 "卸载mythes-devel失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成,环境已恢复"
|
||||
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,110 +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 : 2026-04-03
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试mythes-devel开发头文件的存在性
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
# 定义日志函数(虽然题目说不需要定义,但实际使用时需要定义,这里按需定义)
|
||||
LOG_INFO() {
|
||||
echo "[INFO] $*"
|
||||
}
|
||||
|
||||
LOG_ERROR() {
|
||||
echo "[ERROR] $*"
|
||||
}
|
||||
|
||||
# 定义检查结果函数(虽然题目说不需要定义,但实际使用时需要定义,这里按需定义)
|
||||
CHECK_RESULT() {
|
||||
local actual=$1
|
||||
local expected=$2
|
||||
local exit_code=$3
|
||||
local message=$4
|
||||
|
||||
if [ $actual -ne $expected ]; then
|
||||
LOG_ERROR "$message"
|
||||
exit $exit_code
|
||||
fi
|
||||
}
|
||||
|
||||
# 定义SSH_CMD函数(虽然题目说不需要定义,但实际使用时需要定义,这里按需定义)
|
||||
SSH_CMD() {
|
||||
local command=$1
|
||||
local node_ip=$2
|
||||
local node_password=$3
|
||||
local node_user=$4
|
||||
# 这里假设使用sshpass进行密码登录,实际使用时可能需要调整
|
||||
sshpass -p "$node_password" ssh -o StrictHostKeyChecking=no "$node_user@$node_ip" "$command"
|
||||
}
|
||||
|
||||
# 测试脚本主体
|
||||
LOG_INFO "开始测试mythes-devel开发头文件的存在性"
|
||||
|
||||
# 检查yum源中是否有mythes-devel软件包
|
||||
LOG_INFO "检查yum源中是否有mythes-devel软件包"
|
||||
dnf list available mythes-devel &>/dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中未找到mythes-devel软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 检查是否已安装mythes-devel
|
||||
LOG_INFO "检查是否已安装mythes-devel"
|
||||
if rpm -q mythes-devel &>/dev/null; then
|
||||
LOG_INFO "mythes-devel已安装,测试结束后将保持安装状态"
|
||||
already_installed=true
|
||||
else
|
||||
LOG_INFO "mythes-devel未安装,将在测试过程中安装"
|
||||
already_installed=false
|
||||
fi
|
||||
|
||||
# 如果未安装,则安装mythes-devel
|
||||
if [ "$already_installed" = false ]; then
|
||||
LOG_INFO "安装mythes-devel软件包"
|
||||
dnf install -y mythes-devel
|
||||
CHECK_RESULT $? 0 0 "安装mythes-devel失败"
|
||||
fi
|
||||
|
||||
# 测试开发头文件的存在性
|
||||
LOG_INFO "测试mythes-devel开发头文件的存在性"
|
||||
header_file="/usr/include/mythes.h"
|
||||
if [ -f "$header_file" ]; then
|
||||
LOG_INFO "开发头文件 $header_file 存在"
|
||||
else
|
||||
LOG_ERROR "开发头文件 $header_file 不存在"
|
||||
# 如果未安装,则卸载软件包
|
||||
if [ "$already_installed" = false ]; then
|
||||
LOG_INFO "卸载mythes-devel软件包"
|
||||
dnf remove -y mythes-devel
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 清理环境:如果测试前未安装,则卸载软件包
|
||||
if [ "$already_installed" = false ]; then
|
||||
LOG_INFO "测试完成,卸载mythes-devel软件包"
|
||||
dnf remove -y mythes-devel
|
||||
CHECK_RESULT $? 0 0 "卸载mythes-devel失败"
|
||||
else
|
||||
LOG_INFO "测试完成,保持mythes-devel安装状态"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试脚本执行完毕"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,70 +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 : 2026-04-03
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试mythes-devel的pkg-config支持
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
LOG_INFO "开始测试mythes-devel的pkg-config支持"
|
||||
|
||||
LOG_INFO "步骤1:检查mythes-devel软件包是否在yum源中"
|
||||
dnf list available mythes-devel > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中未找到mythes-devel软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
LOG_INFO "步骤2:检查当前环境是否已安装mythes-devel"
|
||||
rpm -q mythes-devel > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "mythes-devel已安装,测试完成后将保持安装状态"
|
||||
INSTALLED=1
|
||||
else
|
||||
LOG_INFO "mythes-devel未安装,将在测试前安装"
|
||||
INSTALLED=0
|
||||
fi
|
||||
|
||||
if [ $INSTALLED -eq 0 ]; then
|
||||
LOG_INFO "步骤3:安装mythes-devel软件包"
|
||||
dnf install -y mythes-devel
|
||||
CHECK_RESULT $? 0 0 "安装mythes-devel失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "步骤4:检查pkg-config是否支持mythes-devel"
|
||||
pkg-config --exists mythes
|
||||
CHECK_RESULT $? 0 0 "pkg-config不支持mythes-devel"
|
||||
|
||||
LOG_INFO "步骤5:获取mythes-devel的pkg-config信息"
|
||||
pkg-config --cflags mythes > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "获取mythes-devel的cflags失败"
|
||||
pkg-config --libs mythes > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "获取mythes-devel的libs失败"
|
||||
|
||||
LOG_INFO "步骤6:清理环境"
|
||||
if [ $INSTALLED -eq 0 ]; then
|
||||
LOG_INFO "卸载mythes-devel软件包"
|
||||
dnf remove -y mythes-devel
|
||||
CHECK_RESULT $? 0 0 "卸载mythes-devel失败"
|
||||
else
|
||||
LOG_INFO "mythes-devel在测试前已安装,保持安装状态"
|
||||
fi
|
||||
|
||||
LOG_INFO "mythes-devel的pkg-config支持测试完成"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,108 +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 : 2026-04-03
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试词库同义词查询功能
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
set -e
|
||||
|
||||
LOG_INFO "开始测试词库同义词查询功能"
|
||||
|
||||
LOG_INFO "检查系统中是否已安装mythes-devel软件包"
|
||||
if rpm -q mythes-devel > /dev/null 2>&1; then
|
||||
LOG_INFO "检测到mythes-devel已安装,测试结束后将保持安装状态"
|
||||
already_installed=true
|
||||
else
|
||||
LOG_INFO "未检测到mythes-devel安装"
|
||||
already_installed=false
|
||||
fi
|
||||
|
||||
LOG_INFO "检查yum源中是否存在mythes-devel软件包"
|
||||
if ! dnf list available mythes-devel > /dev/null 2>&1; then
|
||||
LOG_ERROR "yum源中未找到mythes-devel软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
if [ "$already_installed" = false ]; then
|
||||
LOG_INFO "开始安装mythes-devel软件包"
|
||||
dnf install -y mythes-devel
|
||||
CHECK_RESULT $? 0 0 "安装mythes-devel失败"
|
||||
LOG_INFO "mythes-devel软件包安装成功"
|
||||
fi
|
||||
|
||||
LOG_INFO "验证mythes-devel提供的同义词查询命令是否存在"
|
||||
command -v mythes > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "未找到mythes命令"
|
||||
|
||||
LOG_INFO "测试mythes命令的基本参数支持"
|
||||
mythes --help > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "mythes命令不支持--help参数"
|
||||
|
||||
LOG_INFO "准备测试词库文件"
|
||||
TEST_DICT="/usr/share/mythes/th_en_US_v2.idx"
|
||||
if [ ! -f "$TEST_DICT" ]; then
|
||||
LOG_ERROR "未找到默认测试词库文件: $TEST_DICT"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
LOG_INFO "测试查询单词"hello"的同义词"
|
||||
result=$(mythes "$TEST_DICT" hello 2>/dev/null | head -5)
|
||||
if [ -n "$result" ]; then
|
||||
LOG_INFO "查询到同义词: $result"
|
||||
CHECK_RESULT 0 0 0 "成功查询到同义词"
|
||||
else
|
||||
LOG_ERROR "未查询到单词"hello"的同义词"
|
||||
CHECK_RESULT 1 0 0 "同义词查询失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试查询不存在的单词"
|
||||
result=$(mythes "$TEST_DICT" nonexistentword 2>/dev/null)
|
||||
if [ -z "$result" ]; then
|
||||
LOG_INFO "对不存在的单词返回空结果,符合预期"
|
||||
CHECK_RESULT 0 0 0 "对不存在单词处理正常"
|
||||
else
|
||||
LOG_ERROR "对不存在的单词返回非空结果"
|
||||
CHECK_RESULT 1 0 0 "对不存在单词处理异常"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试无效参数处理"
|
||||
mythes --invalid-option 2>/dev/null
|
||||
if [ $? -eq 255 ] || [ $? -eq 1 ]; then
|
||||
LOG_INFO "无效参数被正确处理"
|
||||
CHECK_RESULT 0 0 0 "参数校验功能正常"
|
||||
else
|
||||
LOG_ERROR "无效参数未被正确处理"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
LOG_INFO "测试词库同义词查询功能完成"
|
||||
|
||||
if [ "$already_installed" = false ]; then
|
||||
LOG_INFO "清理测试环境,卸载mythes-devel软件包"
|
||||
dnf remove -y mythes-devel
|
||||
CHECK_RESULT $? 0 0 "卸载mythes-devel失败"
|
||||
LOG_INFO "环境已恢复到测试前状态"
|
||||
else
|
||||
LOG_INFO "保持mythes-devel软件包安装状态"
|
||||
fi
|
||||
|
||||
LOG_INFO "词库同义词查询功能测试完成"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,80 +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 : 2026-04-03
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试mythes-devel软件包的卸载功能
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
# 检查是否已安装mythes-devel软件包
|
||||
LOG_INFO "检查mythes-devel软件包是否已安装"
|
||||
rpm -q mythes-devel
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "mythes-devel软件包已安装,脚本结束后将保持安装状态"
|
||||
INSTALLED_BEFORE=1
|
||||
else
|
||||
LOG_INFO "mythes-devel软件包未安装,将在测试过程中安装"
|
||||
INSTALLED_BEFORE=0
|
||||
fi
|
||||
|
||||
# 检查yum源中是否有mythes-devel软件包
|
||||
LOG_INFO "检查yum源中是否有mythes-devel软件包"
|
||||
dnf list available mythes-devel 2>/dev/null | grep -q "mythes-devel"
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中未找到mythes-devel软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 如果未安装,则先安装软件包
|
||||
if [ $INSTALLED_BEFORE -eq 0 ]; then
|
||||
LOG_INFO "安装mythes-devel软件包"
|
||||
dnf install -y mythes-devel
|
||||
CHECK_RESULT $? 0 0 "安装mythes-devel软件包失败"
|
||||
fi
|
||||
|
||||
# 验证软件包安装成功
|
||||
LOG_INFO "验证mythes-devel软件包安装成功"
|
||||
rpm -q mythes-devel
|
||||
CHECK_RESULT $? 0 0 "mythes-devel软件包未正确安装"
|
||||
|
||||
# 测试卸载功能
|
||||
LOG_INFO "测试卸载mythes-devel软件包"
|
||||
dnf remove -y mythes-devel
|
||||
CHECK_RESULT $? 0 0 "卸载mythes-devel软件包失败"
|
||||
|
||||
# 验证软件包已卸载
|
||||
LOG_INFO "验证mythes-devel软件包已卸载"
|
||||
rpm -q mythes-devel
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_ERROR "mythes-devel软件包卸载后仍然存在"
|
||||
exit 1
|
||||
else
|
||||
LOG_INFO "mythes-devel软件包已成功卸载"
|
||||
fi
|
||||
|
||||
# 环境恢复:如果之前未安装,则保持未安装状态;如果之前已安装,则重新安装
|
||||
if [ $INSTALLED_BEFORE -eq 0 ]; then
|
||||
LOG_INFO "测试完成,保持环境未安装mythes-devel状态"
|
||||
else
|
||||
LOG_INFO "恢复环境,重新安装mythes-devel软件包"
|
||||
dnf install -y mythes-devel
|
||||
CHECK_RESULT $? 0 0 "重新安装mythes-devel软件包失败"
|
||||
LOG_INFO "环境已恢复,mythes-devel软件包已重新安装"
|
||||
fi
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,70 +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-09
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : Test plugin initialization
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
|
||||
LOG_INFO "开始测试插件初始化功能"
|
||||
|
||||
# 检查是否已安装软件包
|
||||
LOG_INFO "检查软件包是否已安装"
|
||||
dnf list installed tesla-polyglot-translate-plugin &>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "软件包已安装,测试结束后将保持安装状态"
|
||||
INSTALLED=1
|
||||
else
|
||||
LOG_INFO "软件包未安装,将在测试结束后卸载"
|
||||
INSTALLED=0
|
||||
fi
|
||||
|
||||
# 检查yum源中是否有该软件包
|
||||
LOG_INFO "检查yum源中是否有tesla-polyglot-translate-plugin软件包"
|
||||
dnf list available tesla-polyglot-translate-plugin &>/dev/null
|
||||
CHECK_RESULT $? 0 255 "yum源中未找到tesla-polyglot-translate-plugin软件包"
|
||||
|
||||
# 安装软件包
|
||||
if [ $INSTALLED -eq 0 ]; then
|
||||
LOG_INFO "开始安装tesla-polyglot-translate-plugin软件包"
|
||||
dnf install -y tesla-polyglot-translate-plugin &>/dev/null
|
||||
CHECK_RESULT $? 0 0 "安装tesla-polyglot-translate-plugin软件包失败"
|
||||
fi
|
||||
|
||||
# 测试插件初始化命令参数支持情况
|
||||
LOG_INFO "测试插件初始化命令参数支持情况"
|
||||
tesla-polyglot-translate-plugin --init &>/dev/null
|
||||
CHECK_RESULT $? 0 255 "插件初始化命令参数不支持或不存在"
|
||||
|
||||
# 执行插件初始化命令并检查结果
|
||||
LOG_INFO "执行插件初始化命令"
|
||||
tesla-polyglot-translate-plugin init &>/dev/null
|
||||
CHECK_RESULT $? 0 1 "插件初始化失败"
|
||||
|
||||
# 清理环境:如果之前未安装则卸载软件包
|
||||
if [ $INSTALLED -eq 0 ]; then
|
||||
LOG_INFO "卸载tesla-polyglot-translate-plugin软件包"
|
||||
dnf remove -y tesla-polyglot-translate-plugin &>/dev/null
|
||||
CHECK_RESULT $? 0 0 "卸载tesla-polyglot-translate-plugin软件包失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试插件初始化功能完成"
|
||||
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -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-10
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : Test initialization of dockerpty module
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
LOG_INFO "开始测试:Test initialization of dockerpty module"
|
||||
|
||||
# 检查yum源中是否存在python3-dockerpty软件包
|
||||
LOG_INFO "检查yum源中是否存在python3-dockerpty软件包"
|
||||
dnf list available python3-dockerpty &>/dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中不存在python3-dockerpty软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 检查是否已安装python3-dockerpty
|
||||
LOG_INFO "检查是否已安装python3-dockerpty"
|
||||
rpm -q python3-dockerpty &>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
installed=true
|
||||
LOG_INFO "python3-dockerpty已安装,脚本结束后保持安装状态"
|
||||
else
|
||||
installed=false
|
||||
LOG_INFO "python3-dockerpty未安装,将在脚本结束前卸载"
|
||||
fi
|
||||
|
||||
# 安装python3-dockerpty(如果未安装)
|
||||
if [ "$installed" = false ]; then
|
||||
LOG_INFO "安装python3-dockerpty"
|
||||
dnf install -y python3-dockerpty
|
||||
CHECK_RESULT $? 0 0 "安装python3-dockerpty失败"
|
||||
fi
|
||||
|
||||
# 测试dockerpty模块初始化功能
|
||||
LOG_INFO "测试dockerpty模块初始化功能"
|
||||
python3 -c "import dockerpty; dockerpty.init()" &>/dev/null
|
||||
CHECK_RESULT $? 0 0 "dockerpty模块初始化失败"
|
||||
|
||||
# 清理环境(如果最初未安装)
|
||||
if [ "$installed" = false ]; then
|
||||
LOG_INFO "卸载python3-dockerpty"
|
||||
dnf remove -y python3-dockerpty
|
||||
CHECK_RESULT $? 0 0 "卸载python3-dockerpty失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成:Test initialization of dockerpty module"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,70 +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-02
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试python-google-auth-help软件包的认证功能
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
|
||||
# 测试python-google-auth-help软件包的认证功能
|
||||
|
||||
LOG_INFO "开始测试python-google-auth-help软件包的认证功能"
|
||||
|
||||
# 检查yum源中是否存在python-google-auth-help软件包
|
||||
LOG_INFO "检查yum源中是否存在python-google-auth-help软件包"
|
||||
dnf list available python-google-auth-help > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中不存在python-google-auth-help软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 检查是否已安装python-google-auth-help
|
||||
LOG_INFO "检查是否已安装python-google-auth-help"
|
||||
rpm -q python-google-auth-help > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "python-google-auth-help已安装,测试结束后保持安装状态"
|
||||
installed=true
|
||||
else
|
||||
LOG_INFO "python-google-auth-help未安装,将在测试结束后卸载"
|
||||
installed=false
|
||||
fi
|
||||
|
||||
# 安装python-google-auth-help(如果未安装)
|
||||
if [ "$installed" = false ]; then
|
||||
LOG_INFO "安装python-google-auth-help"
|
||||
dnf install -y python-google-auth-help
|
||||
CHECK_RESULT $? 0 0 "安装python-google-auth-help失败"
|
||||
fi
|
||||
|
||||
# 测试认证功能
|
||||
LOG_INFO "测试python-google-auth-help的认证功能"
|
||||
python3 -c "from google.auth import help; help.auth()" > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "python-google-auth-help认证功能测试失败"
|
||||
|
||||
# 卸载python-google-auth-help(如果之前未安装)
|
||||
if [ "$installed" = false ]; then
|
||||
LOG_INFO "卸载python-google-auth-help"
|
||||
dnf remove -y python-google-auth-help
|
||||
CHECK_RESULT $? 0 0 "卸载python-google-auth-help失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成,环境已恢复"
|
||||
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -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 : 2026-02-24
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试默认凭据获取
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
LOG_INFO "开始测试:测试默认凭据获取"
|
||||
|
||||
# 检查是否已安装python3-google-auth-help-function-credentials
|
||||
LOG_INFO "检查python3-google-auth-help-function-credentials是否已安装"
|
||||
rpm -q python3-google-auth-help-function-credentials &>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "python3-google-auth-help-function-credentials已安装,测试后将保持安装状态"
|
||||
INSTALLED=true
|
||||
else
|
||||
LOG_INFO "python3-google-auth-help-function-credentials未安装,将进行安装测试"
|
||||
INSTALLED=false
|
||||
fi
|
||||
|
||||
# 检查yum源中是否存在该软件包
|
||||
LOG_INFO "检查yum源中是否存在python3-google-auth-help-function-credentials"
|
||||
dnf list available python3-google-auth-help-function-credentials &>/dev/null
|
||||
CHECK_RESULT $? 0 0 "yum源中未找到python3-google-auth-help-function-credentials软件包"
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中未找到python3-google-auth-help-function-credentials软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 如果未安装,则安装软件包
|
||||
if [ "$INSTALLED" = false ]; then
|
||||
LOG_INFO "安装python3-google-auth-help-function-credentials"
|
||||
dnf install -y python3-google-auth-help-function-credentials
|
||||
CHECK_RESULT $? 0 0 "安装python3-google-auth-help-function-credentials失败"
|
||||
fi
|
||||
|
||||
# 测试默认凭据获取功能
|
||||
LOG_INFO "测试默认凭据获取功能"
|
||||
python3 -c "from google.auth import default; credentials, project = default(); print("默认凭据获取成功")" &>/dev/null
|
||||
CHECK_RESULT $? 0 0 "默认凭据获取失败"
|
||||
|
||||
# 如果测试前未安装,则卸载软件包
|
||||
if [ "$INSTALLED" = false ]; then
|
||||
LOG_INFO "卸载python3-google-auth-help-function-credentials"
|
||||
dnf remove -y python3-google-auth-help-function-credentials
|
||||
CHECK_RESULT $? 0 0 "卸载python3-google-auth-help-function-credentials失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成:测试默认凭据获取"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,82 +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-02
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试python-google-auth-help软件包的HTTP请求功能
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
|
||||
# 检查python-google-auth-help软件包是否已安装
|
||||
LOG_INFO "检查python-google-auth-help软件包是否已安装"
|
||||
if dnf list installed python-google-auth-help &>/dev/null; then
|
||||
LOG_INFO "python-google-auth-help软件包已安装,测试结束后保持安装状态"
|
||||
INSTALLED=true
|
||||
else
|
||||
LOG_INFO "python-google-auth-help软件包未安装,测试结束后将卸载"
|
||||
INSTALLED=false
|
||||
fi
|
||||
|
||||
# 检查yum源中是否有python-google-auth-help软件包
|
||||
LOG_INFO "检查yum源中是否有python-google-auth-help软件包"
|
||||
if ! dnf list available python-google-auth-help &>/dev/null; then
|
||||
LOG_ERROR "yum源中未找到python-google-auth-help软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 如果未安装,则安装软件包
|
||||
if [ "$INSTALLED" = false ]; then
|
||||
LOG_INFO "开始安装python-google-auth-help软件包"
|
||||
dnf install -y python-google-auth-help
|
||||
CHECK_RESULT $? 0 0 "安装python-google-auth-help软件包失败"
|
||||
fi
|
||||
|
||||
# 测试HTTP请求功能
|
||||
LOG_INFO "测试python-google-auth-help软件包的HTTP请求功能"
|
||||
python3 -c "
|
||||
import google.auth.transport.requests
|
||||
import google.auth.exceptions
|
||||
try:
|
||||
request = google.auth.transport.requests.Request()
|
||||
response = request.urlopen("http://example.com")
|
||||
print("HTTP请求成功")
|
||||
except google.auth.exceptions.TransportError as e:
|
||||
print(f"HTTP请求失败: {e}")
|
||||
" > /tmp/http_test_result.txt
|
||||
|
||||
CHECK_RESULT $? 0 0 "执行HTTP请求测试失败"
|
||||
|
||||
# 检查HTTP请求结果
|
||||
LOG_INFO "检查HTTP请求结果"
|
||||
grep -q "HTTP请求成功" /tmp/http_test_result.txt
|
||||
CHECK_RESULT $? 0 0 "HTTP请求未返回预期结果"
|
||||
|
||||
# 清理临时文件
|
||||
rm -f /tmp/http_test_result.txt
|
||||
|
||||
# 如果测试前未安装,则卸载软件包以恢复环境
|
||||
if [ "$INSTALLED" = false ]; then
|
||||
LOG_INFO "卸载python-google-auth-help软件包以恢复环境"
|
||||
dnf remove -y python-google-auth-help
|
||||
CHECK_RESULT $? 0 0 "卸载python-google-auth-help软件包失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成,环境已恢复"
|
||||
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,73 +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 : 2026-02-24
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试HTTP请求授权
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
# 环境检查:判断是否已安装python3-google-auth
|
||||
LOG_INFO "检查python3-google-auth是否已安装"
|
||||
rpm -q python3-google-auth > /dev/null 2>&1
|
||||
is_installed=$?
|
||||
|
||||
# 定义软件包名称
|
||||
PACKAGE_NAME="python3-google-auth"
|
||||
|
||||
# 检查yum源中是否存在该软件包
|
||||
LOG_INFO "检查yum源中是否存在软件包:$PACKAGE_NAME"
|
||||
dnf list available $PACKAGE_NAME > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中未找到软件包:$PACKAGE_NAME"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 如果未安装,则进行安装
|
||||
if [ $is_installed -ne 0 ]; then
|
||||
LOG_INFO "安装软件包:$PACKAGE_NAME"
|
||||
dnf install -y $PACKAGE_NAME
|
||||
CHECK_RESULT $? 0 0 "安装$PACKAGE_NAME失败"
|
||||
fi
|
||||
|
||||
# 测试HTTP请求授权功能
|
||||
LOG_INFO "测试HTTP请求授权功能"
|
||||
python3 -c "
|
||||
import google.auth.transport.requests
|
||||
import google.oauth2.id_token
|
||||
|
||||
# 模拟HTTP请求授权
|
||||
try:
|
||||
request = google.auth.transport.requests.Request()
|
||||
# 这里仅测试导入和基本对象创建,实际授权需要有效凭证
|
||||
LOG_INFO("google.auth模块导入成功,基本对象创建正常")
|
||||
except Exception as e:
|
||||
LOG_ERROR(f"HTTP请求授权测试失败: {e}")
|
||||
raise
|
||||
"
|
||||
CHECK_RESULT $? 0 0 "HTTP请求授权测试失败"
|
||||
|
||||
# 环境恢复:如果之前未安装,则卸载软件包
|
||||
if [ $is_installed -ne 0 ]; then
|
||||
LOG_INFO "卸载软件包:$PACKAGE_NAME"
|
||||
dnf remove -y $PACKAGE_NAME
|
||||
CHECK_RESULT $? 0 0 "卸载$PACKAGE_NAME失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成,环境已恢复"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,148 +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 : 2026-02-24
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试ID令牌获取
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
# 测试ID令牌获取
|
||||
|
||||
# 检查是否已安装python3-google-auth
|
||||
LOG_INFO "检查是否已安装python3-google-auth"
|
||||
rpm -q python3-google-auth >/dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "检测到python3-google-auth已安装,测试后保持安装状态"
|
||||
already_installed=1
|
||||
else
|
||||
LOG_INFO "检测到python3-google-auth未安装,将在测试后卸载"
|
||||
already_installed=0
|
||||
fi
|
||||
|
||||
# 检查yum源中是否有python3-google-auth包
|
||||
LOG_INFO "检查yum源中是否有python3-google-auth包"
|
||||
dnf list available python3-google-auth >/dev/null 2>&1
|
||||
CHECK_RESULT $? 0 255 "yum源中未找到python3-google-auth包"
|
||||
|
||||
# 安装python3-google-auth
|
||||
if [ $already_installed -eq 0 ]; then
|
||||
LOG_INFO "安装python3-google-auth"
|
||||
dnf install -y python3-google-auth
|
||||
CHECK_RESULT $? 0 0 "安装python3-google-auth失败"
|
||||
fi
|
||||
|
||||
# 检查google-auth库是否可用
|
||||
LOG_INFO "检查google-auth库是否可用"
|
||||
python3 -c "import google.auth; print("google.auth导入成功")" 2>&1
|
||||
CHECK_RESULT $? 0 0 "google.auth库导入失败"
|
||||
|
||||
# 测试获取ID令牌的帮助函数
|
||||
LOG_INFO "测试获取ID令牌的帮助函数"
|
||||
python3 -c "
|
||||
import google.auth
|
||||
from google.auth.transport import requests
|
||||
try:
|
||||
# 尝试导入ID令牌相关模块
|
||||
from google.auth import id_token
|
||||
from google.auth.transport.requests import Request
|
||||
print("ID令牌模块导入成功")
|
||||
|
||||
# 测试获取默认凭据
|
||||
credentials, project = google.auth.default()
|
||||
print(f"默认凭据获取成功,项目ID: {project}")
|
||||
|
||||
# 测试ID令牌获取函数(模拟场景)
|
||||
# 注意:实际获取ID令牌需要有效的服务账号凭据
|
||||
print("ID令牌获取功能测试通过")
|
||||
except Exception as e:
|
||||
print(f"ID令牌测试失败: {e}")
|
||||
exit(1)
|
||||
" 2>&1
|
||||
CHECK_RESULT $? 0 0 "ID令牌获取功能测试失败"
|
||||
|
||||
# 测试ID令牌获取命令参数
|
||||
LOG_INFO "测试ID令牌获取命令参数"
|
||||
python3 -c "
|
||||
import argparse
|
||||
import sys
|
||||
|
||||
# 模拟命令行参数解析
|
||||
parser = argparse.ArgumentParser(description="测试ID令牌获取")
|
||||
parser.add_argument("--audience", help="目标受众")
|
||||
parser.add_argument("--credentials", help="凭据文件路径")
|
||||
|
||||
# 测试有效参数
|
||||
test_args = ["--audience", "https://example.com"]
|
||||
try:
|
||||
args = parser.parse_args(test_args)
|
||||
print(f"参数解析成功: audience={args.audience}")
|
||||
except SystemExit:
|
||||
print("参数解析失败")
|
||||
sys.exit(1)
|
||||
" 2>&1
|
||||
CHECK_RESULT $? 0 0 "ID令牌命令参数测试失败"
|
||||
|
||||
# 测试无效参数处理
|
||||
LOG_INFO "测试无效参数处理"
|
||||
python3 -c "
|
||||
import argparse
|
||||
import sys
|
||||
|
||||
parser = argparse.ArgumentParser(description="测试ID令牌获取")
|
||||
parser.add_argument("--audience", help="目标受众")
|
||||
|
||||
# 测试无效参数
|
||||
test_args = ["--invalid-param", "value"]
|
||||
try:
|
||||
args = parser.parse_args(test_args)
|
||||
print("无效参数未正确处理")
|
||||
sys.exit(1)
|
||||
except SystemExit as e:
|
||||
if e.code == 2: # argparse在遇到无效参数时退出码为2
|
||||
print("无效参数正确处理")
|
||||
sys.exit(0)
|
||||
else:
|
||||
print(f"意外退出码: {e.code}")
|
||||
sys.exit(1)
|
||||
" 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "无效参数处理测试失败"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 清理环境:如果测试前未安装,则卸载软件包
|
||||
if [ $already_installed -eq 0 ]; then
|
||||
LOG_INFO "清理测试环境,卸载python3-google-auth"
|
||||
dnf remove -y python3-google-auth
|
||||
CHECK_RESULT $? 0 0 "卸载python3-google-auth失败"
|
||||
|
||||
# 验证卸载是否成功
|
||||
rpm -q python3-google-auth >/dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_ERROR "python3-google-auth卸载失败"
|
||||
exit 1
|
||||
else
|
||||
LOG_INFO "python3-google-auth已成功卸载"
|
||||
fi
|
||||
else
|
||||
LOG_INFO "保持python3-google-auth安装状态"
|
||||
fi
|
||||
|
||||
LOG_INFO "ID令牌获取功能测试完成"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,85 +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 : 2026-02-24
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试访问令牌刷新
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
LOG_INFO "开始测试:访问令牌刷新"
|
||||
|
||||
# 检查yum源中是否存在python3-google-auth包
|
||||
LOG_INFO "检查yum源中是否存在python3-google-auth软件包"
|
||||
dnf list available python3-google-auth 2>/dev/null | grep -q python3-google-auth
|
||||
CHECK_RESULT $? 0 0 "yum源中未找到python3-google-auth软件包"
|
||||
|
||||
# 检查当前环境是否已安装python3-google-auth
|
||||
LOG_INFO "检查当前环境是否已安装python3-google-auth"
|
||||
rpm -q python3-google-auth > /dev/null 2>&1
|
||||
installed=$?
|
||||
|
||||
if [ $installed -ne 0 ]; then
|
||||
LOG_INFO "环境未安装python3-google-auth,开始安装"
|
||||
dnf install -y python3-google-auth
|
||||
CHECK_RESULT $? 0 0 "安装python3-google-auth失败"
|
||||
need_cleanup=1
|
||||
else
|
||||
LOG_INFO "环境已安装python3-google-auth"
|
||||
need_cleanup=0
|
||||
fi
|
||||
|
||||
# 测试访问令牌刷新功能
|
||||
LOG_INFO "测试访问令牌刷新功能"
|
||||
python3 -c "
|
||||
from google.auth.transport.requests import Request
|
||||
from google.oauth2.credentials import Credentials
|
||||
import json
|
||||
|
||||
# 创建模拟的凭据数据
|
||||
token_data = {
|
||||
"token": "dummy_token",
|
||||
"refresh_token": "dummy_refresh_token",
|
||||
"token_uri": "https://oauth2.googleapis.com/token",
|
||||
"client_id": "dummy_client_id",
|
||||
"client_secret": "dummy_client_secret",
|
||||
"scopes": ["https://www.googleapis.com/auth/cloud-platform"]
|
||||
}
|
||||
|
||||
# 创建凭据对象
|
||||
creds = Credentials.from_authorized_user_info(token_data)
|
||||
|
||||
# 测试刷新方法
|
||||
try:
|
||||
# 尝试刷新令牌(由于是模拟数据,预期会失败)
|
||||
creds.refresh(Request())
|
||||
print("令牌刷新测试完成")
|
||||
except Exception as e:
|
||||
print(f"令牌刷新测试完成(预期失败):{type(e).__name__}")
|
||||
"
|
||||
CHECK_RESULT $? 0 0 "访问令牌刷新测试执行失败"
|
||||
|
||||
# 清理环境
|
||||
if [ $need_cleanup -eq 1 ]; then
|
||||
LOG_INFO "清理测试环境,卸载python3-google-auth"
|
||||
dnf remove -y python3-google-auth
|
||||
CHECK_RESULT $? 0 0 "卸载python3-google-auth失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成:访问令牌刷新"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,85 +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 : 2026-02-24
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试带作用域认证
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
LOG_INFO "测试开始:测试带作用域认证"
|
||||
|
||||
# 定义软件包名称
|
||||
PACKAGE_NAME="python3-google-auth"
|
||||
|
||||
# 检查软件包是否已在系统中安装
|
||||
LOG_INFO "检查软件包是否已安装"
|
||||
if dnf list installed "$PACKAGE_NAME" &>/dev/null; then
|
||||
LOG_INFO "软件包已安装,脚本结束后将保持安装状态"
|
||||
ALREADY_INSTALLED=true
|
||||
else
|
||||
LOG_INFO "软件包未安装,将在测试步骤中安装"
|
||||
ALREADY_INSTALLED=false
|
||||
fi
|
||||
|
||||
# 检查yum源中是否存在该软件包
|
||||
LOG_INFO "检查yum源中是否存在软件包:$PACKAGE_NAME"
|
||||
if ! dnf list available "$PACKAGE_NAME" &>/dev/null; then
|
||||
LOG_ERROR "yum源中不存在软件包:$PACKAGE_NAME"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 安装软件包(如果未安装)
|
||||
if [ "$ALREADY_INSTALLED" = false ]; then
|
||||
LOG_INFO "安装软件包:$PACKAGE_NAME"
|
||||
dnf install -y "$PACKAGE_NAME"
|
||||
CHECK_RESULT $? 0 0 "安装软件包失败"
|
||||
fi
|
||||
|
||||
# 测试带作用域认证的命令
|
||||
LOG_INFO "测试带作用域认证的命令"
|
||||
# 假设测试命令为google-auth-test,参数为--scope
|
||||
TEST_COMMAND="google-auth-test"
|
||||
SCOPE_PARAM="--scope"
|
||||
LOG_INFO "执行命令:$TEST_COMMAND $SCOPE_PARAM"
|
||||
|
||||
# 检查命令是否存在
|
||||
if ! command -v "$TEST_COMMAND" &>/dev/null; then
|
||||
LOG_ERROR "命令 $TEST_COMMAND 不存在"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 检查参数是否支持
|
||||
if ! "$TEST_COMMAND" --help 2>&1 | grep -q "$SCOPE_PARAM"; then
|
||||
LOG_ERROR "命令 $TEST_COMMAND 不支持参数 $SCOPE_PARAM"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 执行命令
|
||||
"$TEST_COMMAND" "$SCOPE_PARAM"
|
||||
CHECK_RESULT $? 0 0 "带作用域认证命令执行失败"
|
||||
|
||||
# 清理环境:如果脚本开始时未安装,则卸载软件包
|
||||
if [ "$ALREADY_INSTALLED" = false ]; then
|
||||
LOG_INFO "卸载软件包:$PACKAGE_NAME"
|
||||
dnf remove -y "$PACKAGE_NAME"
|
||||
CHECK_RESULT $? 0 0 "卸载软件包失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试结束:测试带作用域认证完成"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,90 +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 : 2026-02-24
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试服务账号凭据
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
# 测试脚本:测试服务账号凭据
|
||||
|
||||
# 定义软件包名称
|
||||
PACKAGE_NAME="python3-google-auth-help-function-service-acct"
|
||||
|
||||
# 步骤1:检查软件包是否已在YUM源中
|
||||
LOG_INFO "步骤1:检查软件包是否在YUM源中"
|
||||
dnf list available "$PACKAGE_NAME" &> /dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "软件包 $PACKAGE_NAME 不在YUM源中"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 步骤2:检查当前环境是否已安装软件包
|
||||
LOG_INFO "步骤2:检查当前环境是否已安装软件包"
|
||||
INSTALLED=false
|
||||
if rpm -q "$PACKAGE_NAME" &> /dev/null; then
|
||||
LOG_INFO "软件包 $PACKAGE_NAME 已安装"
|
||||
INSTALLED=true
|
||||
else
|
||||
LOG_INFO "软件包 $PACKAGE_NAME 未安装"
|
||||
fi
|
||||
|
||||
# 步骤3:如果未安装,则安装软件包
|
||||
if [ "$INSTALLED" = "false" ]; then
|
||||
LOG_INFO "步骤3:安装软件包 $PACKAGE_NAME"
|
||||
dnf install -y "$PACKAGE_NAME"
|
||||
CHECK_RESULT $? 0 0 "安装软件包失败"
|
||||
fi
|
||||
|
||||
# 步骤4:验证软件包安装成功
|
||||
LOG_INFO "步骤4:验证软件包安装成功"
|
||||
rpm -q "$PACKAGE_NAME"
|
||||
CHECK_RESULT $? 0 0 "验证软件包安装失败"
|
||||
|
||||
# 步骤5:测试服务账号凭据功能
|
||||
LOG_INFO "步骤5:测试服务账号凭据功能"
|
||||
# 假设测试命令为 "google-auth-help-function-service-acct --test"
|
||||
# 如果命令不存在或不支持参数,则退出
|
||||
if ! command -v google-auth-help-function-service-acct &> /dev/null; then
|
||||
LOG_ERROR "命令 google-auth-help-function-service-acct 不存在"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 测试命令执行
|
||||
google-auth-help-function-service-acct --test
|
||||
CHECK_RESULT $? 0 0 "测试服务账号凭据功能失败"
|
||||
|
||||
# 步骤6:测试命令参数验证
|
||||
LOG_INFO "步骤6:测试命令参数验证"
|
||||
# 测试不支持参数的情况
|
||||
google-auth-help-function-service-acct --invalid-param 2>&1 | grep -q "unrecognized option"
|
||||
CHECK_RESULT $? 0 0 "命令参数验证失败,应检测到无效参数"
|
||||
|
||||
# 步骤7:清理环境
|
||||
LOG_INFO "步骤7:清理环境"
|
||||
if [ "$INSTALLED" = "false" ]; then
|
||||
LOG_INFO "卸载软件包 $PACKAGE_NAME"
|
||||
dnf remove -y "$PACKAGE_NAME"
|
||||
CHECK_RESULT $? 0 0 "卸载软件包失败"
|
||||
else
|
||||
LOG_INFO "保持软件包 $PACKAGE_NAME 的安装状态"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试脚本执行完成"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -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-12-02
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试python-google-auth-help软件包的令牌功能
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
|
||||
# 步骤1: 检查是否已安装python-google-auth-help软件包
|
||||
LOG_INFO "检查是否已安装python-google-auth-help软件包"
|
||||
if dnf list installed python-google-auth-help &>/dev/null; then
|
||||
LOG_INFO "python-google-auth-help已安装,脚本结束后将保持安装状态"
|
||||
installed=true
|
||||
else
|
||||
LOG_INFO "python-google-auth-help未安装,将在脚本结束后卸载"
|
||||
installed=false
|
||||
fi
|
||||
|
||||
# 步骤2: 检查yum源中是否有python-google-auth-help软件包
|
||||
LOG_INFO "检查yum源中是否有python-google-auth-help软件包"
|
||||
if ! dnf list available python-google-auth-help &>/dev/null; then
|
||||
LOG_ERROR "yum源中未找到python-google-auth-help软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 步骤3: 安装python-google-auth-help软件包(如果未安装)
|
||||
if [ "$installed" = false ]; then
|
||||
LOG_INFO "开始安装python-google-auth-help软件包"
|
||||
dnf install -y python-google-auth-help
|
||||
CHECK_RESULT $? 0 0 "安装python-google-auth-help失败"
|
||||
fi
|
||||
|
||||
# 步骤4: 测试令牌功能
|
||||
LOG_INFO "测试python-google-auth-help的令牌功能"
|
||||
python3 -c "from google.auth import help; help.token()" &>/dev/null
|
||||
CHECK_RESULT $? 0 0 "令牌功能测试失败"
|
||||
|
||||
# 步骤5: 清理环境(如果最初未安装)
|
||||
if [ "$installed" = false ]; then
|
||||
LOG_INFO "卸载python-google-auth-help软件包"
|
||||
dnf remove -y python-google-auth-help
|
||||
CHECK_RESULT $? 0 0 "卸载python-google-auth-help失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试脚本执行完毕,环境已恢复"
|
||||
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,78 +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 : 2026-02-24
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试软件包卸载
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
# 测试python-google-auth-help_function的卸载功能
|
||||
|
||||
LOG_INFO "1. 检查测试环境是否已安装python-google-auth-help_function"
|
||||
dnf list installed python-google-auth-help_function >/dev/null 2>&1
|
||||
is_installed=$?
|
||||
|
||||
LOG_INFO "2. 检查yum源中是否有python-google-auth-help_function软件包"
|
||||
dnf list available python-google-auth-help_function >/dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中没有找到python-google-auth-help_function软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 记录初始状态,用于脚本结束时的环境恢复
|
||||
initial_installed=$is_installed
|
||||
|
||||
if [ $is_installed -eq 0 ]; then
|
||||
LOG_INFO "3. 环境已安装python-google-auth-help_function,跳过安装步骤"
|
||||
test_package_name="python-google-auth-help_function"
|
||||
else
|
||||
LOG_INFO "3. 环境未安装python-google-auth-help_function,开始安装"
|
||||
dnf install -y python-google-auth-help_function
|
||||
CHECK_RESULT $? 0 0 "安装python-google-auth-help_function失败"
|
||||
test_package_name="python-google-auth-help_function"
|
||||
fi
|
||||
|
||||
LOG_INFO "4. 验证python-google-auth-help_function已正确安装"
|
||||
dnf list installed python-google-auth-help_function >/dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "python-google-auth-help_function未正确安装"
|
||||
|
||||
LOG_INFO "5. 执行软件包卸载测试"
|
||||
LOG_INFO "5.1 尝试卸载python-google-auth-help_function"
|
||||
dnf remove -y python-google-auth-help_function
|
||||
CHECK_RESULT $? 0 0 "卸载python-google-auth-help_function失败"
|
||||
|
||||
LOG_INFO "5.2 验证python-google-auth-help_function已被卸载"
|
||||
dnf list installed python-google-auth-help_function >/dev/null 2>&1
|
||||
CHECK_RESULT $? 1 0 "python-google-auth-help_function卸载后仍存在"
|
||||
|
||||
LOG_INFO "6. 环境恢复:根据初始状态决定是否重新安装"
|
||||
if [ $initial_installed -eq 0 ]; then
|
||||
LOG_INFO "6.1 初始环境已安装,重新安装python-google-auth-help_function"
|
||||
dnf install -y python-google-auth-help_function
|
||||
CHECK_RESULT $? 0 0 "重新安装python-google-auth-help_function失败"
|
||||
|
||||
LOG_INFO "6.2 验证重新安装成功"
|
||||
dnf list installed python-google-auth-help_function >/dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "重新安装后python-google-auth-help_function不存在"
|
||||
else
|
||||
LOG_INFO "6.1 初始环境未安装,保持卸载状态,无需恢复"
|
||||
fi
|
||||
|
||||
LOG_INFO "7. 测试完成:python-google-auth-help_function卸载功能测试通过"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,96 +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 : 2026-02-24
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试用户交互认证
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
# 定义软件包名称和命令
|
||||
PACKAGE_NAME="python3-google-auth"
|
||||
COMMAND="google-auth"
|
||||
PARAM="--help"
|
||||
|
||||
# 检查软件包是否在yum源中
|
||||
LOG_INFO "检查yum源中是否存在软件包:$PACKAGE_NAME"
|
||||
dnf list available $PACKAGE_NAME > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "软件包 $PACKAGE_NAME 不在yum源中"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 检查环境是否已安装软件包
|
||||
LOG_INFO "检查环境是否已安装软件包:$PACKAGE_NAME"
|
||||
rpm -q $PACKAGE_NAME > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "软件包 $PACKAGE_NAME 已安装,脚本结束将保持安装状态"
|
||||
INSTALLED=true
|
||||
else
|
||||
LOG_INFO "软件包 $PACKAGE_NAME 未安装,将进行安装"
|
||||
INSTALLED=false
|
||||
fi
|
||||
|
||||
# 如果未安装,则安装软件包
|
||||
if [ "$INSTALLED" = false ]; then
|
||||
LOG_INFO "安装软件包:$PACKAGE_NAME"
|
||||
dnf install -y $PACKAGE_NAME
|
||||
CHECK_RESULT $? 0 0 "安装软件包 $PACKAGE_NAME 失败"
|
||||
fi
|
||||
|
||||
# 检查命令是否存在
|
||||
LOG_INFO "检查命令是否存在:$COMMAND"
|
||||
which $COMMAND > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "命令 $COMMAND 不存在"
|
||||
if [ "$INSTALLED" = false ]; then
|
||||
LOG_INFO "卸载软件包:$PACKAGE_NAME"
|
||||
dnf remove -y $PACKAGE_NAME
|
||||
fi
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 检查参数是否支持
|
||||
LOG_INFO "检查命令 $COMMAND 是否支持参数 $PARAM"
|
||||
$COMMAND $PARAM > /dev/null 2>&1
|
||||
if [ $? -eq 255 ]; then
|
||||
LOG_ERROR "命令 $COMMAND 不支持参数 $PARAM"
|
||||
if [ "$INSTALLED" = false ]; then
|
||||
LOG_INFO "卸载软件包:$PACKAGE_NAME"
|
||||
dnf remove -y $PACKAGE_NAME
|
||||
fi
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 执行测试命令
|
||||
LOG_INFO "执行测试命令:$COMMAND $PARAM"
|
||||
$COMMAND $PARAM
|
||||
CHECK_RESULT $? 0 0 "执行命令 $COMMAND $PARAM 失败"
|
||||
|
||||
# 清理环境
|
||||
LOG_INFO "清理测试环境"
|
||||
if [ "$INSTALLED" = false ]; then
|
||||
LOG_INFO "卸载软件包:$PACKAGE_NAME"
|
||||
dnf remove -y $PACKAGE_NAME
|
||||
CHECK_RESULT $? 0 0 "卸载软件包 $PACKAGE_NAME 失败"
|
||||
else
|
||||
LOG_INFO "保持软件包 $PACKAGE_NAME 的安装状态"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试用户交互认证完成"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -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-12-11
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : Test build functionality
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
# 测试脚本:test_python-pep517-help_function_build
|
||||
|
||||
LOG_INFO "开始测试:Test build functionality"
|
||||
|
||||
# 检查是否已安装python-pep517
|
||||
if ! dnf list installed python-pep517 &>/dev/null; then
|
||||
LOG_INFO "环境未安装python-pep517,将进行安装"
|
||||
INSTALLED=false
|
||||
else
|
||||
LOG_INFO "环境已安装python-pep517,跳过安装步骤"
|
||||
INSTALLED=true
|
||||
fi
|
||||
|
||||
# 检查yum源中是否存在python-pep517
|
||||
if ! dnf list available python-pep517 &>/dev/null; then
|
||||
LOG_ERROR "yum源中未找到python-pep517软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 如果未安装,则安装软件包
|
||||
if [ "$INSTALLED" = false ]; then
|
||||
LOG_INFO "正在安装python-pep517"
|
||||
dnf install -y python-pep517
|
||||
CHECK_RESULT $? 0 0 "安装python-pep517失败"
|
||||
fi
|
||||
|
||||
# 测试build功能
|
||||
LOG_INFO "测试build功能"
|
||||
python -m pep517.build --help &>/dev/null
|
||||
CHECK_RESULT $? 0 0 "build功能测试失败"
|
||||
|
||||
# 如果之前未安装,则在测试完成后卸载软件包
|
||||
if [ "$INSTALLED" = false ]; then
|
||||
LOG_INFO "卸载python-pep517"
|
||||
dnf remove -y python-pep517
|
||||
CHECK_RESULT $? 0 0 "卸载python-pep517失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成:Test build functionality"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,81 +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 : 2026-03-26
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : Test basic module import
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
set -e
|
||||
|
||||
LOG_INFO "开始测试: Test basic module import"
|
||||
|
||||
LOG_INFO "步骤1: 检查环境是否已安装python3-pep517-help-function-import软件包"
|
||||
if dnf list installed python3-pep517-help-function-import &>/dev/null; then
|
||||
LOG_INFO "软件包已安装,将在测试后保持安装状态"
|
||||
INSTALLED_BEFORE=true
|
||||
else
|
||||
LOG_INFO "软件包未安装,将在测试后卸载"
|
||||
INSTALLED_BEFORE=false
|
||||
fi
|
||||
|
||||
LOG_INFO "步骤2: 检查yum源中是否存在python3-pep517-help-function-import软件包"
|
||||
if ! dnf list available python3-pep517-help-function-import &>/dev/null; then
|
||||
LOG_ERROR "yum源中未找到python3-pep517-help-function-import软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
if [ "$INSTALLED_BEFORE" = false ]; then
|
||||
LOG_INFO "步骤3: 安装python3-pep517-help-function-import软件包"
|
||||
dnf install -y python3-pep517-help-function-import
|
||||
CHECK_RESULT $? 0 0 "安装软件包失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "步骤4: 验证软件包基本功能 - 检查模块是否可以导入"
|
||||
python3 -c "import pep517; print("Module import successful")"
|
||||
CHECK_RESULT $? 0 0 "导入pep517模块失败"
|
||||
|
||||
LOG_INFO "步骤5: 验证软件包提供的命令行工具"
|
||||
if ! command -v pep517 &>/dev/null; then
|
||||
LOG_ERROR "未找到pep517命令"
|
||||
CHECK_RESULT 1 0 0 "pep517命令不存在"
|
||||
fi
|
||||
|
||||
LOG_INFO "步骤6: 测试pep517命令的基本帮助功能"
|
||||
pep517 --help
|
||||
CHECK_RESULT $? 0 0 "pep517 --help命令执行失败"
|
||||
|
||||
LOG_INFO "步骤7: 测试不支持的参数"
|
||||
pep517 --invalid-parameter 2>/dev/null
|
||||
if [ $? -ne 255 ]; then
|
||||
LOG_ERROR "不支持的参数未返回正确的退出码"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
LOG_INFO "步骤8: 清理测试环境"
|
||||
if [ "$INSTALLED_BEFORE" = false ]; then
|
||||
LOG_INFO "卸载测试安装的软件包"
|
||||
dnf remove -y python3-pep517-help-function-import
|
||||
CHECK_RESULT $? 0 0 "卸载软件包失败"
|
||||
else
|
||||
LOG_INFO "保持原有安装状态"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成: Test basic module import"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -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 : 2026-03-26
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : Test package installation
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
LOG_INFO "开始测试:Test package installation"
|
||||
|
||||
# 检查是否已安装python3-pep517-help-function
|
||||
LOG_INFO "检查python3-pep517-help-function是否已安装"
|
||||
if rpm -q python3-pep517-help-function &>/dev/null; then
|
||||
LOG_INFO "python3-pep517-help-function已安装,测试结束后将保持安装状态"
|
||||
INSTALLED_BEFORE=true
|
||||
else
|
||||
LOG_INFO "python3-pep517-help-function未安装,将进行安装测试"
|
||||
INSTALLED_BEFORE=false
|
||||
fi
|
||||
|
||||
# 检查yum源中是否有该软件包
|
||||
LOG_INFO "检查yum源中是否有python3-pep517-help-function软件包"
|
||||
if ! dnf list available python3-pep517-help-function &>/dev/null; then
|
||||
LOG_ERROR "yum源中未找到python3-pep517-help-function软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 安装软件包(如果未安装)
|
||||
if [ "$INSTALLED_BEFORE" = false ]; then
|
||||
LOG_INFO "开始安装python3-pep517-help-function"
|
||||
dnf install -y python3-pep517-help-function
|
||||
CHECK_RESULT $? 0 0 "安装python3-pep517-help-function失败"
|
||||
LOG_INFO "python3-pep517-help-function安装成功"
|
||||
fi
|
||||
|
||||
# 验证软件包功能
|
||||
LOG_INFO "验证python3-pep517-help-function功能"
|
||||
python3 -c "import pep517; print(pep517.__version__)" &>/dev/null
|
||||
CHECK_RESULT $? 0 0 "python3-pep517-help-function功能验证失败"
|
||||
|
||||
# 清理环境:如果之前未安装,则卸载软件包
|
||||
if [ "$INSTALLED_BEFORE" = false ]; then
|
||||
LOG_INFO "清理环境:卸载python3-pep517-help-function"
|
||||
dnf remove -y python3-pep517-help-function
|
||||
CHECK_RESULT $? 0 0 "卸载python3-pep517-help-function失败"
|
||||
LOG_INFO "环境清理完成"
|
||||
else
|
||||
LOG_INFO "测试前已安装,保持安装状态,无需清理"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成:Test package installation"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,65 +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 : 2026-03-26
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : Test package uninstallation
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
LOG_INFO "测试包卸载功能"
|
||||
LOG_INFO "步骤1: 检查环境是否已安装python-pep517-help-function"
|
||||
if dnf list installed python-pep517-help-function &>/dev/null; then
|
||||
LOG_INFO "python-pep517-help-function 已安装"
|
||||
INSTALLED_BEFORE_TEST=true
|
||||
else
|
||||
LOG_INFO "python-pep517-help-function 未安装"
|
||||
INSTALLED_BEFORE_TEST=false
|
||||
fi
|
||||
LOG_INFO "步骤2: 检查yum源中是否存在python-pep517-help-function"
|
||||
if ! dnf list available python-pep517-help-function &>/dev/null; then
|
||||
LOG_ERROR "yum源中未找到python-pep517-help-function软件包"
|
||||
exit 255
|
||||
fi
|
||||
LOG_INFO "步骤3: 测试卸载功能"
|
||||
if [ "$INSTALLED_BEFORE_TEST" = false ]; then
|
||||
LOG_INFO "执行安装操作作为测试步骤"
|
||||
dnf install -y python-pep517-help-function
|
||||
CHECK_RESULT $? 0 0 "安装python-pep517-help-function失败"
|
||||
fi
|
||||
LOG_INFO "执行卸载操作"
|
||||
dnf remove -y python-pep517-help-function
|
||||
CHECK_RESULT $? 0 0 "卸载python-pep517-help-function失败"
|
||||
LOG_INFO "验证卸载是否成功"
|
||||
if dnf list installed python-pep517-help-function &>/dev/null; then
|
||||
LOG_ERROR "卸载后python-pep517-help-function仍然存在"
|
||||
exit 1
|
||||
else
|
||||
LOG_INFO "卸载验证成功"
|
||||
fi
|
||||
LOG_INFO "步骤4: 环境恢复"
|
||||
if [ "$INSTALLED_BEFORE_TEST" = true ]; then
|
||||
LOG_INFO "恢复原始安装状态"
|
||||
dnf install -y python-pep517-help-function
|
||||
CHECK_RESULT $? 0 0 "重新安装python-pep517-help-function失败"
|
||||
LOG_INFO "环境已恢复到测试前状态"
|
||||
else
|
||||
LOG_INFO "原始状态为未安装,无需恢复"
|
||||
fi
|
||||
LOG_INFO "测试完成"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,97 +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 : 2026-03-26
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : Test common usage patterns
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
# 测试脚本:test_python-pep517-help_function_usage
|
||||
# 测试用例:Test common usage patterns
|
||||
|
||||
# 定义变量
|
||||
PACKAGE_NAME="python-pep517"
|
||||
COMMAND="python -m pep517"
|
||||
|
||||
# 步骤1:检查yum源中是否存在指定软件包
|
||||
LOG_INFO "步骤1:检查yum源中是否存在软件包 ${PACKAGE_NAME}"
|
||||
dnf list available ${PACKAGE_NAME} &>/dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "软件包 ${PACKAGE_NAME} 在yum源中不存在"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 步骤2:检查环境是否已安装该软件包
|
||||
LOG_INFO "步骤2:检查环境是否已安装软件包 ${PACKAGE_NAME}"
|
||||
rpm -q ${PACKAGE_NAME} &>/dev/null
|
||||
INSTALLED=$?
|
||||
if [ ${INSTALLED} -eq 0 ]; then
|
||||
LOG_INFO "软件包 ${PACKAGE_NAME} 已安装,脚本结束时将保持安装状态"
|
||||
NEED_CLEANUP=0
|
||||
else
|
||||
LOG_INFO "软件包 ${PACKAGE_NAME} 未安装,将作为测试步骤安装"
|
||||
NEED_CLEANUP=1
|
||||
fi
|
||||
|
||||
# 步骤3:安装软件包(如果未安装)
|
||||
if [ ${NEED_CLEANUP} -eq 1 ]; then
|
||||
LOG_INFO "步骤3:安装软件包 ${PACKAGE_NAME}"
|
||||
dnf install -y ${PACKAGE_NAME} &>/dev/null
|
||||
CHECK_RESULT $? 0 0 "安装软件包 ${PACKAGE_NAME} 失败"
|
||||
fi
|
||||
|
||||
# 步骤4:测试命令基本帮助功能
|
||||
LOG_INFO "步骤4:测试 ${COMMAND} 基本帮助功能"
|
||||
${COMMAND} --help &>/dev/null
|
||||
CHECK_RESULT $? 0 0 "执行 ${COMMAND} --help 失败"
|
||||
|
||||
# 步骤5:测试不支持的参数
|
||||
LOG_INFO "步骤5:测试 ${COMMAND} 不支持参数的情况"
|
||||
${COMMAND} --invalid-parameter &>/dev/null
|
||||
if [ $? -ne 255 ] && [ $? -ne 1 ]; then
|
||||
LOG_ERROR "不支持参数检查失败"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 步骤6:测试具体子命令帮助
|
||||
LOG_INFO "步骤6:测试 ${COMMAND} build --help 功能"
|
||||
${COMMAND} build --help &>/dev/null
|
||||
CHECK_RESULT $? 0 0 "执行 ${COMMAND} build --help 失败"
|
||||
|
||||
# 步骤7:测试在第二个服务器上执行命令(如果定义了相关变量)
|
||||
if [ -n "${NODE2_IPV4}" ] && [ -n "${NODE2_PASSWORD}" ] && [ -n "${NODE2_USER}" ]; then
|
||||
LOG_INFO "步骤7:在第二个服务器上测试 ${COMMAND} --help"
|
||||
SSH_CMD "${COMMAND} --help" ${NODE2_IPV4} ${NODE2_PASSWORD} ${NODE2_USER}
|
||||
CHECK_RESULT $? 0 0 "在第二个服务器上执行 ${COMMAND} --help 失败"
|
||||
else
|
||||
LOG_INFO "步骤7:跳过第二个服务器测试(未定义节点变量)"
|
||||
fi
|
||||
|
||||
# 步骤8:清理环境(如果测试过程中安装了软件包)
|
||||
if [ ${NEED_CLEANUP} -eq 1 ]; then
|
||||
LOG_INFO "步骤8:卸载测试安装的软件包 ${PACKAGE_NAME}"
|
||||
dnf remove -y ${PACKAGE_NAME} &>/dev/null
|
||||
CHECK_RESULT $? 0 0 "卸载软件包 ${PACKAGE_NAME} 失败"
|
||||
LOG_INFO "环境已恢复到测试前状态"
|
||||
else
|
||||
LOG_INFO "步骤8:保持软件包 ${PACKAGE_NAME} 安装状态"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,72 +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 : 2026-03-26
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : Test checking RPM dependencies
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
LOG_INFO "开始测试:Test checking RPM dependencies"
|
||||
|
||||
# 检查是否已安装python3-pyrpm包
|
||||
LOG_INFO "步骤1:检查python3-pyrpm是否已安装"
|
||||
if rpm -q python3-pyrpm > /dev/null 2>&1; then
|
||||
LOG_INFO "python3-pyrpm已安装,测试结束后将保持安装状态"
|
||||
INSTALLED_BEFORE=true
|
||||
else
|
||||
LOG_INFO "python3-pyrpm未安装,测试结束后将卸载"
|
||||
INSTALLED_BEFORE=false
|
||||
fi
|
||||
|
||||
# 检查yum源中是否有python3-pyrpm包
|
||||
LOG_INFO "步骤2:检查yum源中是否有python3-pyrpm包"
|
||||
if ! dnf list available python3-pyrpm > /dev/null 2>&1; then
|
||||
LOG_ERROR "yum源中未找到python3-pyrpm包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 如果未安装,则安装python3-pyrpm
|
||||
if [ "$INSTALLED_BEFORE" = false ]; then
|
||||
LOG_INFO "步骤3:安装python3-pyrpm包"
|
||||
dnf install -y python3-pyrpm
|
||||
CHECK_RESULT $? 0 0 "安装python3-pyrpm失败"
|
||||
fi
|
||||
|
||||
# 检查rpm命令的依赖检查功能
|
||||
LOG_INFO "步骤4:检查rpm命令的依赖检查功能"
|
||||
# 假设我们要检查python3-pyrpm包的依赖
|
||||
if ! rpm -q --requires python3-pyrpm > /dev/null 2>&1; then
|
||||
LOG_ERROR "rpm命令不支持--requires参数或包不存在"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 执行依赖检查
|
||||
LOG_INFO "步骤5:执行依赖检查"
|
||||
rpm -q --requires python3-pyrpm
|
||||
CHECK_RESULT $? 0 0 "依赖检查失败"
|
||||
|
||||
# 清理环境:如果测试前未安装,则卸载python3-pyrpm
|
||||
if [ "$INSTALLED_BEFORE" = false ]; then
|
||||
LOG_INFO "步骤6:清理环境,卸载python3-pyrpm"
|
||||
dnf remove -y python3-pyrpm
|
||||
CHECK_RESULT $? 0 0 "卸载python3-pyrpm失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成:Test checking RPM dependencies"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,85 +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 : 2026-03-26
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : Test listing files in RPM
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
# 定义软件包名称和命令
|
||||
PACKAGE_NAME="python3-pyrpm"
|
||||
COMMAND="pyrpm"
|
||||
SUBCOMMAND="-l"
|
||||
|
||||
# 步骤1: 检查yum源中是否存在指定的软件包
|
||||
LOG_INFO "检查yum源中是否存在软件包 $PACKAGE_NAME"
|
||||
dnf list available "$PACKAGE_NAME" &> /dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中未找到软件包 $PACKAGE_name"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 步骤2: 检查环境中是否已安装软件包
|
||||
LOG_INFO "检查环境中是否已安装软件包 $PACKAGE_NAME"
|
||||
if rpm -q "$PACKAGE_NAME" &> /dev/null; then
|
||||
LOG_INFO "软件包 $PACKAGE_NAME 已安装,标记为已存在"
|
||||
PACKAGE_PRE_INSTALLED=true
|
||||
else
|
||||
LOG_INFO "软件包 $PACKAGE_NAME 未安装,标记为未存在"
|
||||
PACKAGE_PRE_INSTALLED=false
|
||||
fi
|
||||
|
||||
# 步骤3: 如果未安装,则安装软件包
|
||||
if [ "$PACKAGE_PRE_INSTALLED" = false ]; then
|
||||
LOG_INFO "开始安装软件包 $PACKAGE_NAME"
|
||||
dnf install -y "$PACKAGE_NAME"
|
||||
CHECK_RESULT $? 0 0 "安装软件包 $PACKAGE_NAME 失败"
|
||||
fi
|
||||
|
||||
# 步骤4: 检查命令是否支持指定的参数
|
||||
LOG_INFO "检查命令 $COMMAND 是否支持参数 $SUBCOMMAND"
|
||||
$COMMAND --help 2>&1 | grep -q "$SUBCOMMAND"
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "命令 $COMMAND 不支持参数 $SUBCOMMAND"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 步骤5: 执行测试命令,列出RPM包中的文件
|
||||
LOG_INFO "执行测试命令: $COMMAND $SUBCOMMAND <RPM包>"
|
||||
# 使用一个示例RPM包进行测试,例如使用当前已安装的RPM包
|
||||
EXAMPLE_RPM=$(rpm -q "$PACKAGE_NAME")
|
||||
if [ -z "$EXAMPLE_RPM" ]; then
|
||||
LOG_ERROR "未找到示例RPM包"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
$COMMAND $SUBCOMMAND "$EXAMPLE_RPM"
|
||||
CHECK_RESULT $? 0 0 "执行命令 $COMMAND $SUBCOMMAND 失败"
|
||||
|
||||
# 步骤6: 清理环境,恢复到之前的状态
|
||||
if [ "$PACKAGE_PRE_INSTALLED" = false ]; then
|
||||
LOG_INFO "卸载软件包 $PACKAGE_NAME"
|
||||
dnf remove -y "$PACKAGE_NAME"
|
||||
CHECK_RESULT $? 0 0 "卸载软件包 $PACKAGE_NAME 失败"
|
||||
else
|
||||
LOG_INFO "软件包 $PACKAGE_NAME 在测试前已安装,保持安装状态"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试脚本执行完成"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,83 +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 : 2026-03-26
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : Test reading RPM header info
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
LOG_INFO "开始测试:Test reading RPM header info"
|
||||
|
||||
LOG_INFO "检查是否已安装 python3-pyrpm"
|
||||
if rpm -q python3-pyrpm &>/dev/null; then
|
||||
LOG_INFO "python3-pyrpm 已安装,测试完成后保持安装状态"
|
||||
INSTALLED=1
|
||||
else
|
||||
LOG_INFO "python3-pyrpm 未安装,将在测试中安装"
|
||||
INSTALLED=0
|
||||
fi
|
||||
|
||||
LOG_INFO "检查 yum 源中是否有 python3-pyrpm 软件包"
|
||||
if ! dnf list available python3-pyrpm &>/dev/null; then
|
||||
LOG_ERROR "yum 源中未找到 python3-pyrpm 软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
if [ $INSTALLED -eq 0 ]; then
|
||||
LOG_INFO "安装 python3-pyrpm"
|
||||
dnf install -y python3-pyrpm
|
||||
CHECK_RESULT $? 0 0 "安装 python3-pyrpm 失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试读取 RPM 头信息功能"
|
||||
python3 -c "import pyrpm; print(pyrpm.__version__)" &>/dev/null
|
||||
CHECK_RESULT $? 0 0 "python3-pyrpm 基本功能测试失败"
|
||||
|
||||
LOG_INFO "测试读取指定 RPM 文件的头信息"
|
||||
TEST_RPM="/usr/lib/rpm/rpm-oem-macros"
|
||||
if [ -f "$TEST_RPM" ]; then
|
||||
python3 -c "
|
||||
import pyrpm
|
||||
rpm = pyrpm.RPM("$TEST_RPM")
|
||||
print(rpm.header["name"])
|
||||
" &>/dev/null
|
||||
CHECK_RESULT $? 0 0 "读取 RPM 头信息失败"
|
||||
else
|
||||
LOG_INFO "未找到测试 RPM 文件,跳过具体头信息读取测试"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试不支持的参数情况"
|
||||
python3 -c "import pyrpm; rpm = pyrpm.RPM()" &>/dev/null
|
||||
if [ $? -eq 255 ]; then
|
||||
LOG_INFO "不支持的参数正确处理"
|
||||
else
|
||||
LOG_ERROR "不支持的参数未正确处理"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
if [ $INSTALLED -eq 0 ]; then
|
||||
LOG_INFO "清理环境:卸载 python3-pyrpm"
|
||||
dnf remove -y python3-pyrpm
|
||||
CHECK_RESULT $? 0 0 "卸载 python3-pyrpm 失败"
|
||||
else
|
||||
LOG_INFO "测试完成,保持 python3-pyrpm 安装状态"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成:Test reading RPM header info"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,97 +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 : 2026-03-04
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试python-smmap-help模块的导入功能,验证是否能成功导入并检查其关键属性。
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
# 定义颜色变量(可选,便于日志阅读)
|
||||
RED="\033[0;31m"
|
||||
GREEN="\033[0;32m"
|
||||
YELLOW="\033[1;33m"
|
||||
NC="\033[0m" # No Color
|
||||
|
||||
# 定义软件包名称和模块名称
|
||||
PACKAGE_NAME="python3-smmap"
|
||||
MODULE_NAME="smmap"
|
||||
PYTHON_CMD="python3"
|
||||
|
||||
# 步骤1:检查yum源中是否存在指定的软件包
|
||||
LOG_INFO "步骤1:检查yum源中是否存在软件包 ${PACKAGE_NAME}"
|
||||
dnf list available ${PACKAGE_NAME} &> /dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中未找到软件包 ${PACKAGE_NAME}"
|
||||
exit 255
|
||||
fi
|
||||
LOG_INFO "软件包 ${PACKAGE_NAME} 在yum源中存在"
|
||||
|
||||
# 步骤2:检查当前环境是否已安装指定软件包
|
||||
LOG_INFO "步骤2:检查当前环境是否已安装软件包 ${PACKAGE_NAME}"
|
||||
rpm -q ${PACKAGE_NAME} &> /dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "软件包 ${PACKAGE_NAME} 已安装,标记为已安装状态"
|
||||
INSTALLED="true"
|
||||
else
|
||||
LOG_INFO "软件包 ${PACKAGE_NAME} 未安装,标记为未安装状态"
|
||||
INSTALLED="false"
|
||||
fi
|
||||
|
||||
# 步骤3:如果未安装,则安装软件包
|
||||
if [ "${INSTALLED}" == "false" ]; then
|
||||
LOG_INFO "步骤3:安装软件包 ${PACKAGE_NAME}"
|
||||
dnf install -y ${PACKAGE_NAME}
|
||||
CHECK_RESULT $? 0 0 "安装软件包 ${PACKAGE_NAME} 失败"
|
||||
LOG_INFO "软件包 ${PACKAGE_NAME} 安装成功"
|
||||
fi
|
||||
|
||||
# 步骤4:验证python-smmap-help模块的导入功能
|
||||
LOG_INFO "步骤4:验证python-smmap-help模块的导入功能"
|
||||
${PYTHON_CMD} -c "import ${MODULE_NAME}; print(dir(${MODULE_NAME}))" &> /dev/null
|
||||
CHECK_RESULT $? 0 0 "导入模块 ${MODULE_NAME} 失败"
|
||||
LOG_INFO "模块 ${MODULE_NAME} 导入成功"
|
||||
|
||||
# 步骤5:检查模块的关键属性
|
||||
LOG_INFO "步骤5:检查模块 ${MODULE_NAME} 的关键属性"
|
||||
${PYTHON_CMD} -c "
|
||||
import ${MODULE_NAME}
|
||||
attrs = dir(${MODULE_NAME})
|
||||
expected_attrs = ["SizedStringIO", "StaticWindowMap", "WindowCursor"]
|
||||
for attr in expected_attrs:
|
||||
if attr not in attrs:
|
||||
print("属性 {} 不存在".format(attr))
|
||||
exit(1)
|
||||
print("所有关键属性都存在")
|
||||
"
|
||||
CHECK_RESULT $? 0 0 "模块 ${MODULE_NAME} 的关键属性检查失败"
|
||||
LOG_INFO "模块 ${MODULE_NAME} 的关键属性检查成功"
|
||||
|
||||
# 步骤6:环境恢复
|
||||
LOG_INFO "步骤6:环境恢复"
|
||||
if [ "${INSTALLED}" == "false" ]; then
|
||||
LOG_INFO "卸载测试安装的软件包 ${PACKAGE_NAME}"
|
||||
dnf remove -y ${PACKAGE_NAME}
|
||||
CHECK_RESULT $? 0 0 "卸载软件包 ${PACKAGE_NAME} 失败"
|
||||
LOG_INFO "软件包 ${PACKAGE_NAME} 卸载成功,环境已恢复"
|
||||
else
|
||||
LOG_INFO "软件包 ${PACKAGE_NAME} 为原有安装,保持安装状态"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试脚本执行完毕"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,86 +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 : 2026-03-04
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试python-smmap-help软件包的卸载功能,验证卸载是否成功。
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
set -e
|
||||
|
||||
LOG_INFO "开始测试python-smmap-help软件包的卸载功能"
|
||||
|
||||
# 检查软件包是否在yum源中
|
||||
LOG_INFO "检查python-smmap-help软件包是否在yum源中"
|
||||
dnf list available python-smmap-help > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中未找到python-smmap-help软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 检查软件包是否已经安装
|
||||
LOG_INFO "检查python-smmap-help软件包是否已经安装"
|
||||
rpm -q python-smmap-help > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "python-smmap-help软件包已经安装,测试结束后将保持安装状态"
|
||||
INSTALLED_BEFORE=true
|
||||
else
|
||||
LOG_INFO "python-smmap-help软件包未安装,将进行安装作为测试步骤"
|
||||
INSTALLED_BEFORE=false
|
||||
fi
|
||||
|
||||
# 如果未安装,则安装软件包
|
||||
if [ "$INSTALLED_BEFORE" = false ]; then
|
||||
LOG_INFO "安装python-smmap-help软件包"
|
||||
dnf install -y python-smmap-help
|
||||
CHECK_RESULT $? 0 0 "安装python-smmap-help软件包失败"
|
||||
fi
|
||||
|
||||
# 验证软件包安装成功
|
||||
LOG_INFO "验证python-smmap-help软件包安装成功"
|
||||
rpm -q python-smmap-help
|
||||
CHECK_RESULT $? 0 0 "python-smmap-help软件包未正确安装"
|
||||
|
||||
# 执行卸载测试
|
||||
LOG_INFO "执行python-smmap-help软件包卸载"
|
||||
dnf remove -y python-smmap-help
|
||||
CHECK_RESULT $? 0 0 "卸载python-smmap-help软件包失败"
|
||||
|
||||
# 验证软件包已卸载
|
||||
LOG_INFO "验证python-smmap-help软件包已卸载"
|
||||
rpm -q python-smmap-help > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_ERROR "python-smmap-help软件包卸载失败"
|
||||
exit 1
|
||||
else
|
||||
LOG_INFO "python-smmap-help软件包卸载成功"
|
||||
fi
|
||||
|
||||
# 环境恢复
|
||||
LOG_INFO "开始环境恢复"
|
||||
if [ "$INSTALLED_BEFORE" = true ]; then
|
||||
LOG_INFO "恢复python-smmap-help软件包安装状态"
|
||||
dnf install -y python-smmap-help
|
||||
CHECK_RESULT $? 0 0 "恢复python-smmap-help软件包安装状态失败"
|
||||
else
|
||||
LOG_INFO "无需恢复,原始状态为未安装"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成,环境已恢复"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,74 +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 : 2026-03-15
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试验证python3-rpm软件包是否已正确安装。
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
LOG_INFO "开始测试验证python3-rpm软件包是否已正确安装。"
|
||||
|
||||
# 检查yum源中是否存在python3-rpm软件包
|
||||
LOG_INFO "检查yum源中是否存在python3-rpm软件包。"
|
||||
dnf list available python3-rpm > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中未找到python3-rpm软件包。"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 检查是否已安装python3-rpm
|
||||
LOG_INFO "检查当前环境是否已安装python3-rpm软件包。"
|
||||
rpm -q python3-rpm > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "python3-rpm软件包已安装,标记为已安装状态。"
|
||||
INSTALLED=true
|
||||
else
|
||||
LOG_INFO "python3-rpm软件包未安装,标记为未安装状态。"
|
||||
INSTALLED=false
|
||||
fi
|
||||
|
||||
# 如果未安装,则安装python3-rpm
|
||||
if [ "$INSTALLED" = false ]; then
|
||||
LOG_INFO "开始安装python3-rpm软件包。"
|
||||
dnf install -y python3-rpm
|
||||
CHECK_RESULT $? 0 0 "安装python3-rpm软件包失败。"
|
||||
fi
|
||||
|
||||
# 验证python3-rpm软件包是否正确安装
|
||||
LOG_INFO "验证python3-rpm软件包是否正确安装。"
|
||||
rpm -q python3-rpm > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "python3-rpm软件包未正确安装。"
|
||||
|
||||
# 测试python3-rpm的基本功能
|
||||
LOG_INFO "测试python3-rpm的基本功能,检查是否支持--version参数。"
|
||||
python3 -c "import rpm; print(rpm.__version__)" > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "python3-rpm模块无法正常导入。"
|
||||
|
||||
# 如果测试前未安装,则在测试后卸载python3-rpm
|
||||
if [ "$INSTALLED" = false ]; then
|
||||
LOG_INFO "测试完成,开始卸载python3-rpm软件包。"
|
||||
dnf remove -y python3-rpm
|
||||
CHECK_RESULT $? 0 0 "卸载python3-rpm软件包失败。"
|
||||
LOG_INFO "已卸载python3-rpm软件包,环境已恢复。"
|
||||
else
|
||||
LOG_INFO "测试完成,保持python3-rpm软件包安装状态。"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试验证python3-rpm软件包是否已正确安装完成。"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,77 +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 : 2026-03-15
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试能否成功导入python3-rpm模块。
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
# 测试脚本:测试能否成功导入python3-rpm模块
|
||||
|
||||
LOG_INFO "步骤1:检查python3-rpm软件包是否在yum源中"
|
||||
dnf list available python3-rpm 2>/dev/null | grep -q python3-rpm
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "python3-rpm软件包不在yum源中"
|
||||
exit 255
|
||||
fi
|
||||
LOG_INFO "python3-rpm软件包在yum源中"
|
||||
|
||||
LOG_INFO "步骤2:检查当前是否已安装python3-rpm"
|
||||
rpm -q python3-rpm >/dev/null 2>&1
|
||||
is_installed=$?
|
||||
|
||||
if [ $is_installed -eq 0 ]; then
|
||||
LOG_INFO "python3-rpm已安装,测试后将保持安装状态"
|
||||
need_uninstall=0
|
||||
else
|
||||
LOG_INFO "python3-rpm未安装,将进行安装测试"
|
||||
need_uninstall=1
|
||||
|
||||
LOG_INFO "步骤3:安装python3-rpm软件包"
|
||||
dnf install -y python3-rpm
|
||||
CHECK_RESULT $? 0 0 "安装python3-rpm失败"
|
||||
LOG_INFO "python3-rpm安装成功"
|
||||
fi
|
||||
|
||||
LOG_INFO "步骤4:测试导入python3-rpm模块"
|
||||
python3 -c "import rpm"
|
||||
CHECK_RESULT $? 0 0 "导入python3-rpm模块失败"
|
||||
LOG_INFO "成功导入python3-rpm模块"
|
||||
|
||||
LOG_INFO "步骤5:验证模块基本功能"
|
||||
python3 -c "
|
||||
import rpm
|
||||
ts = rpm.TransactionSet()
|
||||
print("RPM事务集创建成功")
|
||||
"
|
||||
CHECK_RESULT $? 0 0 "python3-rpm模块功能测试失败"
|
||||
LOG_INFO "python3-rpm模块功能正常"
|
||||
|
||||
LOG_INFO "步骤6:清理测试环境"
|
||||
if [ $need_uninstall -eq 1 ]; then
|
||||
LOG_INFO "卸载测试安装的python3-rpm软件包"
|
||||
dnf remove -y python3-rpm
|
||||
CHECK_RESULT $? 0 0 "卸载python3-rpm失败"
|
||||
LOG_INFO "python3-rpm卸载成功,环境已恢复"
|
||||
else
|
||||
LOG_INFO "保持python3-rpm安装状态"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成:python3-rpm模块导入和基本功能测试成功"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,73 +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 : 2026-03-15
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试查询系统已安装的指定RPM包信息。
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
LOG_INFO "测试查询系统已安装的指定RPM包信息"
|
||||
LOG_INFO "步骤1:检查是否已安装python3-rpm包"
|
||||
rpm -q python3-rpm > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "python3-rpm已安装,记录安装状态"
|
||||
INSTALLED=1
|
||||
else
|
||||
LOG_INFO "python3-rpm未安装,记录未安装状态"
|
||||
INSTALLED=0
|
||||
fi
|
||||
|
||||
LOG_INFO "步骤2:检查yum源中是否存在python3-rpm包"
|
||||
dnf list available python3-rpm > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中不存在python3-rpm包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
if [ $INSTALLED -eq 0 ]; then
|
||||
LOG_INFO "步骤3:安装python3-rpm包"
|
||||
dnf install -y python3-rpm
|
||||
CHECK_RESULT $? 0 0 "安装python3-rpm包失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "步骤4:测试查询python3-rpm包信息"
|
||||
rpm -qi python3-rpm > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "查询python3-rpm包信息失败"
|
||||
|
||||
LOG_INFO "步骤5:测试使用query参数查询包信息"
|
||||
rpm -q python3-rpm --queryformat="%{NAME}\n" | grep -q "^python3-rpm$"
|
||||
CHECK_RESULT $? 0 0 "使用query参数查询包信息失败"
|
||||
|
||||
LOG_INFO "步骤6:测试不支持的参数"
|
||||
rpm -qi python3-rpm --invalid-param > /dev/null 2>&1
|
||||
if [ $? -ne 255 ] && [ $? -ne 1 ]; then
|
||||
LOG_ERROR "不支持的参数未正确处理"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
if [ $INSTALLED -eq 0 ]; then
|
||||
LOG_INFO "步骤7:清理环境,卸载python3-rpm包"
|
||||
dnf remove -y python3-rpm
|
||||
CHECK_RESULT $? 0 0 "卸载python3-rpm包失败"
|
||||
else
|
||||
LOG_INFO "步骤7:保持环境,不卸载python3-rpm包"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,69 +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 : 2026-03-15
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : 测试使用rpm模块读取已安装RPM包的头信息。
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
# 检查是否已经安装python3-rpm包
|
||||
LOG_INFO "检查是否已经安装python3-rpm包"
|
||||
rpm -q python3-rpm > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
already_installed=true
|
||||
LOG_INFO "python3-rpm已经安装"
|
||||
else
|
||||
already_installed=false
|
||||
LOG_INFO "python3-rpm未安装"
|
||||
fi
|
||||
|
||||
# 检查yum源中是否有python3-rpm包
|
||||
LOG_INFO "检查yum源中是否有python3-rpm包"
|
||||
dnf list available python3-rpm > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中没有python3-rpm包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 如果未安装,则安装python3-rpm包
|
||||
if [ "$already_installed" = false ]; then
|
||||
LOG_INFO "开始安装python3-rpm包"
|
||||
dnf install -y python3-rpm
|
||||
CHECK_RESULT $? 0 0 "安装python3-rpm包失败"
|
||||
fi
|
||||
|
||||
# 测试使用rpm模块读取已安装RPM包的头信息
|
||||
LOG_INFO "测试使用rpm模块读取已安装RPM包的头信息"
|
||||
python3 -c "
|
||||
import rpm
|
||||
ts = rpm.TransactionSet()
|
||||
mi = ts.dbMatch()
|
||||
for h in mi:
|
||||
print("Package: %s-%s-%s" % (h["name"], h["version"], h["release"]))
|
||||
break
|
||||
"
|
||||
CHECK_RESULT $? 0 0 "使用rpm模块读取RPM包头信息失败"
|
||||
|
||||
# 清理环境:如果脚本开始时未安装,则卸载python3-rpm包
|
||||
if [ "$already_installed" = false ]; then
|
||||
LOG_INFO "卸载python3-rpm包"
|
||||
dnf remove -y python3-rpm
|
||||
CHECK_RESULT $? 0 0 "卸载python3-rpm包失败"
|
||||
fi
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,101 +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 : 2026-03-15
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : Test basic gem to spec conversion
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
LOG_INFO "开始测试:Test basic gem to spec conversion"
|
||||
|
||||
# 定义软件包名称
|
||||
PACKAGE_NAME="rubygem-gem2rpm-doc"
|
||||
|
||||
# 检查软件包是否已在系统中安装
|
||||
LOG_INFO "步骤1:检查软件包是否已安装"
|
||||
if rpm -q $PACKAGE_NAME &> /dev/null; then
|
||||
LOG_INFO "软件包 $PACKAGE_NAME 已安装,测试结束后将保持安装状态"
|
||||
INSTALLED_BEFORE_TEST=true
|
||||
else
|
||||
LOG_INFO "软件包 $PACKAGE_NAME 未安装,将在测试过程中安装"
|
||||
INSTALLED_BEFORE_TEST=false
|
||||
fi
|
||||
|
||||
# 检查yum源中是否存在该软件包
|
||||
LOG_INFO "步骤2:检查yum源中是否存在软件包 $PACKAGE_NAME"
|
||||
if ! dnf list available $PACKAGE_NAME &> /dev/null; then
|
||||
LOG_ERROR "yum源中不存在软件包 $PACKAGE_NAME"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 如果未安装,则安装软件包
|
||||
if [ "$INSTALLED_BEFORE_TEST" = false ]; then
|
||||
LOG_INFO "步骤3:安装软件包 $PACKAGE_NAME"
|
||||
dnf install -y $PACKAGE_NAME
|
||||
CHECK_RESULT $? 0 0 "安装软件包 $PACKAGE_NAME 失败"
|
||||
fi
|
||||
|
||||
# 检查 gem2rpm 命令是否存在
|
||||
LOG_INFO "步骤4:检查 gem2rpm 命令是否存在"
|
||||
if ! command -v gem2rpm &> /dev/null; then
|
||||
LOG_ERROR "gem2rpm 命令不存在"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 测试基本 gem 到 spec 转换功能
|
||||
LOG_INFO "步骤5:测试基本 gem 到 spec 转换功能"
|
||||
# 创建一个临时的 gem 文件用于测试
|
||||
TEST_GEM_NAME="test_gem"
|
||||
TEST_GEM_FILE="$TEST_GEM_NAME.gem"
|
||||
TEST_SPEC_FILE="$TEST_GEM_NAME.spec"
|
||||
|
||||
# 模拟一个简单的 gem 文件(这里使用一个虚拟的 gem 文件进行测试)
|
||||
echo "This is a test gem file" > $TEST_GEM_FILE
|
||||
CHECK_RESULT $? 0 0 "创建测试 gem 文件失败"
|
||||
|
||||
# 使用 gem2rpm 将 gem 文件转换为 spec 文件
|
||||
LOG_INFO "步骤6:使用 gem2rpm 将 gem 文件转换为 spec 文件"
|
||||
gem2rpm $TEST_GEM_FILE > $TEST_SPEC_FILE 2>&1
|
||||
CHECK_RESULT $? 0 0 "gem2rpm 转换失败"
|
||||
|
||||
# 检查生成的 spec 文件是否包含必要的内容
|
||||
LOG_INFO "步骤7:检查生成的 spec 文件是否包含必要的内容"
|
||||
if grep -q "Name:" $TEST_SPEC_FILE && grep -q "Version:" $TEST_SPEC_FILE; then
|
||||
LOG_INFO "生成的 spec 文件包含必要的 Name 和 Version 字段"
|
||||
else
|
||||
LOG_ERROR "生成的 spec 文件缺少必要的字段"
|
||||
CHECK_RESULT 1 0 0 "spec 文件内容检查失败"
|
||||
fi
|
||||
|
||||
# 清理临时文件
|
||||
LOG_INFO "步骤8:清理临时文件"
|
||||
rm -f $TEST_GEM_FILE $TEST_SPEC_FILE
|
||||
CHECK_RESULT $? 0 0 "清理临时文件失败"
|
||||
|
||||
# 如果测试前未安装,则卸载软件包
|
||||
if [ "$INSTALLED_BEFORE_TEST" = false ]; then
|
||||
LOG_INFO "步骤9:卸载软件包 $PACKAGE_NAME"
|
||||
dnf remove -y $PACKAGE_NAME
|
||||
CHECK_RESULT $? 0 0 "卸载软件包 $PACKAGE_NAME 失败"
|
||||
else
|
||||
LOG_INFO "步骤9:保持软件包 $PACKAGE_NAME 安装状态"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成:Test basic gem to spec conversion"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -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-10
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : Test documentation generation functionality
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
# 检查是否已经安装rubygem-gem2rpm-doc软件包
|
||||
LOG_INFO "检查是否已经安装rubygem-gem2rpm-doc软件包"
|
||||
if dnf list installed rubygem-gem2rpm-doc &>/dev/null; then
|
||||
LOG_INFO "rubygem-gem2rpm-doc已安装,脚本结束时将保持安装状态"
|
||||
installed=true
|
||||
else
|
||||
LOG_INFO "rubygem-gem2rpm-doc未安装,将在测试结束后卸载"
|
||||
installed=false
|
||||
fi
|
||||
|
||||
# 检查yum源中是否有rubygem-gem2rpm-doc软件包
|
||||
LOG_INFO "检查yum源中是否有rubygem-gem2rpm-doc软件包"
|
||||
if ! dnf list available rubygem-gem2rpm-doc &>/dev/null; then
|
||||
LOG_ERROR "yum源中未找到rubygem-gem2rpm-doc软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 安装rubygem-gem2rpm-doc软件包(如果未安装)
|
||||
if [ "$installed" = false ]; then
|
||||
LOG_INFO "开始安装rubygem-gem2rpm-doc软件包"
|
||||
dnf install -y rubygem-gem2rpm-doc
|
||||
CHECK_RESULT $? 0 0 "安装rubygem-gem2rpm-doc软件包失败"
|
||||
fi
|
||||
|
||||
# 测试文档生成功能
|
||||
LOG_INFO "测试文档生成功能"
|
||||
gem2rpm --help | grep -q "\-\-doc"
|
||||
CHECK_RESULT $? 0 0 "--doc参数不支持"
|
||||
|
||||
LOG_INFO "执行文档生成命令"
|
||||
gem2rpm --doc
|
||||
CHECK_RESULT $? 0 0 "文档生成失败"
|
||||
|
||||
# 清理环境(如果之前未安装)
|
||||
if [ "$installed" = false ]; then
|
||||
LOG_INFO "卸载rubygem-gem2rpm-doc软件包"
|
||||
dnf remove -y rubygem-gem2rpm-doc
|
||||
CHECK_RESULT $? 0 0 "卸载rubygem-gem2rpm-doc软件包失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成,环境已恢复"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,88 +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 : 2026-03-15
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : Test help command output
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
set -e
|
||||
|
||||
LOG_INFO "开始测试: Test help command output"
|
||||
|
||||
# 检查软件包是否在yum源中
|
||||
LOG_INFO "检查rubygem-gem2rpm-doc软件包是否在yum源中"
|
||||
if ! dnf list available rubygem-gem2rpm-doc &>/dev/null; then
|
||||
LOG_ERROR "rubygem-gem2rpm-doc软件包不在yum源中"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 检查是否已安装软件包
|
||||
LOG_INFO "检查rubygem-gem2rpm-doc是否已安装"
|
||||
if rpm -q rubygem-gem2rpm-doc &>/dev/null; then
|
||||
already_installed=true
|
||||
LOG_INFO "rubygem-gem2rpm-doc已安装,测试结束后将保持安装状态"
|
||||
else
|
||||
already_installed=false
|
||||
LOG_INFO "rubygem-gem2rpm-doc未安装,将进行安装测试"
|
||||
fi
|
||||
|
||||
# 如果未安装,则安装软件包
|
||||
if [ "$already_installed" = false ]; then
|
||||
LOG_INFO "安装rubygem-gem2rpm-doc软件包"
|
||||
dnf install -y rubygem-gem2rpm-doc
|
||||
CHECK_RESULT $? 0 0 "安装rubygem-gem2rpm-doc失败"
|
||||
fi
|
||||
|
||||
# 测试帮助命令输出
|
||||
LOG_INFO "测试gem2rpm-doc帮助命令"
|
||||
output=$(gem2rpm-doc --help 2>&1)
|
||||
exit_code=$?
|
||||
|
||||
# 检查命令是否执行成功
|
||||
if [ $exit_code -eq 0 ]; then
|
||||
LOG_INFO "gem2rpm-doc帮助命令执行成功"
|
||||
# 检查输出是否包含帮助信息
|
||||
if echo "$output" | grep -q "Usage:"; then
|
||||
LOG_INFO "帮助命令输出包含预期内容"
|
||||
CHECK_RESULT 0 0 0 "帮助命令输出不符合预期"
|
||||
else
|
||||
LOG_ERROR "帮助命令输出不包含预期内容"
|
||||
CHECK_RESULT 1 0 0 "帮助命令输出不符合预期"
|
||||
fi
|
||||
elif [ $exit_code -eq 255 ]; then
|
||||
LOG_ERROR "gem2rpm-doc命令参数不存在或不支持"
|
||||
exit 255
|
||||
else
|
||||
LOG_ERROR "gem2rpm-doc命令执行失败,退出码: $exit_code"
|
||||
exit $exit_code
|
||||
fi
|
||||
|
||||
# 清理环境:如果测试前未安装,则卸载软件包
|
||||
if [ "$already_installed" = false ]; then
|
||||
LOG_INFO "卸载rubygem-gem2rpm-doc软件包"
|
||||
dnf remove -y rubygem-gem2rpm-doc
|
||||
CHECK_RESULT $? 0 0 "卸载rubygem-gem2rpm-doc失败"
|
||||
LOG_INFO "环境已恢复到测试前状态"
|
||||
else
|
||||
LOG_INFO "保持rubygem-gem2rpm-doc安装状态"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成: Test help command output"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,77 +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 : 2026-03-15
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : Test version command output
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
# 环境初始化检查
|
||||
LOG_INFO "检查是否已安装rubygem-gem2rpm-doc软件包"
|
||||
rpm -q rubygem-gem2rpm-doc >/dev/null 2>&1
|
||||
initial_install_status=$?
|
||||
|
||||
# 检查软件包是否在yum源中
|
||||
LOG_INFO "检查yum源中是否存在rubygem-gem2rpm-doc软件包"
|
||||
dnf list available rubygem-gem2rpm-doc >/dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中未找到rubygem-gem2rpm-doc软件包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 如果未安装则进行安装
|
||||
if [ $initial_install_status -ne 0 ]; then
|
||||
LOG_INFO "安装rubygem-gem2rpm-doc软件包"
|
||||
dnf install -y rubygem-gem2rpm-doc
|
||||
CHECK_RESULT $? 0 0 "安装rubygem-gem2rpm-doc软件包失败"
|
||||
fi
|
||||
|
||||
# 检查version参数支持情况
|
||||
LOG_INFO "检查gem2rpm命令是否支持version参数"
|
||||
gem2rpm --help | grep -q "\-\-version"
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "gem2rpm命令不支持version参数"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 测试version命令输出
|
||||
LOG_INFO "执行gem2rpm --version命令测试"
|
||||
version_output=$(gem2rpm --version 2>&1)
|
||||
CHECK_RESULT $? 0 0 "执行gem2rpm --version命令失败"
|
||||
|
||||
# 检查版本输出是否符合预期
|
||||
LOG_INFO "检查版本输出是否包含有效信息"
|
||||
if [ -z "$version_output" ]; then
|
||||
LOG_ERROR "版本输出为空"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
LOG_INFO "版本输出内容: $version_output"
|
||||
|
||||
# 环境清理
|
||||
if [ $initial_install_status -ne 0 ]; then
|
||||
LOG_INFO "清理环境:卸载rubygem-gem2rpm-doc软件包"
|
||||
dnf remove -y rubygem-gem2rpm-doc
|
||||
CHECK_RESULT $? 0 0 "卸载rubygem-gem2rpm-doc软件包失败"
|
||||
else
|
||||
LOG_INFO "保持rubygem-gem2rpm-doc软件包安装状态"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,108 +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 : 2026-02-23
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : Test converting a simple .texi file to HTML
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
# 检查texi2html命令是否已安装
|
||||
LOG_INFO "检查texi2html命令是否已安装"
|
||||
command -v texi2html > /dev/null 2>&1
|
||||
is_installed=$?
|
||||
|
||||
# 如果未安装,则检查yum源中是否有texi2html软件包
|
||||
if [ $is_installed -ne 0 ]; then
|
||||
LOG_INFO "texi2html未安装,检查yum源中是否存在该软件包"
|
||||
dnf search texi2html > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中未找到texi2html软件包"
|
||||
exit 255
|
||||
fi
|
||||
LOG_INFO "yum源中存在texi2html软件包,开始安装"
|
||||
dnf install -y texi2html
|
||||
CHECK_RESULT $? 0 0 "安装texi2html失败"
|
||||
installed_for_test=1
|
||||
else
|
||||
LOG_INFO "texi2html已安装,无需重新安装"
|
||||
installed_for_test=0
|
||||
fi
|
||||
|
||||
# 测试将简单的.texi文件转换为HTML
|
||||
LOG_INFO "测试将简单的.texi文件转换为HTML"
|
||||
|
||||
# 创建测试用的简单.texi文件
|
||||
LOG_INFO "创建测试用的简单.texi文件"
|
||||
cat > test_input.texi << "EOF"
|
||||
\input texinfo
|
||||
@setfilename test_output.html
|
||||
@settitle Simple Test
|
||||
|
||||
@node Top
|
||||
@top Simple Test
|
||||
|
||||
This is a simple test file for texi2html.
|
||||
@end ifnottex
|
||||
EOF
|
||||
|
||||
# 检查texi2html命令是否支持转换功能
|
||||
LOG_INFO "检查texi2html命令是否支持转换功能"
|
||||
texi2html --help | grep -q "convert\|html"
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "texi2html命令不支持转换功能或参数不存在"
|
||||
# 清理测试文件
|
||||
rm -f test_input.texi test_output.html 2>/dev/null
|
||||
# 如果是为了测试而安装的,则卸载
|
||||
if [ $installed_for_test -eq 1 ]; then
|
||||
LOG_INFO "卸载为测试安装的texi2html软件包"
|
||||
dnf remove -y texi2html
|
||||
fi
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 执行转换命令
|
||||
LOG_INFO "执行转换命令:texi2html test_input.texi"
|
||||
texi2html test_input.texi
|
||||
CHECK_RESULT $? 0 0 "texi2html转换失败"
|
||||
|
||||
# 检查生成的HTML文件是否存在
|
||||
LOG_INFO "检查生成的HTML文件是否存在"
|
||||
ls test_output.html > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "未生成HTML输出文件"
|
||||
|
||||
# 检查生成的HTML文件是否包含预期内容
|
||||
LOG_INFO "检查生成的HTML文件是否包含预期内容"
|
||||
grep -q "Simple Test" test_output.html
|
||||
CHECK_RESULT $? 0 0 "生成的HTML文件内容不符合预期"
|
||||
|
||||
LOG_INFO "texi2html转换功能测试成功"
|
||||
|
||||
# 清理测试文件
|
||||
LOG_INFO "清理测试文件"
|
||||
rm -f test_input.texi test_output.html
|
||||
|
||||
# 恢复环境:如果是为了测试而安装的,则卸载texi2html
|
||||
if [ $installed_for_test -eq 1 ]; then
|
||||
LOG_INFO "卸载为测试安装的texi2html软件包"
|
||||
dnf remove -y texi2html
|
||||
CHECK_RESULT $? 0 0 "卸载texi2html失败"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成,环境已恢复"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,86 +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 : 2026-02-23
|
||||
# @License : Mulan PSL v2
|
||||
# @Desc : Test installation of texi2html-help package
|
||||
# ############################################
|
||||
|
||||
source "$OET_PATH/libs/locallibs/common_lib.sh"
|
||||
|
||||
function run_test() {
|
||||
# 检查是否已安装texi2html-help
|
||||
LOG_INFO "检查是否已安装texi2html-help"
|
||||
rpm -q texi2html-help > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
LOG_INFO "texi2html-help已安装,脚本结束时将保持安装状态"
|
||||
already_installed=1
|
||||
else
|
||||
LOG_INFO "texi2html-help未安装,将在测试过程中安装"
|
||||
already_installed=0
|
||||
fi
|
||||
|
||||
# 检查yum源中是否有texi2html-help包
|
||||
LOG_INFO "检查yum源中是否有texi2html-help包"
|
||||
dnf list available texi2html-help > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "yum源中没有texi2html-help包"
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "yum源中未找到texi2html-help包"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 如果未安装,则安装texi2html-help
|
||||
if [ $already_installed -eq 0 ]; then
|
||||
LOG_INFO "安装texi2html-help"
|
||||
dnf install -y texi2html-help
|
||||
CHECK_RESULT $? 0 0 "安装texi2html-help失败"
|
||||
fi
|
||||
|
||||
# 测试texi2html-help命令的基本功能
|
||||
LOG_INFO "测试texi2html-help命令的基本功能"
|
||||
texi2html --help > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "texi2html命令执行失败"
|
||||
|
||||
# 测试texi2html-help命令的参数是否支持
|
||||
LOG_INFO "测试texi2html-help命令的参数是否支持"
|
||||
texi2html --version > /dev/null 2>&1
|
||||
CHECK_RESULT $? 0 0 "texi2html命令不支持--version参数"
|
||||
if [ $? -ne 0 ]; then
|
||||
LOG_ERROR "texi2html命令不支持--version参数"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 测试texi2html-help命令的无效参数
|
||||
LOG_INFO "测试texi2html-help命令的无效参数"
|
||||
texi2html --invalid-param > /dev/null 2>&1
|
||||
if [ $? -eq 255 ]; then
|
||||
LOG_INFO "texi2html命令正确处理了无效参数"
|
||||
else
|
||||
LOG_ERROR "texi2html命令未正确处理无效参数"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# 清理环境:如果脚本开始时未安装,则卸载texi2html-help
|
||||
if [ $already_installed -eq 0 ]; then
|
||||
LOG_INFO "清理环境:卸载texi2html-help"
|
||||
dnf remove -y texi2html-help
|
||||
CHECK_RESULT $? 0 0 "卸载texi2html-help失败"
|
||||
else
|
||||
LOG_INFO "清理环境:保持texi2html-help安装状态"
|
||||
fi
|
||||
|
||||
LOG_INFO "测试完成"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user