diff --git a/suite2cases/function_test/pkg_test/dpdk/dpdk.json b/suite2cases/function_test/pkg_test/dpdk/dpdk.json
index c9853239978..9c54f7c80c9 100644
--- a/suite2cases/function_test/pkg_test/dpdk/dpdk.json
+++ b/suite2cases/function_test/pkg_test/dpdk/dpdk.json
@@ -38,10 +38,6 @@
{
"name": "test_dpdk_dpdk-devbind__status_dev_crypto",
"desc": "打印加密设备的当前状态"
- },
- {
- "name": "test_dpdk_function_devbind_status",
- "desc": "测试dpdk-devbind命令查看所有网络设备状态的功能。"
}
]
}
\ No newline at end of file
diff --git a/suite2cases/function_test/pkg_test/hadoop/libhdfs.json b/suite2cases/function_test/pkg_test/hadoop/libhdfs.json
deleted file mode 100644
index cfdebf5ecdb..00000000000
--- a/suite2cases/function_test/pkg_test/hadoop/libhdfs.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "path": "$OET_PATH/testcases/function_test/pkg_test/hadoop/libhdfs",
- "machine num": 1,
- "cases": [
- {
- "name": "test_libhdfs_function_open",
- "desc": "Test opening a file in HDFS"
- },
- {
- "name": "test_libhdfs_function_read",
- "desc": "Test reading a file in HDFS"
- },
- {
- "name": "test_libhdfs_function_write",
- "desc": "Test writing to a file in HDFS"
- },
- {
- "name": "test_libhdfs_function_close",
- "desc": "Test closing a file in HDFS"
- },
- {
- "name": "test_libhdfs_function_stat",
- "desc": "Test getting file status in HDFS"
- }
- ]
-}
\ No newline at end of file
diff --git a/suite2cases/function_test/pkg_test/openwebbeans/openwebbeans-test.json b/suite2cases/function_test/pkg_test/openwebbeans/openwebbeans-test.json
deleted file mode 100644
index 163c4b8f0b9..00000000000
--- a/suite2cases/function_test/pkg_test/openwebbeans/openwebbeans-test.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- "path": "$OET_PATH/testcases/function_test/pkg_test/openwebbeans/openwebbeans-test",
- "machine num": 1,
- "cases": [
- {
- "name": "test_openwebbeans-test_function_di",
- "desc": "Test dependency injection functionality"
- },
- {
- "name": "test_openwebbeans-test_function_event",
- "desc": "Test event handling functionality"
- },
- {
- "name": "test_openwebbeans-test_function_install",
- "desc": "Test installation of the openwebbeans-test package"
- },
- {
- "name": "test_openwebbeans-test_function_uninstall",
- "desc": "Test uninstallation of the openwebbeans-test package"
- },
- {
- "name": "test_openwebbeans-test_function_version",
- "desc": "Test checking the installed package version"
- },
- {
- "name": "test_openwebbeans-test_function_help",
- "desc": "Test accessing the package help or usage information"
- },
- {
- "name": "test_openwebbeans-test_function_basic_bean",
- "desc": "Test basic bean creation and injection"
- },
- {
- "name": "test_openwebbeans-test_function_scope",
- "desc": "Test bean scope functionality (e.g., @ApplicationScoped, @RequestScoped)"
- },
- {
- "name": "test_openwebbeans-test_function_interceptor",
- "desc": "Test interceptor binding and execution"
- },
- {
- "name": "test_openwebbeans-test_function_alternatives",
- "desc": "Test the use of @Alternative and selection"
- }
- ]
-}
\ No newline at end of file
diff --git a/suite2cases/function_test/pkg_test/python-myst-nb/python3-myst-nb.json b/suite2cases/function_test/pkg_test/python-myst-nb/python3-myst-nb.json
index bf114b5aa72..592a593a73c 100644
--- a/suite2cases/function_test/pkg_test/python-myst-nb/python3-myst-nb.json
+++ b/suite2cases/function_test/pkg_test/python-myst-nb/python3-myst-nb.json
@@ -2,1117 +2,9 @@
"path": "$OET_PATH/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb",
"machine num": 1,
"cases": [
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_output",
- "desc": "测试使用--output参数指定输出文件"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_title",
- "desc": "测试使用--title参数指定文档标题"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_g",
- "desc": "测试使用-g参数包含生成器信息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_no_generator",
- "desc": "测试使用--no-generator参数不包含生成器信息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_d",
- "desc": "测试使用-d参数包含日期信息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_t",
- "desc": "测试使用-t参数包含时间和日期信息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_no_datestamp",
- "desc": "测试使用--no-datestamp参数不包含任何日期戳"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_s",
- "desc": "测试使用-s参数包含查看文档源链接"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_source_url",
- "desc": "测试使用--source-url参数指定源链接URL"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_no_source_link",
- "desc": "测试使用--no-source-link参数不包含查看文档源链接"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html5_output",
- "desc": "测试使用--output参数指定输出文件"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html5_title",
- "desc": "测试使用--title参数指定文档标题"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html5_g",
- "desc": "测试使用-g参数包含生成器信息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html5_no_generator",
- "desc": "测试使用--no-generator参数不包含生成器信息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html5_d",
- "desc": "测试使用-d参数包含日期信息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html5_t",
- "desc": "测试使用-t参数包含时间和日期信息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html5_no_datestamp",
- "desc": "测试使用--no-datestamp参数不包含任何日期戳"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html5_s",
- "desc": "测试使用-s参数包含查看文档源链接"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html5_source_url",
- "desc": "测试使用--source-url参数指定源链接URL"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-latex_output",
- "desc": "测试使用--output参数指定输出文件"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-latex_title",
- "desc": "测试使用--title参数指定文档标题"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-latex_g",
- "desc": "测试使用-g参数包含生成器信息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-latex_no_generator",
- "desc": "测试使用--no-generator参数不包含生成器信息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-latex_d",
- "desc": "测试使用-d参数包含日期信息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-latex_t",
- "desc": "测试使用-t参数包含时间和日期信息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-latex_no_datestamp",
- "desc": "测试使用--no-datestamp参数不包含任何日期戳"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-latex_s",
- "desc": "测试使用-s参数包含源链接"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-latex_source_url",
- "desc": "测试使用--source-url参数指定源链接URL"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-pseudoxml_output",
- "desc": "测试使用--output参数指定输出文件"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-pseudoxml_title",
- "desc": "测试使用--title参数指定文档标题"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-pseudoxml_g",
- "desc": "测试使用-g参数包含生成器信息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-pseudoxml_no_generator",
- "desc": "测试使用--no-generator参数不包含生成器信息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-pseudoxml_d",
- "desc": "测试使用-d参数包含日期信息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-pseudoxml_t",
- "desc": "测试使用-t参数包含时间和日期信息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-pseudoxml_no_datestamp",
- "desc": "测试使用--no-datestamp参数不包含任何日期戳"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-pseudoxml_s",
- "desc": "测试使用-s参数包含查看文档源链接"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_output",
- "desc": "测试使用--output参数指定输出文件"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_title",
- "desc": "测试使用--title参数指定文档标题"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_g",
- "desc": "测试使用-g参数包含生成器信息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_no_generator",
- "desc": "测试使用--no-generator参数不包含生成器信息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_d",
- "desc": "测试使用-d参数包含日期信息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_t",
- "desc": "测试使用-t参数包含时间和日期信息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_no_datestamp",
- "desc": "测试使用--no-datestamp参数不包含任何日期戳"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_s",
- "desc": "测试使用-s参数包含查看文档源链接"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_source_url",
- "desc": "测试使用--source-url参数指定源链接URL"
- },
- {
- "name": "test_python3-myst-nb_mystnb-quickstart_path",
- "desc": "测试 mystnb-quickstart 命令的基本功能,指定输出目录"
- },
- {
- "name": "test_python3-myst-nb_mystnb-quickstart_path_o",
- "desc": "测试 mystnb-quickstart 命令的覆盖功能,指定输出目录并覆盖现有文件"
- },
- {
- "name": "test_python3-myst-nb_mystnb-quickstart_path_v",
- "desc": "测试 mystnb-quickstart 命令的详细输出功能,指定输出目录并启用详细模式"
- },
- {
- "name": "test_python3-myst-nb_mystnb-quickstart_path_o_v",
- "desc": "测试 mystnb-quickstart 命令的组合功能,指定输出目录、覆盖现有文件并启用详细模式"
- },
- {
- "name": "test_python3-myst-nb_function_mystnb_quickstart",
- "desc": "测试 mystnb-quickstart 命令的基本功能,指定输出目录"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_help",
- "desc": "测试使用 --help 参数查看帮助信息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_version",
- "desc": "测试使用 --version 参数查看版本信息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_input_output",
- "desc": "测试指定输入源文件和输出目标文件"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_output_option",
- "desc": "测试使用 --output 选项指定输出文件"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_generator",
- "desc": "测试使用 --generator 选项包含生成器信息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_date",
- "desc": "测试使用 --date 选项包含日期"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_time",
- "desc": "测试使用 --time 选项包含时间和日期"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_source_link",
- "desc": "测试使用 --source-link 选项包含查看文档源链接"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_no_toc_backlinks",
- "desc": "测试使用 --no-toc-backlinks 选项禁用目录回链"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_no_section_numbering",
- "desc": "测试使用 --no-section-numbering 选项禁用章节编号"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_verbose",
- "desc": "测试使用 --verbose 选项报告所有系统消息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_quiet",
- "desc": "测试使用 --quiet 选项不报告系统消息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_strict",
- "desc": "测试使用 --strict 选项在轻微问题时停止执行"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_debug",
- "desc": "测试使用 --debug 选项启用调试级系统消息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_no_debug",
- "desc": "测试使用 --no-debug 选项禁用调试输出"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_input_encoding",
- "desc": "测试使用 --input-encoding 选项指定输入文本编码"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_output_encoding",
- "desc": "测试使用 --output-encoding 选项指定输出文本编码"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_language",
- "desc": "测试使用 --language 选项指定文档语言"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_nb_read_as_md_true",
- "desc": "测试使用 --nb-read-as-md=True 选项以MyST Markdown格式读取"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_nb_execution_mode_off",
- "desc": "测试使用 --nb-execution-mode=off 选项关闭笔记本执行"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_nb_execution_timeout",
- "desc": "测试使用 --nb-execution-timeout 选项设置执行超时时间"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_nb_remove_code_source",
- "desc": "测试使用 --nb-remove-code-source 选项移除代码单元格源码"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_nb_remove_code_outputs",
- "desc": "测试使用 --nb-remove-code-outputs 选项移除代码单元格输出"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_nb_output_folder",
- "desc": "测试使用 --nb-output-folder 选项指定外部输出文件夹"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_myst_enable_extensions",
- "desc": "测试使用 --myst-enable-extensions 选项启用语法扩展"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_myst_heading_anchors",
- "desc": "测试使用 --myst-heading-anchors 选项为标题级别分配HTML锚点"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_myst_highlight_code_blocks",
- "desc": "测试使用 --myst-highlight-code-blocks 选项对代码块进行语法高亮"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_no_file_insertion",
- "desc": "测试使用 --no-file-insertion 选项禁用插入外部文件内容的指令"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_no_raw",
- "desc": "测试使用 --no-raw 选项禁用原始指令"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_pep_references",
- "desc": "测试使用 --pep-references 选项识别并链接到独立的PEP引用"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_rfc_references",
- "desc": "测试使用 --rfc-references 选项识别并链接到独立的RFC引用"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_smart_quotes_yes",
- "desc": "测试使用 --smart-quotes=yes 选项将直引号转换为印刷体形式"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_stylesheet",
- "desc": "测试使用 --stylesheet 选项指定样式表URL"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_embed_stylesheet",
- "desc": "测试使用 --embed-stylesheet 选项将样式表嵌入输出HTML文件"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_link_stylesheet",
- "desc": "测试使用 --link-stylesheet 选项链接到输出HTML文件中的样式表"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_compact_lists",
- "desc": "测试使用 --compact-lists 选项压缩列表的垂直空白"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_math_output",
- "desc": "测试使用 --math-output 选项指定数学公式输出格式"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html_no_xml_declaration",
- "desc": "测试使用 --no-xml-declaration 选项省略XML声明"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html5_no_source_link",
- "desc": "测试--no-source-link参数不包含查看文档源链接"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html5_v",
- "desc": "测试-v参数报告所有系统消息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html5_q",
- "desc": "测试-q参数不报告系统消息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html5_upper_v",
- "desc": "测试-V参数显示版本信息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html5_h",
- "desc": "测试-h参数显示帮助信息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html5_nb_output_folder",
- "desc": "测试--nb-output-folder参数指定外部输出文件夹"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html5_nb_read_as_md_true",
- "desc": "测试--nb-read-as-md=True参数将输入作为MyST Markdown格式读取"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html5_nb_execution_mode_off",
- "desc": "测试--nb-execution-mode=off参数设置笔记本执行模式为关闭"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html5_nb_execution_timeout",
- "desc": "测试--nb-execution-timeout参数设置执行超时时间"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html5_nb_remove_code_source_true",
- "desc": "测试--nb-remove-code-source=True参数移除代码单元格源代码"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html5_nb_append_css_false",
- "desc": "测试--nb-append-css=False参数不添加默认MyST-NB CSS到HTML输出"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html5_myst_enable_extensions",
- "desc": "测试--myst-enable-extensions参数启用语法扩展"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html5_myst_url_schemes",
- "desc": "测试--myst-url-schemes参数设置URI方案"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html5_myst_heading_anchors",
- "desc": "测试--myst-heading-anchors参数设置标题锚点级别深度"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html5_input_encoding",
- "desc": "测试--input-encoding参数指定输入文本编码"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html5_output_encoding",
- "desc": "测试--output-encoding参数指定输出文本编码"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html5_language",
- "desc": "测试--language参数指定文档语言"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html5_template",
- "desc": "测试--template参数指定模板文件"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html5_stylesheet",
- "desc": "测试--stylesheet参数指定样式表URL"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-html5_initial_header_level",
- "desc": "测试--initial-header-level参数指定初始标题级别"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-latex_no_source_link",
- "desc": "测试不包含查看文档源链接"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-latex_section_numbering",
- "desc": "测试启用章节编号"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-latex_no_section_numbering",
- "desc": "测试禁用章节编号"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-latex_strip_comments",
- "desc": "测试移除文档树中的注释元素"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-latex_leave_comments",
- "desc": "测试保留文档树中的注释元素"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-latex_v",
- "desc": "测试报告所有系统消息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-latex_q",
- "desc": "测试不报告任何系统消息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-latex_strict",
- "desc": "测试在遇到最轻微问题时停止执行"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-latex_debug",
- "desc": "测试启用调试级别的系统消息和诊断"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-latex_no_debug",
- "desc": "测试禁用调试输出"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-latex_traceback",
- "desc": "测试在Docutils停止时启用Python回溯"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-latex_no_traceback",
- "desc": "测试禁用Python回溯"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-latex_upper_v",
- "desc": "测试显示程序版本号"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-latex_h",
- "desc": "测试显示帮助信息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-latex_nb_read_as_md",
- "desc": "测试以MyST Markdown格式读取笔记本"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-latex_nb_execution_mode",
- "desc": "测试设置笔记本执行模式"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-latex_nb_execution_timeout",
- "desc": "测试设置执行超时时间"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-latex_nb_execution_allow_errors",
- "desc": "测试允许执行过程中的错误"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-latex_nb_output_folder",
- "desc": "测试设置外部输出文件夹"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-latex_myst_enable_extensions",
- "desc": "测试启用MyST语法扩展"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-latex_myst_url_schemes",
- "desc": "测试设置转换为外部链接的URI方案"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-latex_documentclass",
- "desc": "测试指定LaTeX文档类"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-latex_documentoptions",
- "desc": "测试指定LaTeX文档选项"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-latex_footnote_references",
- "desc": "测试设置脚注引用格式"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-latex_stylesheet",
- "desc": "测试指定LaTeX样式表文件"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-latex_template",
- "desc": "测试指定模板文件"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-pseudoxml_version",
- "desc": "测试显示版本信息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-pseudoxml_help",
- "desc": "测试显示帮助信息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-pseudoxml_input_output",
- "desc": "测试指定输入和输出文件"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-pseudoxml_output_option",
- "desc": "测试使用--output选项指定输出文件"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-pseudoxml_generator",
- "desc": "测试包含生成器信息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-pseudoxml_date",
- "desc": "测试包含日期信息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-pseudoxml_time",
- "desc": "测试包含时间和日期信息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-pseudoxml_source_link",
- "desc": "测试包含查看文档源代码链接"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-pseudoxml_source_url",
- "desc": "测试使用--source-url指定源链接"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-pseudoxml_no_source_link",
- "desc": "测试不包含查看文档源代码链接"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-pseudoxml_verbose",
- "desc": "测试报告所有系统消息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-pseudoxml_quiet",
- "desc": "测试不报告系统消息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-pseudoxml_strict",
- "desc": "测试在遇到任何问题时停止执行"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-pseudoxml_debug",
- "desc": "测试启用调试级别的系统消息和诊断信息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-pseudoxml_traceback",
- "desc": "测试在Docutils停止时启用Python回溯"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-pseudoxml_input_encoding",
- "desc": "测试指定输入文本编码"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-pseudoxml_output_encoding",
- "desc": "测试指定输出文本编码"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-pseudoxml_language",
- "desc": "测试指定文档语言"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-pseudoxml_config",
- "desc": "测试从配置文件读取设置"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-pseudoxml_nb_read_as_md",
- "desc": "测试将输入读取为MyST Markdown格式"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-pseudoxml_nb_execution_mode_off",
- "desc": "测试设置笔记本执行模式为off"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-pseudoxml_nb_execution_mode_force",
- "desc": "测试设置笔记本执行模式为force"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-pseudoxml_nb_execution_timeout",
- "desc": "测试设置执行超时时间"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-pseudoxml_nb_execution_allow_errors",
- "desc": "测试允许执行过程中出现错误"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-pseudoxml_nb_output_folder",
- "desc": "测试指定外部输出(如图片)的文件夹"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-pseudoxml_myst_enable_extensions",
- "desc": "测试启用MyST语法扩展"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-pseudoxml_myst_heading_anchors",
- "desc": "测试为指定级别的标题分配HTML锚点"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-pseudoxml_myst_highlight_code_blocks",
- "desc": "测试使用Pygments语法高亮代码块"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-pseudoxml_no_file_insertion",
- "desc": "测试禁用插入外部文件内容的指令"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-pseudoxml_no_raw",
- "desc": "测试禁用raw指令"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-pseudoxml_smart_quotes",
- "desc": "测试将直引号转换为印刷引号"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-pseudoxml_detailed",
- "desc": "测试详细打印<#text>节点"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_help",
- "desc": "测试显示帮助信息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_version",
- "desc": "测试显示版本信息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_source_destination",
- "desc": "测试指定输入源文件和输出目标文件"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_generator",
- "desc": "测试包含生成器信息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_date",
- "desc": "测试包含日期信息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_time",
- "desc": "测试包含时间日期信息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_source_link",
- "desc": "测试包含查看文档源链接"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_no_source_link",
- "desc": "测试不包含查看文档源链接"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_toc_entry_backlinks",
- "desc": "测试从章节标题链接到目录条目"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_toc_top_backlinks",
- "desc": "测试从章节标题链接到目录顶部"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_no_toc_backlinks",
- "desc": "测试禁用目录回链"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_footnote_backlinks",
- "desc": "测试从脚注/引用链接到参考文献"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_no_footnote_backlinks",
- "desc": "测试禁用脚注和引用回链"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_section_numbering",
- "desc": "测试启用章节编号"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_no_section_numbering",
- "desc": "测试禁用章节编号"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_strip_comments",
- "desc": "测试从文档树中移除注释元素"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_leave_comments",
- "desc": "测试在文档树中保留注释元素"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_report",
- "desc": "测试设置报告系统消息的级别"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_verbose",
- "desc": "测试报告所有系统消息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_quiet",
- "desc": "测试不报告任何系统消息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_halt",
- "desc": "测试设置在指定级别及以上时停止执行"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_strict",
- "desc": "测试遇到任何问题都停止执行"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_exit_status",
- "desc": "测试为非停止系统消息启用非零退出状态"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_debug",
- "desc": "测试启用调试级别的系统消息和诊断"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_no_debug",
- "desc": "测试禁用调试输出"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_warnings",
- "desc": "测试将系统消息输出发送到指定文件"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_traceback",
- "desc": "测试启用停止时的Python回溯"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_no_traceback",
- "desc": "测试禁用Python回溯"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_input_encoding",
- "desc": "测试指定输入文本的编码和错误处理程序"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_output_encoding",
- "desc": "测试指定输出的文本编码和错误处理程序"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_error_encoding",
- "desc": "测试指定错误输出的文本编码和错误处理程序"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_language",
- "desc": "测试指定文档语言"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_record_dependencies",
- "desc": "测试将输出文件依赖关系写入指定文件"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_config",
- "desc": "测试从指定文件读取配置设置"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_nb_output_folder",
- "desc": "测试指定外部输出(如图像)的文件夹"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_nb_read_as_md",
- "desc": "测试以MyST Markdown格式读取笔记本"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_nb_metadata_key",
- "desc": "测试指定笔记本级别元数据键用于配置覆盖"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_nb_cell_metadata_key",
- "desc": "测试指定单元格级别元数据键用于配置覆盖"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_nb_eval_name_regex",
- "desc": "测试设置评估表达式允许值的正则表达式"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_nb_execution_mode",
- "desc": "测试设置笔记本的执行模式"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_nb_execution_cache_path",
- "desc": "测试设置缓存笔记本的文件夹路径"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_nb_execution_timeout",
- "desc": "测试设置执行超时时间(秒)"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_nb_execution_in_temp",
- "desc": "测试使用临时文件夹作为执行当前工作目录"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_nb_execution_allow_errors",
- "desc": "测试允许执行过程中的错误"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_nb_execution_raise_on_error",
- "desc": "测试在执行失败时引发异常"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_nb_execution_show_tb",
- "desc": "测试在执行错误时将回溯打印到stderr"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_nb_merge_streams",
- "desc": "测试合并stdout/stderr执行输出流"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_nb_render_plugin",
- "desc": "测试指定执行输出渲染类的入口点"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_nb_remove_code_source",
- "desc": "测试移除代码单元格源"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_nb_remove_code_outputs",
- "desc": "测试移除代码单元格输出"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_nb_number_source_lines",
- "desc": "测试为代码单元格源行添加行号"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_nb_builder_name",
- "desc": "测试设置构建器名称以选择MIME类型的渲染优先级"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_nb_output_stderr",
- "desc": "测试设置stderr输出的行为"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_nb_render_text_lexer",
- "desc": "测试设置应用于stdout/stderr和text/plain输出的Pygments词法分析器"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_nb_render_error_lexer",
- "desc": "测试设置应用于错误/回溯输出的Pygments词法分析器"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_nb_render_markdown_format",
- "desc": "测试设置用于text/markdown渲染的格式"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_nb_append_css",
- "desc": "测试向HTML输出添加默认MyST-NB CSS"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_nb_metadata_to_fm",
- "desc": "测试将未处理的元数据转换为frontmatter"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_myst_commonmark_only",
- "desc": "测试使用严格的CommonMark解析器"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_myst_gfm_only",
- "desc": "测试使用严格的Github Flavoured Markdown解析器"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_myst_enable_extensions",
- "desc": "测试启用语法扩展"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_myst_disable_syntax",
- "desc": "测试禁用Commonmark语法元素"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_myst_all_links_external",
- "desc": "测试将所有链接解析为简单超链接"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_myst_url_schemes",
- "desc": "测试设置转换为外部链接的URI方案"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_myst_fence_as_directive",
- "desc": "测试将特定语言的代码围栏解释为指令"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_myst_number_code_blocks",
- "desc": "测试为指定语言的代码块添加行号"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_myst_title_to_header",
- "desc": "测试将frontmatter中的title字段转换为H1标题"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_myst_heading_anchors",
- "desc": "测试设置分配HTML锚点的标题级别深度"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_myst_heading_slug_func",
- "desc": "测试设置用于创建标题锚点的函数"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_myst_html_meta",
- "desc": "测试设置HTML元标签"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_myst_footnote_transition",
- "desc": "测试在任何脚注前放置过渡"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_myst_words_per_minute",
- "desc": "测试设置阅读速度计算"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_myst_substitutions",
- "desc": "测试设置替换映射"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_myst_linkify_fuzzy_links",
- "desc": "测试识别无模式前缀的URL"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_myst_dmath_allow_labels",
- "desc": "测试解析带标签的数学块"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_myst_dmath_allow_space",
- "desc": "测试允许数学块中的首尾空格"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_myst_dmath_allow_digits",
- "desc": "测试允许数学块中的首尾数字"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_myst_dmath_double_inline",
- "desc": "测试解析内联双美元符号数学"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_myst_enable_checkboxes",
- "desc": "测试启用复选框"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_myst_suppress_warnings",
- "desc": "测试设置要抑制的警告类型列表"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_myst_highlight_code_blocks",
- "desc": "测试使用pygments语法高亮代码块"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_myst_inventories",
- "desc": "测试设置用于项目内引用的映射"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_no_file_insertion",
- "desc": "测试禁用插入外部文件内容的指令"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_file_insertion_enabled",
- "desc": "测试启用插入外部文件内容的指令"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_no_raw",
- "desc": "测试禁用raw指令"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_raw_enabled",
- "desc": "测试启用raw指令"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_line_length_limit",
- "desc": "测试设置输入行的最大字符数"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_pep_references",
- "desc": "测试识别并链接到独立的PEP引用"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_pep_base_url",
- "desc": "测试设置PEP引用的基础URL"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_rfc_references",
- "desc": "测试识别并链接到独立的RFC引用"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_rfc_base_url",
- "desc": "测试设置RFC引用的基础URL"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_tab_width",
- "desc": "测试设置制表符扩展的空格数"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_syntax_highlight",
- "desc": "测试设置用于Pygments解析代码的标记名称集"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_smart_quotes",
- "desc": "测试将直引号转换为印刷形式"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_newlines",
- "desc": "测试生成带换行符的XML"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_indents",
- "desc": "测试生成带缩进和换行符的XML"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_no_xml_declaration",
- "desc": "测试省略XML声明"
- },
- {
- "name": "test_python3-myst-nb_mystnb-docutils-xml_no_doctype",
- "desc": "测试省略DOCTYPE声明"
- },
- {
- "name": "test_python3-myst-nb_mystnb-to-jupyter_help",
- "desc": "测试显示帮助信息"
- },
- {
- "name": "test_python3-myst-nb_mystnb-to-jupyter_basic_conversion",
- "desc": "测试基本Markdown文件转换为Jupyter笔记本"
- },
- {
- "name": "test_python3-myst-nb_mystnb-to-jupyter_output_specified",
- "desc": "测试指定输出文件路径的转换"
- },
- {
- "name": "test_python3-myst-nb_mystnb-to-jupyter_overwrite",
- "desc": "测试使用覆盖选项转换文件"
- },
- {
- "name": "test_python3-myst-nb_mystnb-to-jupyter_verbose",
- "desc": "测试使用详细输出选项转换文件"
- },
- {
- "name": "test_python3-myst-nb_mystnb-to-jupyter_overwrite_verbose",
- "desc": "测试同时使用覆盖和详细输出选项转换文件"
- },
- {
- "name": "test_python3-myst-nb_function_install",
- "desc": "测试软件包安装"
- },
{
"name": "test_python3-myst-nb_function_uninstall",
"desc": "测试软件包卸载"
- },
- {
- "name": "test_python3-myst-nb_function_version",
- "desc": "测试软件包版本查询"
- },
- {
- "name": "test_python3-myst-nb_function_quickstart",
- "desc": "测试创建基础项目"
- },
- {
- "name": "test_python3-myst-nb_function_convert_md_to_nb",
- "desc": "测试Markdown转Jupyter笔记本"
- },
- {
- "name": "test_python3-myst-nb_function_convert_nb_to_html",
- "desc": "测试笔记本转HTML文档"
- },
- {
- "name": "test_python3-myst-nb_function_execute_nb",
- "desc": "测试执行笔记本代码"
- },
- {
- "name": "test_python3-myst-nb_function_help",
- "desc": "测试显示主命令帮助"
}
]
}
\ No newline at end of file
diff --git a/suite2cases/function_test/pkg_test/texlive-split-e/texlive-collection-music.json b/suite2cases/function_test/pkg_test/texlive-split-e/texlive-collection-music.json
deleted file mode 100644
index d84c9364ebc..00000000000
--- a/suite2cases/function_test/pkg_test/texlive-split-e/texlive-collection-music.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "path": "$OET_PATH/testcases/function_test/pkg_test/texlive-split-e/texlive-collection-music",
- "machine num": 1,
- "cases": [
- {
- "name": "test_texlive-collection-music_function_package_install",
- "desc": "测试 texlive-collection-music 软件包能否成功安装"
- },
- {
- "name": "test_texlive-collection-music_function_package_remove",
- "desc": "测试 texlive-collection-music 软件包能否被完整卸载"
- },
- {
- "name": "test_texlive-collection-music_function_contains_musictex",
- "desc": "测试软件包是否包含核心音乐排版包 musictex 及其相关文件"
- },
- {
- "name": "test_texlive-collection-music_function_contains_packages",
- "desc": "测试软件包是否包含其他常用音乐排版组件(如 musixtex, pmx, lilypond)"
- },
- {
- "name": "test_texlive-collection-music_function_basic_compile",
- "desc": "测试使用软件包中的工具(如 musictex 或 musixtex)能否编译一个简单的乐谱示例文件"
- }
- ]
-}
\ No newline at end of file
diff --git a/suite2cases/function_test/pkg_test/texlive-split-o/texlive-mathpunctspace.json b/suite2cases/function_test/pkg_test/texlive-split-o/texlive-mathpunctspace.json
index 868d0e27304..f0558e3ce44 100644
--- a/suite2cases/function_test/pkg_test/texlive-split-o/texlive-mathpunctspace.json
+++ b/suite2cases/function_test/pkg_test/texlive-split-o/texlive-mathpunctspace.json
@@ -9,14 +9,6 @@
{
"name": "test_texlive-mathpunctspace_function_remove",
"desc": "Test package removal"
- },
- {
- "name": "test_texlive-mathpunctspace_function_check",
- "desc": "Check package availability"
- },
- {
- "name": "test_texlive-mathpunctspace_function_usage",
- "desc": "Test basic package usage"
}
]
}
\ No newline at end of file
diff --git a/suite2cases/function_test/pkg_test/texlive-split-y/texlive-hitszbeamer.json b/suite2cases/function_test/pkg_test/texlive-split-y/texlive-hitszbeamer.json
deleted file mode 100644
index 2f6b7a1f9c6..00000000000
--- a/suite2cases/function_test/pkg_test/texlive-split-y/texlive-hitszbeamer.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "path": "$OET_PATH/testcases/function_test/pkg_test/texlive-split-y/texlive-hitszbeamer",
- "machine num": 1,
- "cases": [
- {
- "name": "test_texlive-hitszbeamer_function_basic",
- "desc": "Test basic functionality of texlive-hitszbeamer"
- },
- {
- "name": "test_texlive-hitszbeamer_function_install",
- "desc": "Test installation of texlive-hitszbeamer package"
- },
- {
- "name": "test_texlive-hitszbeamer_function_uninstall",
- "desc": "Test uninstallation of texlive-hitszbeamer package"
- },
- {
- "name": "test_texlive-hitszbeamer_function_check_installed",
- "desc": "Check if texlive-hitszbeamer is installed"
- },
- {
- "name": "test_texlive-hitszbeamer_function_basic_compile",
- "desc": "Test basic compilation with hitszbeamer document class"
- },
- {
- "name": "test_texlive-hitszbeamer_function_theme_options",
- "desc": "Test applying different theme options in hitszbeamer"
- },
- {
- "name": "test_texlive-hitszbeamer_function_logo_usage",
- "desc": "Test logo inclusion functionality in hitszbeamer"
- }
- ]
-}
\ No newline at end of file
diff --git a/suite2cases/function_test/pkg_test/texlive-split-z/texlive-xtab.json b/suite2cases/function_test/pkg_test/texlive-split-z/texlive-xtab.json
deleted file mode 100644
index c9ea657d92d..00000000000
--- a/suite2cases/function_test/pkg_test/texlive-split-z/texlive-xtab.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "path": "$OET_PATH/testcases/function_test/pkg_test/texlive-split-z/texlive-xtab",
- "machine num": 1,
- "cases": [
- {
- "name": "test_texlive-xtab_function_install",
- "desc": "Test package installation"
- }
- ]
-}
\ No newline at end of file
diff --git a/suite2cases/function_test/pkg_test/xstream/xstream-javadoc.json b/suite2cases/function_test/pkg_test/xstream/xstream-javadoc.json
deleted file mode 100644
index 9d615b93d56..00000000000
--- a/suite2cases/function_test/pkg_test/xstream/xstream-javadoc.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "path": "$OET_PATH/testcases/function_test/pkg_test/xstream/xstream-javadoc",
- "machine num": 1,
- "cases": [
- {
- "name": "test_xstream-javadoc_function_parse",
- "desc": "Test parsing functionality"
- },
- {
- "name": "test_xstream-javadoc_function_serialize",
- "desc": "Test serialization functionality"
- }
- ]
-}
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/dpdk/dpdk/test_dpdk_function_devbind_status.sh b/testcases/function_test/pkg_test/dpdk/dpdk/test_dpdk_function_devbind_status.sh
deleted file mode 100644
index 541adb9dacb..00000000000
--- a/testcases/function_test/pkg_test/dpdk/dpdk/test_dpdk_function_devbind_status.sh
+++ /dev/null
@@ -1,62 +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-24
-# @License : Mulan PSL v2
-# @Desc : 测试dpdk-devbind命令查看所有网络设备状态的功能。
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试dpdk-devbind命令查看所有网络设备状态的功能"
-
- LOG_INFO "步骤1:检查dpdk软件包是否已在yum源中"
- if ! dnf list available dpdk 2>/dev/null | grep -q dpdk; then
- LOG_ERROR "yum源中未找到dpdk软件包"
- exit 255
- fi
-
- LOG_INFO "步骤2:检查dpdk-devbind命令参数是否支持"
- if ! dpdk-devbind --help 2>/dev/null | grep -q "\-\-status"; then
- LOG_ERROR "dpdk-devbind命令不支持--status参数"
- exit 255
- fi
-
- LOG_INFO "步骤3:检查dpdk是否已安装"
- if ! command -v dpdk-devbind &> /dev/null; then
- LOG_INFO "dpdk未安装,开始安装"
- dnf install -y dpdk
- CHECK_RESULT $? 0 0 "dpdk安装失败"
- INSTALLED_FLAG=1
- else
- LOG_INFO "dpdk已安装"
- INSTALLED_FLAG=0
- fi
-
- LOG_INFO "步骤4:执行dpdk-devbind --status命令查看所有网络设备状态"
- dpdk-devbind --status
- CHECK_RESULT $? 0 0 "执行dpdk-devbind --status命令失败"
-
- LOG_INFO "步骤5:环境恢复"
- if [ "$INSTALLED_FLAG" -eq 1 ]; then
- LOG_INFO "卸载dpdk软件包"
- dnf remove -y dpdk
- CHECK_RESULT $? 0 0 "dpdk卸载失败"
- fi
-
- LOG_INFO "测试完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/hadoop/libhdfs/test_libhdfs_function_close.sh b/testcases/function_test/pkg_test/hadoop/libhdfs/test_libhdfs_function_close.sh
deleted file mode 100644
index e2279954eff..00000000000
--- a/testcases/function_test/pkg_test/hadoop/libhdfs/test_libhdfs_function_close.sh
+++ /dev/null
@@ -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-08
-# @License : Mulan PSL v2
-# @Desc : Test closing a file in HDFS
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试:Test closing a file in HDFS"
-
- # 检查是否已安装libhdfs
- LOG_INFO "检查libhdfs是否已安装"
- if ! dnf list installed libhdfs &> /dev/null; then
- LOG_INFO "libhdfs未安装,将进行安装"
- INSTALLED=false
- else
- LOG_INFO "libhdfs已安装"
- INSTALLED=true
- fi
-
- # 检查yum源中是否有libhdfs软件包
- LOG_INFO "检查yum源中是否有libhdfs软件包"
- if ! dnf list available libhdfs &> /dev/null; then
- LOG_ERROR "yum源中未找到libhdfs软件包"
- exit 255
- fi
-
- # 若未安装则安装libhdfs
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "正在安装libhdfs"
- dnf install -y libhdfs
- CHECK_RESULT $? 0 0 "安装libhdfs失败"
- fi
-
- # 测试关闭HDFS文件功能
- LOG_INFO "测试关闭HDFS文件功能"
- hadoop fs -test -e /testfile || hadoop fs -touchz /testfile
- hadoop fs -cat /testfile > /dev/null
- CHECK_RESULT $? 0 0 "打开HDFS文件失败"
-
- # 清理测试文件
- LOG_INFO "清理测试文件"
- hadoop fs -rm -f /testfile
- CHECK_RESULT $? 0 0 "删除HDFS文件失败"
-
- # 若脚本开始时未安装则卸载libhdfs
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "卸载libhdfs以恢复环境"
- dnf remove -y libhdfs
- CHECK_RESULT $? 0 0 "卸载libhdfs失败"
- fi
-
- LOG_INFO "测试完成:Test closing a file in HDFS"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/hadoop/libhdfs/test_libhdfs_function_open.sh b/testcases/function_test/pkg_test/hadoop/libhdfs/test_libhdfs_function_open.sh
deleted file mode 100644
index 0916059282c..00000000000
--- a/testcases/function_test/pkg_test/hadoop/libhdfs/test_libhdfs_function_open.sh
+++ /dev/null
@@ -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 : 2025-11-30
-# @License : Mulan PSL v2
-# @Desc : Test opening a file in HDFS
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试:Test opening a file in HDFS"
-
- # 检查软件包是否已安装
- LOG_INFO "检查环境是否已安装libhdfs"
- if rpm -q libhdfs &> /dev/null; then
- LOG_INFO "libhdfs已安装,脚本结束后将保持安装状态"
- INSTALLED=true
- else
- LOG_INFO "libhdfs未安装,将在测试结束后卸载"
- INSTALLED=false
- fi
-
- # 检查yum源中是否有libhdfs软件包
- LOG_INFO "检查yum源中是否有libhdfs软件包"
- if ! dnf list available libhdfs &> /dev/null; then
- LOG_ERROR "yum源中未找到libhdfs软件包"
- exit 255
- fi
-
- # 若未安装则安装libhdfs
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "开始安装libhdfs"
- dnf install -y libhdfs
- CHECK_RESULT $? 0 0 "安装libhdfs失败"
- fi
-
- # 测试打开HDFS文件功能
- LOG_INFO "测试打开HDFS文件功能"
- hadoop fs -test -e /testfile || hadoop fs -touchz /testfile
- CHECK_RESULT $? 0 0 "创建测试文件失败"
-
- hadoop fs -cat /testfile
- CHECK_RESULT $? 0 0 "打开HDFS文件失败"
-
- # 清理测试文件
- LOG_INFO "清理测试文件"
- hadoop fs -rm -f /testfile
- CHECK_RESULT $? 0 0 "删除测试文件失败"
-
- # 若脚本开始时未安装libhdfs,则卸载
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "卸载libhdfs"
- dnf remove -y libhdfs
- CHECK_RESULT $? 0 0 "卸载libhdfs失败"
- fi
-
- LOG_INFO "测试完成:Test opening a file in HDFS"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/hadoop/libhdfs/test_libhdfs_function_read.sh b/testcases/function_test/pkg_test/hadoop/libhdfs/test_libhdfs_function_read.sh
deleted file mode 100644
index 922ab1874e4..00000000000
--- a/testcases/function_test/pkg_test/hadoop/libhdfs/test_libhdfs_function_read.sh
+++ /dev/null
@@ -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 : 2025-12-08
-# @License : Mulan PSL v2
-# @Desc : Test reading a file in HDFS
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
-
- # 检查是否已安装hadoop-hdfs-client包
- LOG_INFO "检查是否已安装hadoop-hdfs-client包"
- if ! dnf list installed hadoop-hdfs-client &>/dev/null; then
- LOG_INFO "hadoop-hdfs-client未安装,将进行安装"
- # 检查yum源中是否有hadoop-hdfs-client包
- if ! dnf list available hadoop-hdfs-client &>/dev/null; then
- LOG_ERROR "yum源中未找到hadoop-hdfs-client包"
- exit 255
- fi
- # 安装hadoop-hdfs-client
- dnf install -y hadoop-hdfs-client
- CHECK_RESULT $? 0 0 "安装hadoop-hdfs-client失败"
- # 标记需要卸载
- UNINSTALL_NEEDED=1
- else
- LOG_INFO "hadoop-hdfs-client已安装"
- fi
-
- # 测试读取HDFS文件
- LOG_INFO "测试读取HDFS文件"
- HDFS_FILE="/testfile"
- # 检查HDFS文件是否存在
- hadoop fs -test -e $HDFS_FILE
- if [ $? -ne 0 ]; then
- LOG_ERROR "HDFS文件$HDFS_FILE不存在"
- exit 1
- fi
-
- # 读取HDFS文件内容
- LOG_INFO "读取HDFS文件内容"
- hadoop fs -cat $HDFS_FILE > /tmp/hdfs_file_content
- CHECK_RESULT $? 0 0 "读取HDFS文件失败"
-
- # 清理临时文件
- LOG_INFO "清理临时文件"
- rm -f /tmp/hdfs_file_content
-
- # 如果之前未安装hadoop-hdfs-client,则卸载
- if [ "$UNINSTALL_NEEDED" = "1" ]; then
- LOG_INFO "卸载hadoop-hdfs-client"
- dnf remove -y hadoop-hdfs-client
- CHECK_RESULT $? 0 0 "卸载hadoop-hdfs-client失败"
- fi
-
- LOG_INFO "测试完成"
- exit 0
-
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/hadoop/libhdfs/test_libhdfs_function_stat.sh b/testcases/function_test/pkg_test/hadoop/libhdfs/test_libhdfs_function_stat.sh
deleted file mode 100644
index eeb073347a4..00000000000
--- a/testcases/function_test/pkg_test/hadoop/libhdfs/test_libhdfs_function_stat.sh
+++ /dev/null
@@ -1,62 +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-08
-# @License : Mulan PSL v2
-# @Desc : Test getting file status in HDFS
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
-
- # 测试获取HDFS文件状态
- LOG_INFO "开始测试:Test getting file status in HDFS"
-
- # 检查libhdfs软件包是否已安装
- LOG_INFO "检查libhdfs软件包是否已安装"
- if ! dnf list installed libhdfs &>/dev/null; then
- LOG_INFO "libhdfs未安装,将进行安装"
- # 检查yum源中是否有libhdfs软件包
- if ! dnf list available libhdfs &>/dev/null; then
- LOG_ERROR "yum源中未找到libhdfs软件包"
- exit 255
- fi
- # 安装libhdfs
- dnf install -y libhdfs
- CHECK_RESULT $? 0 0 "安装libhdfs失败"
- # 标记为测试安装,需要在脚本结束时卸载
- TEST_INSTALLED=true
- else
- LOG_INFO "libhdfs已安装"
- TEST_INSTALLED=false
- fi
-
- # 测试获取HDFS文件状态
- LOG_INFO "测试获取HDFS文件状态"
- hadoop fs -stat /testfile &>/dev/null
- CHECK_RESULT $? 0 0 "获取HDFS文件状态失败"
-
- # 清理环境
- if [ "$TEST_INSTALLED" = true ]; then
- LOG_INFO "卸载libhdfs软件包"
- dnf remove -y libhdfs
- CHECK_RESULT $? 0 0 "卸载libhdfs失败"
- fi
-
- LOG_INFO "测试完成:Test getting file status in HDFS"
-
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/hadoop/libhdfs/test_libhdfs_function_write.sh b/testcases/function_test/pkg_test/hadoop/libhdfs/test_libhdfs_function_write.sh
deleted file mode 100644
index 0a8e6330a1e..00000000000
--- a/testcases/function_test/pkg_test/hadoop/libhdfs/test_libhdfs_function_write.sh
+++ /dev/null
@@ -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 : 2025-12-08
-# @License : Mulan PSL v2
-# @Desc : Test writing to a file in HDFS
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 测试脚本 test_libhdfs_function_write
-
- LOG_INFO "开始测试:Test writing to a file in HDFS"
-
- # 检查是否已安装hadoop-hdfs软件包
- LOG_INFO "检查是否已安装hadoop-hdfs软件包"
- if ! dnf list installed hadoop-hdfs &> /dev/null; then
- LOG_INFO "hadoop-hdfs未安装,准备安装"
- if ! dnf list available hadoop-hdfs &> /dev/null; then
- LOG_ERROR "yum源中未找到hadoop-hdfs软件包"
- exit 255
- fi
- dnf install -y hadoop-hdfs
- CHECK_RESULT $? 0 0 "安装hadoop-hdfs失败"
- INSTALLED=true
- else
- LOG_INFO "hadoop-hdfs已安装"
- INSTALLED=false
- fi
-
- # 检查hdfs命令是否可用
- LOG_INFO "检查hdfs命令是否可用"
- if ! command -v hdfs &> /dev/null; then
- LOG_ERROR "hdfs命令不存在或不支持"
- exit 255
- fi
-
- # 测试写入文件到HDFS
- LOG_INFO "测试写入文件到HDFS"
- TEST_FILE="/tmp/test_libhdfs_function_write.txt"
- echo "test content" > $TEST_FILE
-
- hdfs dfs -put $TEST_FILE /tmp/test_libhdfs_function_write.txt
- CHECK_RESULT $? 0 0 "写入文件到HDFS失败"
-
- # 验证文件是否成功写入
- LOG_INFO "验证文件是否成功写入"
- hdfs dfs -test -e /tmp/test_libhdfs_function_write.txt
- CHECK_RESULT $? 0 0 "文件未成功写入HDFS"
-
- # 清理测试文件
- LOG_INFO "清理测试文件"
- hdfs dfs -rm -f /tmp/test_libhdfs_function_write.txt
- rm -f $TEST_FILE
-
- # 恢复环境
- if [ "$INSTALLED" = true ]; then
- LOG_INFO "卸载临时安装的软件包"
- dnf remove -y hadoop-hdfs
- CHECK_RESULT $? 0 0 "卸载hadoop-hdfs失败"
- fi
-
- LOG_INFO "测试完成:Test writing to a file in HDFS"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/openwebbeans/openwebbeans-test/test_openwebbeans-test_function_alternatives.sh b/testcases/function_test/pkg_test/openwebbeans/openwebbeans-test/test_openwebbeans-test_function_alternatives.sh
deleted file mode 100644
index 7c77c61e02a..00000000000
--- a/testcases/function_test/pkg_test/openwebbeans/openwebbeans-test/test_openwebbeans-test_function_alternatives.sh
+++ /dev/null
@@ -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-03
-# @License : Mulan PSL v2
-# @Desc : Test the use of @Alternative and selection
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试:Test the use of @Alternative and selection"
-
- # 检查是否已安装openwebbeans软件包
- if dnf list installed openwebbeans &>/dev/null; then
- LOG_INFO "openwebbeans软件包已安装,脚本结束时将保持安装状态"
- INSTALLED=true
- else
- LOG_INFO "openwebbeans软件包未安装,将在测试步骤中安装"
- INSTALLED=false
- fi
-
- # 检查yum源中是否有openwebbeans软件包
- LOG_INFO "检查yum源中是否存在openwebbeans软件包"
- if ! dnf list available openwebbeans &>/dev/null; then
- LOG_ERROR "yum源中未找到openwebbeans软件包"
- exit 255
- fi
-
- # 安装软件包(如果未安装)
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "安装openwebbeans软件包"
- dnf install -y openwebbeans
- CHECK_RESULT $? 0 0 "安装openwebbeans软件包失败"
- fi
-
- # 测试@Alternative和selection功能
- LOG_INFO "测试@Alternative和selection功能"
- # 这里假设有一个测试命令或脚本来验证功能
- # 例如:运行一个Java程序或使用特定工具
- # 假设测试命令为:test-alternative-command
- if command -v test-alternative-command &>/dev/null; then
- LOG_INFO "执行test-alternative-command命令"
- test-alternative-command --option value
- CHECK_RESULT $? 0 0 "test-alternative-command命令执行失败"
- else
- LOG_ERROR "test-alternative-command命令不存在或不支持"
- exit 255
- fi
-
- # 清理环境:如果之前未安装,则卸载软件包
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "卸载openwebbeans软件包"
- dnf remove -y openwebbeans
- CHECK_RESULT $? 0 0 "卸载openwebbeans软件包失败"
- fi
-
- LOG_INFO "测试完成:Test the use of @Alternative and selection"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/openwebbeans/openwebbeans-test/test_openwebbeans-test_function_basic_bean.sh b/testcases/function_test/pkg_test/openwebbeans/openwebbeans-test/test_openwebbeans-test_function_basic_bean.sh
deleted file mode 100644
index 01087b13289..00000000000
--- a/testcases/function_test/pkg_test/openwebbeans/openwebbeans-test/test_openwebbeans-test_function_basic_bean.sh
+++ /dev/null
@@ -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-03-03
-# @License : Mulan PSL v2
-# @Desc : Test basic bean creation and injection
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试:Test basic bean creation and injection"
-
- # 定义软件包名称
- PACKAGE_NAME="openwebbeans-test-function-basic-bean"
-
- # 步骤1:检查yum源中是否存在指定软件包
- LOG_INFO "步骤1:检查yum源中是否存在软件包 ${PACKAGE_NAME}"
- dnf list available ${PACKAGE_NAME} > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "软件包 ${PACKAGE_NAME} 在yum源中不存在"
- exit 255
- fi
-
- # 步骤2:检查是否已安装软件包
- LOG_INFO "步骤2:检查是否已安装软件包 ${PACKAGE_NAME}"
- rpm -q ${PACKAGE_NAME} > /dev/null 2>&1
- if [ $? -eq 0 ]; then
- LOG_INFO "软件包 ${PACKAGE_NAME} 已安装,测试结束后将保持安装状态"
- ALREADY_INSTALLED=1
- else
- LOG_INFO "软件包 ${PACKAGE_NAME} 未安装,将在测试过程中安装"
- ALREADY_INSTALLED=0
- fi
-
- # 步骤3:如果未安装,则安装软件包
- if [ ${ALREADY_INSTALLED} -eq 0 ]; then
- LOG_INFO "步骤3:安装软件包 ${PACKAGE_NAME}"
- dnf install -y ${PACKAGE_NAME}
- CHECK_RESULT $? 0 0 "安装软件包 ${PACKAGE_NAME} 失败"
- fi
-
- # 步骤4:执行测试命令,测试基本bean的创建和注入
- LOG_INFO "步骤4:执行测试命令,测试基本bean的创建和注入"
- # 假设测试命令为 test-basic-bean,这里根据实际情况调整命令
- test-basic-bean --test-param valid_value
- CHECK_RESULT $? 0 0 "测试命令执行失败,基本bean创建和注入测试未通过"
-
- # 步骤5:检查测试命令的参数支持情况
- LOG_INFO "步骤5:检查测试命令的参数支持情况"
- test-basic-bean --invalid-param > /dev/null 2>&1
- if [ $? -ne 255 ]; then
- LOG_ERROR "测试命令不支持指定的参数或参数不存在"
- exit 255
- fi
-
- # 步骤6:清理环境,如果测试前未安装则卸载软件包
- if [ ${ALREADY_INSTALLED} -eq 0 ]; then
- LOG_INFO "步骤6:卸载软件包 ${PACKAGE_NAME}"
- dnf remove -y ${PACKAGE_NAME}
- CHECK_RESULT $? 0 0 "卸载软件包 ${PACKAGE_NAME} 失败"
- else
- LOG_INFO "步骤6:测试前已安装软件包,保持安装状态"
- fi
-
- LOG_INFO "测试完成:Test basic bean creation and injection"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/openwebbeans/openwebbeans-test/test_openwebbeans-test_function_di.sh b/testcases/function_test/pkg_test/openwebbeans/openwebbeans-test/test_openwebbeans-test_function_di.sh
deleted file mode 100644
index 6014bbc404e..00000000000
--- a/testcases/function_test/pkg_test/openwebbeans/openwebbeans-test/test_openwebbeans-test_function_di.sh
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/usr/bin/bash
-
-# Copyright (c) 2024 ISCAS .ALL rights reserved.
-# This program is licensed under Mulan PSL v2.
-# You can use it according to the terms and conditions of the Mulan PSL v2.
-# http://license.coscl.org.cn/MulanPSL2
-# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
-# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
-# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
-# See the Mulan PSL v2 for more details.
-
-# #############################################
-# @Author : honghua
-# @Contact : honghua@iscas.ac.cn
-# @Date : 2025-11-29
-# @License : Mulan PSL v2
-# @Desc : Test dependency injection functionality
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 检查软件包是否已安装
- if dnf list installed openwebbeans-test-function-di &>/dev/null; then
- LOG_INFO "环境已安装openwebbeans-test-function-di软件包"
- INSTALLED=true
- else
- LOG_INFO "环境未安装openwebbeans-test-function-di软件包"
- INSTALLED=false
- fi
-
- # 检查yum源中是否存在该软件包
- LOG_INFO "检查yum源中是否存在openwebbeans-test-function-di软件包"
- if ! dnf list available openwebbeans-test-function-di &>/dev/null; then
- LOG_ERROR "yum源中不存在openwebbeans-test-function-di软件包"
- exit 255
- fi
-
- # 如果未安装,则安装软件包
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "开始安装openwebbeans-test-function-di软件包"
- dnf install -y openwebbeans-test-function-di
- CHECK_RESULT $? 0 0 "安装openwebbeans-test-function-di软件包失败"
- fi
-
- # 测试依赖注入功能
- LOG_INFO "测试依赖注入功能"
- TEST_COMMAND="openwebbeans-test-function-di --test-di"
- if ! $TEST_COMMAND; then
- LOG_ERROR "依赖注入功能测试失败"
- if [ "$INSTALLED" = false ]; then
- dnf remove -y openwebbeans-test-function-di
- CHECK_RESULT $? 0 0 "卸载openwebbeans-test-function-di软件包失败"
- fi
- exit $?
- fi
-
- # 清理环境
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "卸载openwebbeans-test-function-di软件包"
- dnf remove -y openwebbeans-test-function-di
- CHECK_RESULT $? 0 0 "卸载openwebbeans-test-function-di软件包失败"
- fi
-
- LOG_INFO "测试完成,环境已恢复"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/openwebbeans/openwebbeans-test/test_openwebbeans-test_function_event.sh b/testcases/function_test/pkg_test/openwebbeans/openwebbeans-test/test_openwebbeans-test_function_event.sh
deleted file mode 100644
index 32bec6b43d6..00000000000
--- a/testcases/function_test/pkg_test/openwebbeans/openwebbeans-test/test_openwebbeans-test_function_event.sh
+++ /dev/null
@@ -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 : 2025-12-07
-# @License : Mulan PSL v2
-# @Desc : Test event handling functionality
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试事件处理功能"
-
- # 检查软件包是否已安装
- LOG_INFO "检查openwebbeans-test_function_event软件包是否已安装"
- if rpm -q openwebbeans-test_function_event &>/dev/null; then
- LOG_INFO "软件包已安装,测试完成后将保持安装状态"
- INSTALLED=true
- else
- LOG_INFO "软件包未安装,测试完成后将卸载软件包"
- INSTALLED=false
- fi
-
- # 检查yum源中是否存在软件包
- LOG_INFO "检查yum源中是否存在openwebbeans-test_function_event软件包"
- if ! dnf list available openwebbeans-test_function_event &>/dev/null; then
- LOG_ERROR "yum源中未找到openwebbeans-test_function_event软件包"
- exit 255
- fi
-
- # 安装软件包
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "安装openwebbeans-test_function_event软件包"
- dnf install -y openwebbeans-test_function_event
- CHECK_RESULT $? 0 0 "安装软件包失败"
- fi
-
- # 测试事件处理功能
- LOG_INFO "测试事件处理功能"
- test_event_output=$(openwebbeans-test_function_event --test-event)
- CHECK_RESULT $? 0 0 "事件处理功能测试失败"
-
- # 检查参数支持情况
- LOG_INFO "检查不支持的参数"
- openwebbeans-test_function_event --invalid-param &>/dev/null
- if [ $? -ne 255 ]; then
- LOG_ERROR "不支持参数--invalid-param,但未返回退出码255"
- exit 255
- fi
-
- # 清理环境:如果测试前未安装,则卸载软件包
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "卸载openwebbeans-test_function_event软件包"
- dnf remove -y openwebbeans-test_function_event
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- fi
-
- LOG_INFO "测试事件处理功能完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/openwebbeans/openwebbeans-test/test_openwebbeans-test_function_help.sh b/testcases/function_test/pkg_test/openwebbeans/openwebbeans-test/test_openwebbeans-test_function_help.sh
deleted file mode 100644
index b1e8b27d4b6..00000000000
--- a/testcases/function_test/pkg_test/openwebbeans/openwebbeans-test/test_openwebbeans-test_function_help.sh
+++ /dev/null
@@ -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-03-03
-# @License : Mulan PSL v2
-# @Desc : Test accessing the package help or usage information
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试:Test accessing the package help or usage information"
-
- # 定义软件包名称
- PACKAGE_NAME="openwebbeans-test-function-help"
- 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 已安装,测试结束后保持安装状态"
- ALREADY_INSTALLED=1
- else
- LOG_INFO "软件包 $PACKAGE_NAME 未安装,将进行安装测试"
- ALREADY_INSTALLED=0
- fi
-
- # 如果未安装,则安装软件包
- if [ $ALREADY_INSTALLED -eq 0 ]; then
- LOG_INFO "测试步骤:安装软件包 $PACKAGE_NAME"
- dnf install -y $PACKAGE_NAME
- CHECK_RESULT $? 0 0 "安装软件包 $PACKAGE_NAME 失败"
- fi
-
- # 测试获取帮助信息
- LOG_INFO "测试步骤:执行命令获取软件包帮助信息"
- command_name="openwebbeans-test-function-help"
- if ! command -v $command_name &>/dev/null; then
- LOG_ERROR "命令 $command_name 不存在"
- exit 255
- fi
-
- $command_name --help &>/dev/null
- CHECK_RESULT $? 0 0 "执行命令 $command_name --help 失败"
-
- # 测试获取使用信息
- LOG_INFO "测试步骤:执行命令获取软件包使用信息"
- $command_name --usage &>/dev/null
- CHECK_RESULT $? 0 0 "执行命令 $command_name --usage 失败"
-
- # 环境恢复:如果测试前未安装,则卸载软件包
- if [ $ALREADY_INSTALLED -eq 0 ]; then
- LOG_INFO "测试步骤:卸载软件包 $PACKAGE_NAME"
- dnf remove -y $PACKAGE_NAME
- CHECK_RESULT $? 0 0 "卸载软件包 $PACKAGE_NAME 失败"
- else
- LOG_INFO "测试步骤:保持软件包 $PACKAGE_NAME 安装状态"
- fi
-
- LOG_INFO "测试完成:Test accessing the package help or usage information"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/openwebbeans/openwebbeans-test/test_openwebbeans-test_function_install.sh b/testcases/function_test/pkg_test/openwebbeans/openwebbeans-test/test_openwebbeans-test_function_install.sh
deleted file mode 100644
index 076a48ffe4a..00000000000
--- a/testcases/function_test/pkg_test/openwebbeans/openwebbeans-test/test_openwebbeans-test_function_install.sh
+++ /dev/null
@@ -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-03-03
-# @License : Mulan PSL v2
-# @Desc : Test installation of the openwebbeans-test package
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- set -e
-
- # 步骤1: 检查环境是否已安装openwebbeans-test
- LOG_INFO "检查openwebbeans-test是否已安装"
- if dnf list installed openwebbeans-test &>/dev/null; then
- LOG_INFO "openwebbeans-test已安装,测试结束后将保持安装状态"
- INSTALLED_BEFORE_TEST=true
- else
- LOG_INFO "openwebbeans-test未安装,将在测试中安装"
- INSTALLED_BEFORE_TEST=false
- fi
-
- # 步骤2: 检查yum源中是否有openwebbeans-test包
- LOG_INFO "检查yum源中是否存在openwebbeans-test包"
- if ! dnf list available openwebbeans-test &>/dev/null; then
- LOG_ERROR "yum源中未找到openwebbeans-test包"
- exit 255
- fi
-
- # 步骤3: 如果未安装则安装openwebbeans-test
- if [ "$INSTALLED_BEFORE_TEST" = false ]; then
- LOG_INFO "开始安装openwebbeans-test"
- dnf install -y openwebbeans-test
- CHECK_RESULT $? 0 0 "安装openwebbeans-test失败"
- fi
-
- # 步骤4: 验证安装
- LOG_INFO "验证openwebbeans-test安装"
- dnf list installed openwebbeans-test
- CHECK_RESULT $? 0 0 "openwebbeans-test安装验证失败"
-
- # 步骤5: 测试openwebbeans-test功能
- LOG_INFO "测试openwebbeans-test功能"
- # 这里添加具体的功能测试命令,例如:
- # openwebbeans-test --version
- # 如果命令参数不存在或不支持,则退出码为255
- if ! openwebbeans-test --help &>/dev/null; then
- LOG_ERROR "openwebbeans-test命令参数不支持"
- exit 255
- fi
- # 执行具体的测试命令,这里以--version为例
- openwebbeans-test --version
- CHECK_RESULT $? 0 0 "openwebbeans-test功能测试失败"
-
- # 步骤6: 清理环境
- LOG_INFO "清理测试环境"
- if [ "$INSTALLED_BEFORE_TEST" = false ]; then
- LOG_INFO "卸载openwebbeans-test"
- dnf remove -y openwebbeans-test
- CHECK_RESULT $? 0 0 "卸载openwebbeans-test失败"
- else
- LOG_INFO "测试前已安装openwebbeans-test,保持安装状态"
- fi
-
- LOG_INFO "测试完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/openwebbeans/openwebbeans-test/test_openwebbeans-test_function_interceptor.sh b/testcases/function_test/pkg_test/openwebbeans/openwebbeans-test/test_openwebbeans-test_function_interceptor.sh
deleted file mode 100644
index 2d7ebf4e927..00000000000
--- a/testcases/function_test/pkg_test/openwebbeans/openwebbeans-test/test_openwebbeans-test_function_interceptor.sh
+++ /dev/null
@@ -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-03
-# @License : Mulan PSL v2
-# @Desc : Test interceptor binding and execution
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试:Test interceptor binding and execution"
-
- # 定义软件包名称
- PACKAGE_NAME="openwebbeans-test-function-interceptor"
-
- # 检查软件包是否已经在yum源中
- LOG_INFO "检查yum源中是否存在软件包 $PACKAGE_NAME"
- if ! dnf list available "$PACKAGE_NAME" &>/dev/null; then
- LOG_ERROR "软件包 $PACKAGE_NAME 在yum源中不存在"
- 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
-
- # 测试interceptor binding and execution
- LOG_INFO "执行interceptor binding and execution测试"
- # 这里假设测试命令是运行一个特定的测试程序或脚本
- # 例如:/usr/bin/test-openwebbeans-function-interceptor
- TEST_COMMAND="/usr/bin/test-openwebbeans-function-interceptor"
- if [ ! -x "$TEST_COMMAND" ]; then
- LOG_ERROR "测试命令 $TEST_COMMAND 不存在或不可执行"
- exit 255
- fi
-
- # 执行测试命令
- $TEST_COMMAND
- CHECK_RESULT $? 0 0 "interceptor binding and execution 测试失败"
-
- # 如果需要多个服务器并在第二个服务器上执行命令,示例:
- # LOG_INFO "在第二个服务器上执行命令"
- # SSH_CMD "ls" "$NODE2_IPV4" "$NODE2_PASSWORD" "$NODE2_USER"
- # CHECK_RESULT $? 0 0 "在第二个服务器上执行命令失败"
-
- # 清理环境:如果测试前未安装,则卸载软件包
- if [ "$INSTALLED_BEFORE" = false ]; then
- LOG_INFO "卸载软件包 $PACKAGE_NAME"
- dnf remove -y "$PACKAGE_NAME"
- CHECK_RESULT $? 0 0 "卸载软件包 $PACKAGE_NAME 失败"
- else
- LOG_INFO "测试前软件包已安装,保持安装状态"
- fi
-
- LOG_INFO "测试完成:Test interceptor binding and execution"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/openwebbeans/openwebbeans-test/test_openwebbeans-test_function_scope.sh b/testcases/function_test/pkg_test/openwebbeans/openwebbeans-test/test_openwebbeans-test_function_scope.sh
deleted file mode 100644
index df3c4e54d7a..00000000000
--- a/testcases/function_test/pkg_test/openwebbeans/openwebbeans-test/test_openwebbeans-test_function_scope.sh
+++ /dev/null
@@ -1,93 +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-03
-# @License : Mulan PSL v2
-# @Desc : Test bean scope functionality (e.g., @ApplicationScoped, @RequestScoped)
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- set -e
-
- LOG_INFO "开始测试OpenWebBeans的bean scope功能(如@ApplicationScoped、@RequestScoped)"
-
- # 检查软件包是否在yum源中
- LOG_INFO "检查openwebbeans-test软件包是否在yum源中"
- if ! dnf list available openwebbeans-test &>/dev/null; then
- LOG_ERROR "yum源中未找到openwebbeans-test软件包"
- exit 255
- fi
-
- # 检查环境是否已安装
- LOG_INFO "检查环境是否已安装openwebbeans-test"
- if rpm -q openwebbeans-test &>/dev/null; then
- INSTALLED=true
- LOG_INFO "检测到openwebbeans-test已安装,测试后将保持安装状态"
- else
- INSTALLED=false
- LOG_INFO "未安装openwebbeans-test,将进行安装"
- fi
-
- # 如果未安装,则安装软件包
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "安装openwebbeans-test软件包"
- dnf install -y openwebbeans-test
- CHECK_RESULT $? 0 0 "安装openwebbeans-test失败"
- fi
-
- # 测试@ApplicationScoped功能
- LOG_INFO "测试@ApplicationScoped bean scope功能"
- # 执行相关测试命令,这里假设有一个测试命令test-application-scoped
- # 如果命令参数不存在或不支持,则退出
- if ! command -v test-application-scoped &>/dev/null; then
- LOG_ERROR "test-application-scoped命令不存在或不支持"
- exit 255
- fi
- test-application-scoped --test-scope application
- CHECK_RESULT $? 0 0 "@ApplicationScoped功能测试失败"
-
- # 测试@RequestScoped功能
- LOG_INFO "测试@RequestScoped bean scope功能"
- # 执行相关测试命令,这里假设有一个测试命令test-request-scoped
- # 如果命令参数不存在或不支持,则退出
- if ! command -v test-request-scoped &>/dev/null; then
- LOG_ERROR "test-request-scoped命令不存在或不支持"
- exit 255
- fi
- test-request-scoped --test-scope request
- CHECK_RESULT $? 0 0 "@RequestScoped功能测试失败"
-
- # 如果需要多服务器测试,在第二个节点执行命令
- LOG_INFO "在多服务器环境中测试bean scope功能"
- # 假设需要在第二个节点上执行测试命令
- SSH_CMD "test-application-scoped --test-scope application" $NODE2_IPV4 $NODE2_PASSWORD $NODE2_USER
- CHECK_RESULT $? 0 0 "在第二个节点上测试@ApplicationScoped失败"
- SSH_CMD "test-request-scoped --test-scope request" $NODE2_IPV4 $NODE2_PASSWORD $NODE2_USER
- CHECK_RESULT $? 0 0 "在第二个节点上测试@RequestScoped失败"
-
- # 清理环境:如果测试前未安装,则卸载软件包
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "清理环境:卸载openwebbeans-test软件包"
- dnf remove -y openwebbeans-test
- CHECK_RESULT $? 0 0 "卸载openwebbeans-test失败"
- else
- LOG_INFO "环境已安装openwebbeans-test,保持安装状态"
- fi
-
- LOG_INFO "OpenWebBeans bean scope功能测试完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/openwebbeans/openwebbeans-test/test_openwebbeans-test_function_uninstall.sh b/testcases/function_test/pkg_test/openwebbeans/openwebbeans-test/test_openwebbeans-test_function_uninstall.sh
deleted file mode 100644
index b2462ff7d0d..00000000000
--- a/testcases/function_test/pkg_test/openwebbeans/openwebbeans-test/test_openwebbeans-test_function_uninstall.sh
+++ /dev/null
@@ -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-03-03
-# @License : Mulan PSL v2
-# @Desc : Test uninstallation of the openwebbeans-test package
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 定义颜色输出函数(可选,用于日志高亮)
- LOG_INFO() {
- echo -e "\033[32m[INFO]\033[0m $*"
- }
- LOG_ERROR() {
- echo -e "\033[31m[ERROR]\033[0m $*"
- }
-
- # 定义软件包名称
- PACKAGE_NAME="openwebbeans-test"
-
- # 步骤1:检查软件包是否已在yum源中
- LOG_INFO "检查软件包是否在yum源中"
- dnf list available "$PACKAGE_NAME" > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "软件包 $PACKAGE_NAME 不在yum源中"
- exit 255
- fi
-
- # 步骤2:检查当前是否已安装
- LOG_INFO "检查当前是否已安装 $PACKAGE_NAME"
- if rpm -q "$PACKAGE_NAME" > /dev/null 2>&1; then
- LOG_INFO "软件包 $PACKAGE_NAME 已安装,脚本结束后将保持安装状态"
- INSTALLED_BEFORE=true
- else
- LOG_INFO "软件包 $PACKAGE_NAME 未安装,将执行安装测试"
- INSTALLED_BEFORE=false
- fi
-
- # 步骤3:如果未安装,则安装软件包
- if [ "$INSTALLED_BEFORE" = "false" ]; then
- LOG_INFO "安装软件包 $PACKAGE_NAME"
- dnf install -y "$PACKAGE_NAME"
- CHECK_RESULT $? 0 0 "安装软件包失败"
- fi
-
- # 步骤4:验证软件包功能(示例:检查版本或运行测试命令)
- LOG_INFO "验证软件包功能"
- # 假设软件包提供了一个测试命令,这里以检查版本为例
- if command -v openwebbeans-test > /dev/null 2>&1; then
- openwebbeans-test --version > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "软件包功能验证失败"
- else
- LOG_ERROR "软件包未提供预期命令,参数可能不存在或不支持"
- exit 255
- fi
-
- # 步骤5:卸载软件包(仅在之前未安装的情况下)
- if [ "$INSTALLED_BEFORE" = "false" ]; then
- LOG_INFO "卸载软件包 $PACKAGE_NAME"
- dnf remove -y "$PACKAGE_NAME"
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- fi
-
- # 步骤6:验证卸载结果
- LOG_INFO "验证卸载结果"
- if rpm -q "$PACKAGE_NAME" > /dev/null 2>&1; then
- LOG_ERROR "软件包卸载失败"
- exit 1
- else
- LOG_INFO "软件包卸载成功"
- fi
-
- # 步骤7:清理环境(如果需要)
- LOG_INFO "清理测试环境"
- # 这里可以添加额外的清理步骤,例如删除临时文件等
- # 但根据需求,主要清理已由卸载步骤完成
-
- LOG_INFO "测试完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/openwebbeans/openwebbeans-test/test_openwebbeans-test_function_version.sh b/testcases/function_test/pkg_test/openwebbeans/openwebbeans-test/test_openwebbeans-test_function_version.sh
deleted file mode 100644
index e94867914eb..00000000000
--- a/testcases/function_test/pkg_test/openwebbeans/openwebbeans-test/test_openwebbeans-test_function_version.sh
+++ /dev/null
@@ -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-03-03
-# @License : Mulan PSL v2
-# @Desc : Test checking the installed package version
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- PACKAGE_NAME="openwebbeans-test-function-version"
- TEST_COMMAND="rpm -q $PACKAGE_NAME"
-
- LOG_INFO "开始测试:检查已安装软件包版本"
-
- LOG_INFO "步骤1:检查软件包是否已在yum源中"
- dnf list available $PACKAGE_NAME > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中未找到软件包:$PACKAGE_NAME"
- exit 255
- fi
- LOG_INFO "软件包 $PACKAGE_NAME 在yum源中存在"
-
- LOG_INFO "步骤2:检查当前是否已安装软件包"
- rpm -q $PACKAGE_NAME > /dev/null 2>&1
- IS_INSTALLED=$?
-
- if [ $IS_INSTALLED -eq 0 ]; then
- LOG_INFO "软件包已安装,测试后保持安装状态"
- NEED_CLEANUP=0
- else
- LOG_INFO "软件包未安装,将在测试后清理"
- NEED_CLEANUP=1
-
- LOG_INFO "步骤3:安装软件包"
- dnf install -y $PACKAGE_NAME
- CHECK_RESULT $? 0 0 "安装软件包失败"
- LOG_INFO "软件包安装成功"
- fi
-
- LOG_INFO "步骤4:执行测试命令"
- eval $TEST_COMMAND
- CHECK_RESULT $? 0 0 "执行命令失败"
- LOG_INFO "命令执行成功,软件包版本信息正常显示"
-
- if [ $NEED_CLEANUP -eq 1 ]; then
- LOG_INFO "步骤5:清理环境,卸载软件包"
- dnf remove -y $PACKAGE_NAME
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- LOG_INFO "软件包卸载成功"
- else
- LOG_INFO "步骤5:保持安装状态,无需清理"
- fi
-
- LOG_INFO "测试完成:检查已安装软件包版本"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_function_convert_md_to_nb.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_function_convert_md_to_nb.sh
deleted file mode 100644
index 2c0e8e9fce6..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_function_convert_md_to_nb.sh
+++ /dev/null
@@ -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-16
-# @License : Mulan PSL v2
-# @Desc : 测试Markdown转Jupyter笔记本
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试:Markdown转Jupyter笔记本"
-
- LOG_INFO "检查是否已安装python3-myst-nb"
- dnf list installed python3-myst-nb > /dev/null 2>&1
- if [ $? -eq 0 ]; then
- LOG_INFO "python3-myst-nb已安装,测试结束后将保持安装状态"
- INSTALLED_BEFORE="true"
- else
- LOG_INFO "python3-myst-nb未安装,将在测试过程中安装"
- INSTALLED_BEFORE="false"
- fi
-
- LOG_INFO "检查yum源中是否有python3-myst-nb软件包"
- dnf list available python3-myst-nb > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中未找到python3-myst-nb软件包"
- exit 255
- fi
-
- if [ "$INSTALLED_BEFORE" = "false" ]; then
- LOG_INFO "安装python3-myst-nb软件包"
- dnf install -y python3-myst-nb
- CHECK_RESULT $? 0 0 "安装python3-myst-nb失败"
- fi
-
- LOG_INFO "检查myst命令是否支持convert_md_to_nb参数"
- myst help convert_md_to_nb > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "myst命令不支持convert_md_to_nb参数"
- exit 255
- fi
-
- LOG_INFO "创建一个测试用的Markdown文件"
- cat > test_input.md << "EOF"
- # 测试标题
- 这是一个测试段落。
- - 列表项1
- - 列表项2
- EOF
- CHECK_RESULT $? 0 0 "创建测试Markdown文件失败"
-
- LOG_INFO "执行Markdown转Jupyter笔记本命令"
- myst convert_md_to_nb test_input.md test_output.ipynb
- CHECK_RESULT $? 0 0 "Markdown转Jupyter笔记本失败"
-
- LOG_INFO "检查转换后的Jupyter笔记本文件是否存在"
- ls test_output.ipynb > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "未生成Jupyter笔记本文件"
-
- LOG_INFO "清理测试文件"
- rm -f test_input.md test_output.ipynb
- CHECK_RESULT $? 0 0 "清理测试文件失败"
-
- if [ "$INSTALLED_BEFORE" = "false" ]; then
- LOG_INFO "卸载python3-myst-nb软件包"
- dnf remove -y python3-myst-nb
- CHECK_RESULT $? 0 0 "卸载python3-myst-nb失败"
- LOG_INFO "测试结束,环境已恢复"
- else
- LOG_INFO "测试结束,环境保持安装状态"
- fi
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_function_convert_nb_to_html.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_function_convert_nb_to_html.sh
deleted file mode 100644
index 7afe3a1de78..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_function_convert_nb_to_html.sh
+++ /dev/null
@@ -1,105 +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-16
-# @License : Mulan PSL v2
-# @Desc : 测试笔记本转HTML文档
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试:笔记本转HTML文档功能"
- LOG_INFO "步骤1:检查是否已安装python3-myst-nb"
- if dnf list installed python3-myst-nb &>/dev/null; then
- LOG_INFO "python3-myst-nb已安装,脚本结束后保持安装状态"
- INSTALLED=true
- else
- LOG_INFO "python3-myst-nb未安装,将在测试中安装"
- INSTALLED=false
- fi
- LOG_INFO "步骤2:检查yum源中是否存在python3-myst-nb软件包"
- if ! dnf list available python3-myst-nb &>/dev/null; then
- LOG_ERROR "yum源中未找到python3-myst-nb软件包"
- exit 255
- fi
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "步骤3:安装python3-myst-nb软件包"
- dnf install -y python3-myst-nb
- CHECK_RESULT $? 0 0 "安装python3-myst-nb失败"
- fi
- LOG_INFO "步骤4:检查myst命令是否支持nb-to-html参数"
- if ! myst --help 2>&1 | grep -q "nb-to-html"; then
- LOG_ERROR "myst命令不支持nb-to-html参数"
- exit 255
- fi
- LOG_INFO "步骤5:创建测试用的笔记本文件"
- cat > test_notebook.ipynb << "EOF"
- {
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# 测试笔记本"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {},
- "outputs": [],
- "source": [
- "print("Hello, World!")"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "name": "python",
- "version": "3.8.5"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 4
- }
- EOF
- CHECK_RESULT $? 0 0 "创建测试笔记本文件失败"
- LOG_INFO "步骤6:执行myst nb-to-html命令转换笔记本为HTML"
- myst nb-to-html test_notebook.ipynb -o test_output.html
- CHECK_RESULT $? 0 0 "myst nb-to-html命令执行失败"
- LOG_INFO "步骤7:检查生成的HTML文件是否存在"
- if [ -f test_output.html ]; then
- LOG_INFO "成功生成HTML文件:test_output.html"
- else
- LOG_ERROR "未找到生成的HTML文件"
- exit 1
- fi
- LOG_INFO "步骤8:清理测试文件"
- rm -f test_notebook.ipynb test_output.html
- CHECK_RESULT $? 0 0 "清理测试文件失败"
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "步骤9:卸载python3-myst-nb软件包"
- dnf remove -y python3-myst-nb
- CHECK_RESULT $? 0 0 "卸载python3-myst-nb失败"
- fi
- LOG_INFO "测试完成:笔记本转HTML文档功能测试通过"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_function_execute_nb.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_function_execute_nb.sh
deleted file mode 100644
index 2e08d6f5861..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_function_execute_nb.sh
+++ /dev/null
@@ -1,76 +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-16
-# @License : Mulan PSL v2
-# @Desc : 测试执行笔记本代码
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- set -e
-
- LOG_INFO "开始测试:测试执行笔记本代码"
-
- LOG_INFO "步骤1:检查python3-myst-nb软件包是否在yum源中"
- if ! dnf list available python3-myst-nb &>/dev/null; then
- LOG_ERROR "python3-myst-nb软件包不在yum源中"
- exit 255
- fi
-
- LOG_INFO "步骤2:检查当前是否已安装python3-myst-nb"
- if rpm -q python3-myst-nb &>/dev/null; then
- LOG_INFO "python3-myst-nb已安装,测试后保持安装状态"
- INSTALLED=true
- else
- LOG_INFO "python3-myst-nb未安装,将在测试过程中安装"
- INSTALLED=false
- fi
-
- LOG_INFO "步骤3:检查myst-nb-execute命令是否存在"
- if ! command -v myst-nb-execute &>/dev/null; then
- LOG_INFO "myst-nb-execute命令不存在,尝试安装python3-myst-nb"
- if [ "$INSTALLED" = false ]; then
- dnf install -y python3-myst-nb
- CHECK_RESULT $? 0 0 "安装python3-myst-nb失败"
- fi
- fi
-
- LOG_INFO "步骤4:验证myst-nb-execute命令参数"
- if ! myst-nb-execute --help &>/dev/null; then
- LOG_ERROR "myst-nb-execute命令不支持--help参数"
- exit 255
- fi
-
- LOG_INFO "步骤5:执行笔记本代码测试"
- if ! myst-nb-execute --version &>/dev/null; then
- LOG_ERROR "执行myst-nb-execute --version失败"
- exit 1
- fi
- CHECK_RESULT $? 0 0 "执行笔记本代码失败"
-
- LOG_INFO "步骤6:清理环境"
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "卸载测试安装的python3-myst-nb软件包"
- dnf remove -y python3-myst-nb
- CHECK_RESULT $? 0 0 "卸载python3-myst-nb失败"
- else
- LOG_INFO "保持python3-myst-nb安装状态"
- fi
-
- LOG_INFO "测试完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_function_help.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_function_help.sh
deleted file mode 100644
index f13a0e442ae..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_function_help.sh
+++ /dev/null
@@ -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-16
-# @License : Mulan PSL v2
-# @Desc : 测试显示主命令帮助
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 检查是否已安装python3-myst-nb
- LOG_INFO "检查python3-myst-nb是否已安装"
- rpm -q python3-myst-nb > /dev/null 2>&1
- INSTALLED=$?
-
- # 记录初始安装状态
- if [ $INSTALLED -eq 0 ]; then
- LOG_INFO "python3-myst-nb已安装,测试后保持安装状态"
- NEED_CLEANUP=0
- else
- LOG_INFO "python3-myst-nb未安装,将在测试后卸载"
- NEED_CLEANUP=1
- fi
-
- # 检查yum源中是否有该软件包
- LOG_INFO "检查yum源中是否存在python3-myst-nb软件包"
- dnf list available python3-myst-nb > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "yum源中未找到python3-myst-nb软件包"
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中未找到python3-myst-nb软件包"
- exit 255
- fi
-
- # 如果未安装,则安装软件包
- if [ $INSTALLED -ne 0 ]; then
- LOG_INFO "安装python3-myst-nb软件包"
- dnf install -y python3-myst-nb > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "安装python3-myst-nb失败"
- if [ $? -ne 0 ]; then
- LOG_ERROR "安装python3-myst-nb失败"
- exit 1
- fi
- fi
-
- # 测试显示主命令帮助
- LOG_INFO "测试显示主命令帮助"
- myst --help > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "myst --help命令执行失败"
- if [ $? -ne 0 ]; then
- LOG_ERROR "myst --help命令执行失败"
- # 如果不是参数不存在的情况,按标准退出码退出
- myst --help 2>&1 | grep -q "unrecognized argument\|invalid choice\|no such option"
- if [ $? -ne 0 ]; then
- exit $?
- else
- exit 255
- fi
- fi
-
- # 检查帮助信息是否包含基本内容
- LOG_INFO "检查帮助信息是否包含基本内容"
- myst --help 2>&1 | grep -q -E "(usage:|myst|help)"
- CHECK_RESULT $? 0 0 "帮助信息不完整"
-
- # 清理环境
- LOG_INFO "清理测试环境"
- if [ $NEED_CLEANUP -eq 1 ]; then
- LOG_INFO "卸载python3-myst-nb软件包"
- dnf remove -y python3-myst-nb > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "卸载python3-myst-nb失败"
- fi
-
- LOG_INFO "测试完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_function_install.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_function_install.sh
deleted file mode 100644
index 14c2e7d0ec5..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_function_install.sh
+++ /dev/null
@@ -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-03-16
-# @License : Mulan PSL v2
-# @Desc : 测试软件包安装
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 检查是否已安装python3-myst-nb-function软件包
- LOG_INFO "步骤1:检查python3-myst-nb-function软件包是否已安装"
- if dnf list installed python3-myst-nb-function &> /dev/null; then
- LOG_INFO "python3-myst-nb-function软件包已安装,测试结束后将保持安装状态"
- INSTALLED_BEFORE_TEST=1
- else
- LOG_INFO "python3-myst-nb-function软件包未安装,将在测试结束后卸载"
- INSTALLED_BEFORE_TEST=0
- fi
-
- # 检查yum源中是否有python3-myst-nb-function软件包
- LOG_INFO "步骤2:检查yum源中是否有python3-myst-nb-function软件包"
- if ! dnf list available python3-myst-nb-function &> /dev/null; then
- LOG_ERROR "yum源中未找到python3-myst-nb-function软件包"
- exit 255
- fi
- LOG_INFO "yum源中存在python3-myst-nb-function软件包"
-
- # 如果未安装,则安装软件包
- if [ ${INSTALLED_BEFORE_TEST} -eq 0 ]; then
- LOG_INFO "步骤3:安装python3-myst-nb-function软件包"
- dnf install -y python3-myst-nb-function
- CHECK_RESULT $? 0 0 "安装python3-myst-nb-function软件包失败"
- fi
-
- # 验证软件包安装成功
- LOG_INFO "步骤4:验证python3-myst-nb-function软件包安装成功"
- dnf list installed python3-myst-nb-function &> /dev/null
- CHECK_RESULT $? 0 0 "验证python3-myst-nb-function软件包安装失败"
-
- # 测试软件包基本功能
- LOG_INFO "步骤5:测试python3-myst-nb-function软件包基本功能"
- # 此处假设软件包提供了某个命令或功能,例如myst-nb-function --version
- if command -v myst-nb-function &> /dev/null; then
- myst-nb-function --version
- CHECK_RESULT $? 0 0 "执行myst-nb-function --version命令失败"
- else
- # 如果软件包没有提供myst-nb-function命令,尝试其他方式验证
- LOG_INFO "软件包未提供myst-nb-function命令,尝试其他验证方式"
- # 例如检查相关文件是否存在
- if [ -f /usr/lib/python3/site-packages/myst_nb_function/__init__.py ]; then
- LOG_INFO "找到myst_nb_function模块文件,基本功能验证通过"
- else
- LOG_ERROR "未找到myst_nb_function模块文件,基本功能验证失败"
- exit 1
- fi
- fi
-
- # 清理环境:如果测试前未安装,则卸载软件包
- if [ ${INSTALLED_BEFORE_TEST} -eq 0 ]; then
- LOG_INFO "步骤6:清理环境,卸载python3-myst-nb-function软件包"
- dnf remove -y python3-myst-nb-function
- CHECK_RESULT $? 0 0 "卸载python3-myst-nb-function软件包失败"
- LOG_INFO "环境已恢复,python3-myst-nb-function软件包已卸载"
- else
- LOG_INFO "步骤6:保持python3-myst-nb-function软件包安装状态"
- fi
-
- LOG_INFO "测试完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_function_mystnb_quickstart.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_function_mystnb_quickstart.sh
deleted file mode 100644
index 1edcc5e07c8..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_function_mystnb_quickstart.sh
+++ /dev/null
@@ -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 : 2025-12-01
-# @License : Mulan PSL v2
-# @Desc : 测试 mystnb-quickstart 命令的基本功能,指定输出目录
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
-
- # 检查是否已安装mystnb-quickstart
- LOG_INFO "检查是否已安装mystnb-quickstart"
- if dnf list installed python3-myst-nb > /dev/null 2>&1; then
- LOG_INFO "python3-myst-nb已安装,脚本结束后将保持安装状态"
- INSTALLED=true
- else
- LOG_INFO "python3-myst-nb未安装,将在测试结束后卸载"
- INSTALLED=false
- fi
-
- # 检查yum源中是否存在python3-myst-nb软件包
- LOG_INFO "检查yum源中是否存在python3-myst-nb软件包"
- if ! dnf list available python3-myst-nb > /dev/null 2>&1; then
- LOG_ERROR "yum源中不存在python3-myst-nb软件包"
- exit 255
- fi
-
- # 安装python3-myst-nb软件包
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "安装python3-myst-nb软件包"
- dnf install -y python3-myst-nb
- CHECK_RESULT $? 0 0 "安装python3-myst-nb失败"
- fi
-
- # 测试mystnb-quickstart命令基本功能,指定输出目录
- LOG_INFO "测试mystnb-quickstart命令基本功能,指定输出目录"
- OUTPUT_DIR="/tmp/mystnb_test_output"
- mkdir -p "$OUTPUT_DIR"
- mystnb-quickstart --output-dir "$OUTPUT_DIR" > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "mystnb-quickstart命令执行失败"
-
- # 检查输出目录是否生成
- LOG_INFO "检查输出目录是否生成"
- if [ ! -d "$OUTPUT_DIR" ]; then
- LOG_ERROR "输出目录未生成"
- exit 1
- fi
-
- # 清理测试环境
- LOG_INFO "清理测试环境"
- rm -rf "$OUTPUT_DIR"
-
- # 如果脚本开始时未安装,则卸载软件包
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "卸载python3-myst-nb软件包"
- dnf remove -y python3-myst-nb > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "卸载python3-myst-nb失败"
- fi
-
- LOG_INFO "测试脚本执行完成"
-
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_function_quickstart.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_function_quickstart.sh
deleted file mode 100644
index 3cb1ca38b4d..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_function_quickstart.sh
+++ /dev/null
@@ -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-16
-# @License : Mulan PSL v2
-# @Desc : 测试创建基础项目
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试:测试创建基础项目"
- LOG_INFO "步骤1:检查yum源中是否存在python3-myst-nb-function-quickstart软件包"
- dnf list available python3-myst-nb-function-quickstart > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "yum源中未找到python3-myst-nb-function-quickstart软件包"
- if [ $? -eq 255 ]; then
- LOG_ERROR "软件包不存在,退出测试"
- exit 255
- fi
-
- LOG_INFO "步骤2:检查环境是否已安装python3-myst-nb-function-quickstart"
- rpm -q python3-myst-nb-function-quickstart > /dev/null 2>&1
- if [ $? -eq 0 ]; then
- LOG_INFO "环境已安装python3-myst-nb-function-quickstart,脚本结束时保持安装状态"
- INSTALLED=1
- else
- LOG_INFO "环境未安装python3-myst-nb-function-quickstart,将进行安装"
- INSTALLED=0
- fi
-
- if [ $INSTALLED -eq 0 ]; then
- LOG_INFO "步骤3:安装python3-myst-nb-function-quickstart软件包"
- dnf install -y python3-myst-nb-function-quickstart > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "安装python3-myst-nb-function-quickstart失败"
- fi
-
- LOG_INFO "步骤4:测试创建基础项目命令"
- myst-nb-function-quickstart --help > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "myst-nb-function-quickstart命令不存在或不支持"
-
- LOG_INFO "步骤5:执行创建基础项目命令"
- myst-nb-function-quickstart create test_project
- CHECK_RESULT $? 0 0 "创建基础项目失败"
-
- LOG_INFO "步骤6:验证创建的项目目录是否存在"
- [ -d "test_project" ]
- CHECK_RESULT $? 0 0 "项目目录未创建成功"
-
- LOG_INFO "步骤7:清理创建的项目目录"
- rm -rf test_project
- CHECK_RESULT $? 0 0 "清理项目目录失败"
-
- if [ $INSTALLED -eq 0 ]; then
- LOG_INFO "步骤8:卸载python3-myst-nb-function-quickstart软件包"
- dnf remove -y python3-myst-nb-function-quickstart > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "卸载python3-myst-nb-function-quickstart失败"
- fi
-
- LOG_INFO "测试完成:测试创建基础项目"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_function_version.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_function_version.sh
deleted file mode 100644
index 736cdb0215f..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_function_version.sh
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/usr/bin/bash
-
-# Copyright (c) 2024 ISCAS .ALL rights reserved.
-# This program is licensed under Mulan PSL v2.
-# You can use it according to the terms and conditions of the Mulan PSL v2.
-# http://license.coscl.org.cn/MulanPSL2
-# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
-# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
-# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
-# See the Mulan PSL v2 for more details.
-
-# #############################################
-# @Author : honghua
-# @Contact : honghua@iscas.ac.cn
-# @Date : 2026-03-16
-# @License : Mulan PSL v2
-# @Desc : 测试软件包版本查询
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试软件包版本查询功能"
- LOG_INFO "检查yum源中是否存在python3-myst-nb软件包"
- if ! dnf list available python3-myst-nb &>/dev/null; then
- LOG_ERROR "yum源中未找到python3-myst-nb软件包"
- exit 255
- fi
-
- LOG_INFO "检查当前是否已安装python3-myst-nb"
- if rpm -q python3-myst-nb &>/dev/null; then
- LOG_INFO "python3-myst-nb已安装,测试结束后保持安装状态"
- already_installed=1
- else
- LOG_INFO "python3-myst-nb未安装,将进行安装"
- already_installed=0
- LOG_INFO "安装python3-myst-nb软件包"
- dnf install -y python3-myst-nb
- CHECK_RESULT $? 0 0 "安装python3-myst-nb失败"
- fi
-
- LOG_INFO "测试python3-myst-nb版本查询功能"
- LOG_INFO "执行python3-myst-nb --version命令"
- python3-myst-nb --version
- CHECK_RESULT $? 0 0 "python3-myst-nb版本查询失败"
-
- LOG_INFO "测试python3-myst-nb -V命令"
- python3-myst-nb -V
- CHECK_RESULT $? 0 0 "python3-myst-nb -V版本查询失败"
-
- LOG_INFO "测试python3-myst-nb --help命令"
- python3-myst-nb --help
- CHECK_RESULT $? 0 0 "python3-myst-nb --help命令失败"
-
- LOG_INFO "测试不支持的参数"
- LOG_INFO "执行python3-myst-nb --invalid-param命令"
- python3-myst-nb --invalid-param 2>/dev/null
- if [ $? -eq 255 ]; then
- LOG_ERROR "python3-myst-nb不支持--invalid-param参数"
- exit 255
- fi
-
- LOG_INFO "清理测试环境"
- if [ $already_installed -eq 0 ]; then
- LOG_INFO "卸载python3-myst-nb软件包"
- dnf remove -y python3-myst-nb
- CHECK_RESULT $? 0 0 "卸载python3-myst-nb失败"
- else
- LOG_INFO "保持python3-myst-nb安装状态"
- fi
-
- LOG_INFO "测试完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html5_d.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html5_d.sh
deleted file mode 100644
index 4c114fc5a39..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html5_d.sh
+++ /dev/null
@@ -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 : 2025-12-01
-# @License : Mulan PSL v2
-# @Desc : 测试使用-d参数包含日期信息
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试使用-d参数包含日期信息"
-
- # 检查是否已安装myst-nb和docutils-html5软件包
- LOG_INFO "检查是否已安装myst-nb和docutils-html5软件包"
- if rpm -q myst-nb docutils-html5 >/dev/null 2>&1; then
- LOG_INFO "软件包已安装,测试结束后将保持安装状态"
- installed=true
- else
- installed=false
- fi
-
- # 检查yum源中是否存在myst-nb和docutils-html5软件包
- LOG_INFO "检查yum源中是否存在myst-nb和docutils-html5软件包"
- if ! dnf list available myst-nb docutils-html5 >/dev/null 2>&1; then
- LOG_ERROR "yum源中不存在myst-nb或docutils-html5软件包"
- exit 255
- fi
-
- # 如果未安装,则安装软件包
- if [ "$installed" = false ]; then
- LOG_INFO "安装myst-nb和docutils-html5软件包"
- dnf install -y myst-nb docutils-html5
- CHECK_RESULT $? 0 0 "安装软件包失败"
- fi
-
- # 测试使用-d参数包含日期信息
- LOG_INFO "测试使用-d参数包含日期信息"
- output=$(myst-nb -d "2023-10-01" 2>&1)
- if [ $? -ne 0 ]; then
- LOG_ERROR "命令执行失败,可能不支持-d参数"
- exit 255
- fi
-
- # 检查输出是否包含日期信息
- CHECK_RESULT $? 0 0 "命令执行失败"
-
- # 清理环境
- if [ "$installed" = false ]; then
- LOG_INFO "卸载myst-nb和docutils-html5软件包"
- dnf remove -y myst-nb docutils-html5
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- fi
-
- LOG_INFO "测试完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html5_g.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html5_g.sh
deleted file mode 100644
index dada78fbb38..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html5_g.sh
+++ /dev/null
@@ -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-12-01
-# @License : Mulan PSL v2
-# @Desc : 测试使用-g参数包含生成器信息
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试使用-g参数包含生成器信息"
-
- # 检查是否已安装python3-myst-nb和mystnb-docutils-html5
- if ! dnf list installed python3-myst-nb &>/dev/null || ! dnf list installed mystnb-docutils-html5 &>/dev/null; then
- LOG_INFO "环境未安装,将进行安装"
- # 检查yum源中是否有软件包
- if ! dnf list available python3-myst-nb &>/dev/null || ! dnf list available mystnb-docutils-html5 &>/dev/null; then
- LOG_ERROR "yum源中缺少必要的软件包"
- exit 255
- fi
-
- # 安装软件包
- dnf install -y python3-myst-nb mystnb-docutils-html5
- CHECK_RESULT $? 0 0 "安装软件包失败"
- else
- LOG_INFO "环境已安装,跳过安装步骤"
- fi
-
- # 测试使用-g参数
- LOG_INFO "测试使用-g参数包含生成器信息"
- output=$(python3 -m myst_nb --help | grep -w "\-g")
- if [ $? -ne 0 ]; then
- LOG_ERROR "-g参数不存在或不支持"
- exit 255
- fi
-
- CHECK_RESULT $? 0 0 "检查-g参数失败"
-
- # 清理环境
- if ! dnf list installed python3-myst-nb &>/dev/null || ! dnf list installed mystnb-docutils-html5 &>/dev/null; then
- LOG_INFO "清理环境,卸载软件包"
- dnf remove -y python3-myst-nb mystnb-docutils-html5
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- else
- LOG_INFO "环境保持原状,无需清理"
- fi
-
- LOG_INFO "测试完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html5_h.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html5_h.sh
deleted file mode 100644
index 8c3ff10cd6b..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html5_h.sh
+++ /dev/null
@@ -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-16
-# @License : Mulan PSL v2
-# @Desc : 测试-h参数显示帮助信息
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 判断是否已安装所需软件包
- LOG_INFO "检查是否已安装python3-myst-nb、mystnb-docutils-html5_h软件包"
- rpm -q python3-myst-nb > /dev/null 2>&1
- python3_myst_nb_installed=$?
- rpm -q mystnb-docutils-html5_h > /dev/null 2>&1
- mystnb_docutils_html5_h_installed=$?
-
- # 记录初始安装状态
- initial_installed=0
- if [ $python3_myst_nb_installed -eq 0 ] && [ $mystnb_docutils_html5_h_installed -eq 0 ]; then
- initial_installed=1
- LOG_INFO "软件包已安装,测试完成后将保持安装状态"
- else
- LOG_INFO "软件包未安装,测试完成后将卸载安装的软件包"
- fi
-
- # 检查yum源中是否存在所需软件包
- LOG_INFO "检查yum源中是否存在python3-myst-nb软件包"
- dnf list available python3-myst-nb > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中不存在python3-myst-nb软件包"
- exit 255
- fi
-
- LOG_INFO "检查yum源中是否存在mystnb-docutils-html5_h软件包"
- dnf list available mystnb-docutils-html5_h > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中不存在mystnb-docutils-html5_h软件包"
- exit 255
- fi
-
- # 如果未安装,则安装软件包
- if [ $initial_installed -eq 0 ]; then
- LOG_INFO "安装python3-myst-nb软件包"
- dnf install -y python3-myst-nb
- CHECK_RESULT $? 0 0 "安装python3-myst-nb失败"
-
- LOG_INFO "安装mystnb-docutils-html5_h软件包"
- dnf install -y mystnb-docutils-html5_h
- CHECK_RESULT $? 0 0 "安装mystnb-docutils-html5_h失败"
- fi
-
- # 测试-h参数显示帮助信息
- LOG_INFO "测试-h参数显示帮助信息"
- mystnb-docutils-html5_h -h > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "执行mystnb-docutils-html5_h -h失败"
-
- # 检查帮助信息是否包含常用帮助关键词
- LOG_INFO "检查帮助信息内容"
- help_output=$(mystnb-docutils-html5_h -h 2>&1)
- echo "$help_output" | grep -q -E "(usage|help|options|--help|-h)"
- CHECK_RESULT $? 0 0 "帮助信息不符合预期"
-
- # 清理环境:如果测试前未安装,则卸载软件包
- if [ $initial_installed -eq 0 ]; then
- LOG_INFO "卸载测试安装的软件包"
- dnf remove -y python3-myst-nb mystnb-docutils-html5_h
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- else
- LOG_INFO "保持软件包安装状态"
- fi
-
- LOG_INFO "测试完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html5_output.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html5_output.sh
deleted file mode 100644
index 3993bfe4218..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html5_output.sh
+++ /dev/null
@@ -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 : 2025-12-01
-# @License : Mulan PSL v2
-# @Desc : 测试使用--output参数指定输出文件
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
-
- # 检查是否已安装python3-myst-nb、mystnb-docutils-html5
- if dnf list installed python3-myst-nb &>/dev/null && dnf list installed mystnb-docutils-html5 &>/dev/null; then
- LOG_INFO "环境已安装python3-myst-nb和mystnb-docutils-html5"
- INSTALLED=true
- else
- LOG_INFO "环境未安装python3-myst-nb和mystnb-docutils-html5,将进行安装测试"
- INSTALLED=false
- fi
-
- # 检查yum源中是否有python3-myst-nb和mystnb-docutils-html5
- LOG_INFO "检查yum源中是否有python3-myst-nb和mystnb-docutils-html5"
- if ! dnf list available python3-myst-nb &>/dev/null || ! dnf list available mystnb-docutils-html5 &>/dev/null; then
- LOG_ERROR "yum源中缺少python3-myst-nb或mystnb-docutils-html5"
- exit 255
- fi
-
- # 如果未安装,则安装软件包
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "开始安装python3-myst-nb和mystnb-docutils-html5"
- dnf install -y python3-myst-nb mystnb-docutils-html5
- CHECK_RESULT $? 0 0 "安装python3-myst-nb和mystnb-docutils-html5失败"
- fi
-
- # 测试使用--output参数指定输出文件
- LOG_INFO "测试使用--output参数指定输出文件"
- OUTPUT_FILE="test_output.html"
- if [ ! -f "$OUTPUT_FILE" ]; then
- touch "$OUTPUT_FILE"
- fi
-
- # 执行命令并检查--output参数支持情况
- LOG_INFO "执行命令并检查--output参数支持情况"
- python3 -m myst_nb --output "$OUTPUT_FILE" &>/dev/null
- if [ $? -eq 255 ]; then
- LOG_ERROR "--output参数不支持或不存在"
- exit 255
- fi
-
- # 检查命令执行结果
- CHECK_RESULT $? 0 0 "执行命令失败"
-
- # 清理环境:如果脚本开始时未安装,则卸载软件包
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "清理环境:卸载python3-myst-nb和mystnb-docutils-html5"
- dnf remove -y python3-myst-nb mystnb-docutils-html5 &>/dev/null
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- fi
-
- # 清理临时文件(如果存在)
- LOG_INFO "清理临时文件"
- rm -f "$OUTPUT_FILE" &>/dev/null
-
- LOG_INFO "测试脚本执行完毕,环境已恢复"
-
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html5_q.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html5_q.sh
deleted file mode 100644
index 8973f5e2d52..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html5_q.sh
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/usr/bin/bash
-
-# Copyright (c) 2024 ISCAS .ALL rights reserved.
-# This program is licensed under Mulan PSL v2.
-# You can use it according to the terms and conditions of the Mulan PSL v2.
-# http://license.coscl.org.cn/MulanPSL2
-# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
-# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
-# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
-# See the Mulan PSL v2 for more details.
-
-# #############################################
-# @Author : honghua
-# @Contact : honghua@iscas.ac.cn
-# @Date : 2026-03-16
-# @License : Mulan PSL v2
-# @Desc : 测试-q参数不报告系统消息
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 定义软件包列表
- PACKAGES="python3-myst-nb mystnb-docutils-html5"
-
- # 检查软件包是否在yum源中
- LOG_INFO "检查软件包是否在yum源中"
- for pkg in $PACKAGES; do
- if ! dnf list available "$pkg" &>/dev/null; then
- LOG_ERROR "软件包 $pkg 不在yum源中"
- exit 255
- fi
- done
-
- # 检查环境是否已安装软件包
- LOG_INFO "检查环境是否已安装软件包"
- INSTALLED=false
- for pkg in $PACKAGES; do
- if rpm -q "$pkg" &>/dev/null; then
- INSTALLED=true
- LOG_INFO "软件包 $pkg 已安装"
- fi
- done
-
- # 如果未安装,则安装软件包
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "安装软件包"
- dnf install -y $PACKAGES
- CHECK_RESULT $? 0 0 "安装软件包失败"
- fi
-
- # 测试-q参数不报告系统消息
- LOG_INFO "测试-q参数不报告系统消息"
- # 假设测试命令为mystnb,实际命令可能需要根据实际软件包调整
- if ! mystnb --help 2>&1 | grep -q "\-q"; then
- LOG_ERROR "命令不支持-q参数"
- exit 255
- fi
-
- # 执行带-q参数的命令
- mystnb -q --version
- CHECK_RESULT $? 0 0 "执行带-q参数的命令失败"
-
- # 清理环境
- LOG_INFO "清理环境"
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "卸载软件包"
- dnf remove -y $PACKAGES
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- else
- LOG_INFO "环境已安装软件包,保持安装状态"
- fi
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html5_s.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html5_s.sh
deleted file mode 100644
index 8d2908676c6..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html5_s.sh
+++ /dev/null
@@ -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 : 2025-12-01
-# @License : Mulan PSL v2
-# @Desc : 测试使用-s参数包含查看文档源链接
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
-
- # 检查是否已安装python3-myst-nb和mystnb-docutils-html5
- LOG_INFO "检查是否已安装python3-myst-nb和mystnb-docutils-html5"
- if dnf list installed python3-myst-nb && dnf list installed mystnb-docutils-html5; then
- LOG_INFO "python3-myst-nb和mystnb-docutils-html5已安装"
- installed=true
- else
- LOG_INFO "python3-myst-nb和mystnb-docutils-html5未安装"
- installed=false
- fi
-
- # 检查yum源中是否存在python3-myst-nb和mystnb-docutils-html5
- LOG_INFO "检查yum源中是否存在python3-myst-nb和mystnb-docutils-html5"
- if ! dnf list available python3-myst-nb || ! dnf list available mystnb-docutils-html5; then
- LOG_ERROR "yum源中不存在python3-myst-nb或mystnb-docutils-html5"
- exit 255
- fi
-
- # 如果未安装,则安装软件包
- if [ "$installed" = false ]; then
- LOG_INFO "开始安装python3-myst-nb和mystnb-docutils-html5"
- dnf install -y python3-myst-nb mystnb-docutils-html5
- CHECK_RESULT $? 0 0 "安装python3-myst-nb和mystnb-docutils-html5失败"
- fi
-
- # 测试使用-s参数包含查看文档源链接
- LOG_INFO "测试使用-s参数包含查看文档源链接"
- output=$(python3 -m myst_nb --help | grep -e "-s")
- if [ $? -ne 0 ]; then
- LOG_ERROR "-s参数不存在或不支持"
- exit 255
- fi
-
- CHECK_RESULT $? 0 0 "测试-s参数失败"
-
- # 清理环境
- if [ "$installed" = false ]; then
- LOG_INFO "卸载python3-myst-nb和mystnb-docutils-html5"
- dnf remove -y python3-myst-nb mystnb-docutils-html5
- CHECK_RESULT $? 0 0 "卸载python3-myst-nb和mystnb-docutils-html5失败"
- fi
-
- LOG_INFO "测试脚本执行完成"
-
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html5_t.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html5_t.sh
deleted file mode 100644
index 4f5bc955e76..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html5_t.sh
+++ /dev/null
@@ -1,71 +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-01
-# @License : Mulan PSL v2
-# @Desc : 测试使用-t参数包含时间和日期信息
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 检查是否已安装所需软件包
- LOG_INFO "检查是否已安装python3-myst-nb、mystnb-docutils-html5软件包"
- dnf list installed python3-myst-nb > /dev/null 2>&1
- python3_myst_nb_installed=$?
- dnf list installed mystnb-docutils-html5 > /dev/null 2>&1
- mystnb_docutils_html5_installed=$?
-
- if [ $python3_myst_nb_installed -eq 0 ] && [ $mystnb_docutils_html5_installed -eq 0 ]; then
- LOG_INFO "软件包已安装,脚本结束后将保持安装状态"
- keep_installed=true
- else
- LOG_INFO "软件包未安装,将在测试后卸载"
- keep_installed=false
- fi
-
- # 检查yum源中是否存在软件包
- LOG_INFO "检查yum源中是否存在python3-myst-nb、mystnb-docutils-html5软件包"
- dnf list available python3-myst-nb > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "yum源中不存在python3-myst-nb软件包"
-
- dnf list available mystnb-docutils-html5 > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "yum源中不存在mystnb-docutils-html5软件包"
-
- # 安装软件包
- if [ "$keep_installed" = false ]; then
- LOG_INFO "安装python3-myst-nb、mystnb-docutils-html5软件包"
- dnf install -y python3-myst-nb mystnb-docutils-html5
- CHECK_RESULT $? 0 0 "安装软件包失败"
- fi
-
- # 测试使用-t参数包含时间和日期信息
- LOG_INFO "测试使用-t参数包含时间和日期信息"
- command_output=$(myst-nb --help 2>&1)
- if [[ "$command_output" != *"-t"* ]]; then
- LOG_ERROR "-t参数不存在或不支持"
- exit 255
- fi
-
- # 清理环境
- if [ "$keep_installed" = false ]; then
- LOG_INFO "卸载python3-myst-nb、mystnb-docutils-html5软件包"
- dnf remove -y python3-myst-nb mystnb-docutils-html5
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- fi
-
- LOG_INFO "测试脚本执行完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html5_title.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html5_title.sh
deleted file mode 100644
index e39e5692051..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html5_title.sh
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/usr/bin/bash
-
-# Copyright (c) 2024 ISCAS .ALL rights reserved.
-# This program is licensed under Mulan PSL v2.
-# You can use it according to the terms and conditions of the Mulan PSL v2.
-# http://license.coscl.org.cn/MulanPSL2
-# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
-# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
-# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
-# See the Mulan PSL v2 for more details.
-
-# #############################################
-# @Author : honghua
-# @Contact : honghua@iscas.ac.cn
-# @Date : 2025-12-01
-# @License : Mulan PSL v2
-# @Desc : 测试使用--title参数指定文档标题
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
-
- LOG_INFO "开始测试:测试使用--title参数指定文档标题"
-
- # 检查是否已安装所需软件包
- LOG_INFO "检查是否已安装python3-myst-nb、mystnb-docutils-html5_title软件包"
- if ! dnf list installed python3-myst-nb &>/dev/null || ! dnf list installed mystnb-docutils-html5_title &>/dev/null; then
- LOG_INFO "软件包未安装,将进行安装"
- # 检查yum源中是否有软件包
- if ! dnf list available python3-myst-nb &>/dev/null || ! dnf list available mystnb-docutils-html5_title &>/dev/null; then
- LOG_ERROR "yum源中未找到所需软件包"
- exit 255
- fi
- # 安装软件包
- dnf install -y python3-myst-nb mystnb-docutils-html5_title
- CHECK_RESULT $? 0 0 "安装软件包失败"
- # 标记需要卸载
- NEED_UNINSTALL=1
- else
- LOG_INFO "软件包已安装,无需重复安装"
- NEED_UNINSTALL=0
- fi
-
- # 测试--title参数
- LOG_INFO "测试--title参数是否支持"
- if ! mystnb-docutils-html5_title --help | grep -q -- "--title"; then
- LOG_ERROR "--title参数不支持"
- exit 255
- fi
-
- # 执行测试命令
- LOG_INFO "执行测试命令:mystnb-docutils-html5_title --title "测试标题""
- mystnb-docutils-html5_title --title "测试标题"
- CHECK_RESULT $? 0 0 "--title参数执行失败"
-
- # 清理环境
- if [ "$NEED_UNINSTALL" -eq 1 ]; then
- LOG_INFO "卸载临时安装的软件包"
- dnf remove -y python3-myst-nb mystnb-docutils-html5_title
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- fi
-
- LOG_INFO "测试完成:测试使用--title参数指定文档标题"
-
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html5_upper_v.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html5_upper_v.sh
deleted file mode 100644
index 40a2748278d..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html5_upper_v.sh
+++ /dev/null
@@ -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-03-16
-# @License : Mulan PSL v2
-# @Desc : 测试-V参数显示版本信息
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 检查是否已安装所需软件包
- LOG_INFO "检查是否已安装 python3-myst-nb, mystnb-docutils-html5_upper_v"
-
- # 定义软件包名称
- PACKAGE1="python3-myst-nb"
- PACKAGE2="mystnb-docutils-html5_upper_v"
-
- # 检查软件包是否已在yum源中
- LOG_INFO "检查yum源中是否存在软件包 $PACKAGE1 和 $PACKAGE2"
- dnf list available $PACKAGE1 $PACKAGE2 > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中不存在软件包 $PACKAGE1 或 $PACKAGE2"
- exit 255
- fi
-
- # 检查当前是否已安装
- INSTALLED=0
- rpm -q $PACKAGE1 > /dev/null 2>&1
- PKG1_INSTALLED=$?
- rpm -q $PACKAGE2 > /dev/null 2>&1
- PKG2_INSTALLED=$?
-
- if [ $PKG1_INSTALLED -eq 0 ] && [ $PKG2_INSTALLED -eq 0 ]; then
- LOG_INFO "软件包 $PACKAGE1 和 $PACKAGE2 已安装"
- INSTALLED=1
- else
- LOG_INFO "软件包 $PACKAGE1 和 $PACKAGE2 未安装,开始安装"
-
- # 安装软件包
- LOG_INFO "安装软件包 $PACKAGE1 和 $PACKAGE2"
- dnf install -y $PACKAGE1 $PACKAGE2
- CHECK_RESULT $? 0 0 "安装软件包失败"
- fi
-
- # 测试-V参数显示版本信息
- LOG_INFO "测试-V参数显示版本信息"
-
- # 检查命令是否支持-V参数
- LOG_INFO "检查命令是否支持-V参数"
- mystnb-docutils-html5_upper_v --help | grep -q "\-V"
- if [ $? -ne 0 ]; then
- LOG_ERROR "命令不支持-V参数"
- # 清理环境(如果之前未安装)
- if [ $INSTALLED -eq 0 ]; then
- LOG_INFO "清理安装的软件包"
- dnf remove -y $PACKAGE1 $PACKAGE2
- fi
- exit 255
- fi
-
- # 执行-V参数测试
- LOG_INFO "执行-V参数测试"
- mystnb-docutils-html5_upper_v -V
- CHECK_RESULT $? 0 0 "执行-V参数失败"
-
- # 清理环境
- if [ $INSTALLED -eq 0 ]; then
- LOG_INFO "测试完成,清理安装的软件包"
- dnf remove -y $PACKAGE1 $PACKAGE2
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- else
- LOG_INFO "测试完成,保持软件包安装状态"
- fi
-
- LOG_INFO "测试脚本执行完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html5_v.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html5_v.sh
deleted file mode 100644
index 1af0684bbb9..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html5_v.sh
+++ /dev/null
@@ -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-16
-# @License : Mulan PSL v2
-# @Desc : 测试-v参数报告所有系统消息
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 检查是否已经安装了python3-myst-nb、mystnb-docutils-html5软件包
- LOG_INFO "检查python3-myst-nb、mystnb-docutils-html5软件包是否已经安装"
- rpm -q python3-myst-nb mystnb-docutils-html5 > /dev/null 2>&1
- if [ $? -eq 0 ]; then
- LOG_INFO "软件包已经安装,标记为已安装状态"
- INSTALLED=1
- else
- LOG_INFO "软件包未安装,标记为未安装状态"
- INSTALLED=0
- fi
-
- # 检查yum源中是否存在python3-myst-nb、mystnb-docutils-html5软件包
- LOG_INFO "检查yum源中是否存在python3-myst-nb、mystnb-docutils-html5软件包"
- dnf list available python3-myst-nb mystnb-docutils-html5 > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中不存在python3-myst-nb或mystnb-docutils-html5软件包"
- exit 255
- fi
-
- # 如果未安装,则安装软件包
- if [ $INSTALLED -eq 0 ]; then
- LOG_INFO "开始安装python3-myst-nb、mystnb-docutils-html5软件包"
- dnf install -y python3-myst-nb mystnb-docutils-html5
- CHECK_RESULT $? 0 0 "安装python3-myst-nb、mystnb-docutils-html5软件包失败"
- LOG_INFO "安装python3-myst-nb、mystnb-docutils-html5软件包成功"
- fi
-
- # 测试-v参数报告所有系统消息
- LOG_INFO "开始测试-v参数报告所有系统消息"
- # 假设测试命令为test_python3-myst-nb_mystnb-docutils-html5_v -v
- # 首先检查命令是否存在
- command -v test_python3-myst-nb_mystnb-docutils-html5_v > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "test_python3-myst-nb_mystnb-docutils-html5_v命令不存在"
- exit 255
- fi
-
- # 检查-v参数是否支持
- test_python3-myst-nb_mystnb-docutils-html5_v --help 2>&1 | grep -q "\-v"
- if [ $? -ne 0 ]; then
- LOG_ERROR "test_python3-myst-nb_mystnb-docutils-html5_v命令不支持-v参数"
- exit 255
- fi
-
- # 执行带-v参数的测试命令
- LOG_INFO "执行test_python3-myst-nb_mystnb-docutils-html5_v -v命令"
- test_python3-myst-nb_mystnb-docutils-html5_v -v
- CHECK_RESULT $? 0 0 "test_python3-myst-nb_mystnb-docutils-html5_v -v命令执行失败"
-
- # 清理环境:如果之前未安装,则卸载软件包
- if [ $INSTALLED -eq 0 ]; then
- LOG_INFO "清理环境,卸载python3-myst-nb、mystnb-docutils-html5软件包"
- dnf remove -y python3-myst-nb mystnb-docutils-html5
- CHECK_RESULT $? 0 0 "卸载python3-myst-nb、mystnb-docutils-html5软件包失败"
- LOG_INFO "卸载python3-myst-nb、mystnb-docutils-html5软件包成功"
- fi
-
- LOG_INFO "测试完成,环境已恢复"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_d.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_d.sh
deleted file mode 100644
index c3e54e01e49..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_d.sh
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/usr/bin/bash
-
-# Copyright (c) 2024 ISCAS .ALL rights reserved.
-# This program is licensed under Mulan PSL v2.
-# You can use it according to the terms and conditions of the Mulan PSL v2.
-# http://license.coscl.org.cn/MulanPSL2
-# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
-# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
-# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
-# See the Mulan PSL v2 for more details.
-
-# #############################################
-# @Author : honghua
-# @Contact : honghua@iscas.ac.cn
-# @Date : 2025-12-01
-# @License : Mulan PSL v2
-# @Desc : 测试使用-d参数包含日期信息
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试:测试使用-d参数包含日期信息"
-
- # 检查是否已安装python3-myst-nb和mystnb-docutils-html_d
- LOG_INFO "检查是否已安装python3-myst-nb和mystnb-docutils-html_d"
- dnf list installed python3-myst-nb mystnb-docutils-html_d > /dev/null 2>&1
- if [ $? -eq 0 ]; then
- LOG_INFO "软件包已安装,脚本结束后将保持安装状态"
- INSTALLED=true
- else
- LOG_INFO "软件包未安装,脚本结束后将卸载软件包"
- INSTALLED=false
- fi
-
- # 检查yum源中是否有python3-myst-nb和mystnb-docutils-html_d
- LOG_INFO "检查yum源中是否有python3-myst-nb和mystnb-docutils-html_d"
- dnf list available python3-myst-nb mystnb-docutils-html_d > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中未找到python3-myst-nb或mystnb-docutils-html_d"
- exit 255
- fi
-
- # 如果未安装,则安装软件包
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "开始安装python3-myst-nb和mystnb-docutils-html_d"
- dnf install -y python3-myst-nb mystnb-docutils-html_d > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "安装python3-myst-nb和mystnb-docutils-html_d失败"
- fi
-
- # 测试使用-d参数包含日期信息
- LOG_INFO "测试使用-d参数包含日期信息"
- output=$(mystnb-docutils-html_d -d "2023-10-01" 2>&1)
- CHECK_RESULT $? 0 0 "执行命令失败"
- echo "$output" | grep -q "2023-10-01"
- CHECK_RESULT $? 0 0 "输出中未包含日期信息"
-
- # 清理环境
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "卸载python3-myst-nb和mystnb-docutils-html_d"
- dnf remove -y python3-myst-nb mystnb-docutils-html_d > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "卸载python3-myst-nb和mystnb-docutils-html_d失败"
- fi
-
- LOG_INFO "测试完成,环境已恢复"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_date.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_date.sh
deleted file mode 100644
index a5df4d3f330..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_date.sh
+++ /dev/null
@@ -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-03-16
-# @License : Mulan PSL v2
-# @Desc : 测试使用 --date 选项包含日期
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试使用 --date 选项包含日期"
- LOG_INFO "步骤1:检查测试环境是否已安装python3-myst-nb、mystnb-docutils-html软件包"
- rpm -q python3-myst-nb mystnb-docutils-html > /dev/null 2>&1
- if [ $? -eq 0 ]; then
- LOG_INFO "环境已安装软件包,标记为已安装状态"
- INSTALLED="true"
- else
- LOG_INFO "环境未安装软件包,标记为未安装状态"
- INSTALLED="false"
- fi
-
- LOG_INFO "步骤2:检查yum源中是否有python3-myst-nb、mystnb-docutils-html软件包"
- dnf list available python3-myst-nb mystnb-docutils-html > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "yum源中缺少必要的软件包"
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中缺少必要的软件包"
- exit 255
- fi
-
- if [ "$INSTALLED" = "false" ]; then
- LOG_INFO "步骤3:安装python3-myst-nb、mystnb-docutils-html软件包"
- dnf install -y python3-myst-nb mystnb-docutils-html
- CHECK_RESULT $? 0 0 "安装软件包失败"
- fi
-
- LOG_INFO "步骤4:验证myst命令是否支持--date选项"
- myst --help | grep -q -- "--date"
- CHECK_RESULT $? 0 0 "myst命令不支持--date选项"
- if [ $? -ne 0 ]; then
- LOG_ERROR "myst命令不支持--date选项"
- exit 255
- fi
-
- LOG_INFO "步骤5:创建测试用的Markdown文件"
- cat > test_date.md << "EOF"
- # Test Document
- This is a test document for date option.
- EOF
- CHECK_RESULT $? 0 0 "创建测试文件失败"
-
- LOG_INFO "步骤6:使用--date选项执行myst命令,生成包含日期的HTML"
- myst html test_date.md --date="2023-10-01" -o test_date_output.html
- CHECK_RESULT $? 0 0 "执行myst命令失败"
-
- LOG_INFO "步骤7:检查生成的HTML文件是否包含指定的日期"
- grep -q "2023-10-01" test_date_output.html
- CHECK_RESULT $? 0 0 "生成的HTML文件中未找到指定的日期"
-
- LOG_INFO "步骤8:清理测试生成的文件"
- rm -f test_date.md test_date_output.html
- CHECK_RESULT $? 0 0 "清理测试文件失败"
-
- if [ "$INSTALLED" = "false" ]; then
- LOG_INFO "步骤9:卸载测试安装的软件包"
- dnf remove -y python3-myst-nb mystnb-docutils-html
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- fi
-
- LOG_INFO "测试完成,环境已恢复"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_debug.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_debug.sh
deleted file mode 100644
index d1ada619d6e..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_debug.sh
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/usr/bin/bash
-
-# Copyright (c) 2024 ISCAS .ALL rights reserved.
-# This program is licensed under Mulan PSL v2.
-# You can use it according to the terms and conditions of the Mulan PSL v2.
-# http://license.coscl.org.cn/MulanPSL2
-# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
-# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
-# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
-# See the Mulan PSL v2 for more details.
-
-# #############################################
-# @Author : honghua
-# @Contact : honghua@iscas.ac.cn
-# @Date : 2026-03-16
-# @License : Mulan PSL v2
-# @Desc : 测试使用 --debug 选项启用调试级系统消息
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 检查是否已安装所需软件包
- LOG_INFO "检查环境是否已安装python3-myst-nb、mystnb-docutils-html"
- if dnf list installed python3-myst-nb &> /dev/null && dnf list installed mystnb-docutils-html &> /dev/null; then
- LOG_INFO "环境已安装python3-myst-nb和mystnb-docutils-html"
- INSTALLED="yes"
- else
- LOG_INFO "环境未安装python3-myst-nb和mystnb-docutils-html"
- INSTALLED="no"
- fi
-
- # 如果未安装,则安装软件包
- if [ "$INSTALLED" = "no" ]; then
- LOG_INFO "开始安装python3-myst-nb和mystnb-docutils-html"
- dnf list available python3-myst-nb &> /dev/null
- CHECK_RESULT $? 0 255 "yum源中不存在python3-myst-nb软件包"
- dnf list available mystnb-docutils-html &> /dev/null
- CHECK_RESULT $? 0 255 "yum源中不存在mystnb-docutils-html软件包"
- dnf install -y python3-myst-nb mystnb-docutils-html
- CHECK_RESULT $? 0 0 "安装python3-myst-nb和mystnb-docutils-html失败"
- LOG_INFO "安装python3-myst-nb和mystnb-docutils-html成功"
- fi
-
- # 检查myst命令是否支持--debug选项
- LOG_INFO "检查myst命令是否支持--debug选项"
- myst --help | grep -q "\-\-debug"
- CHECK_RESULT $? 0 255 "myst命令不支持--debug选项"
-
- # 测试使用--debug选项启用调试级系统消息
- LOG_INFO "测试使用--debug选项启用调试级系统消息"
- myst --debug --help 2>&1 | grep -q "debug"
- CHECK_RESULT $? 0 0 "使用--debug选项未能启用调试级系统消息"
- LOG_INFO "使用--debug选项成功启用调试级系统消息"
-
- # 环境恢复:如果之前未安装,则卸载软件包
- if [ "$INSTALLED" = "no" ]; then
- LOG_INFO "开始卸载python3-myst-nb和mystnb-docutils-html"
- dnf remove -y python3-myst-nb mystnb-docutils-html
- CHECK_RESULT $? 0 0 "卸载python3-myst-nb和mystnb-docutils-html失败"
- LOG_INFO "卸载python3-myst-nb和mystnb-docutils-html成功"
- else
- LOG_INFO "环境已安装,保持安装状态"
- fi
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_g.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_g.sh
deleted file mode 100644
index a6cdbaa20fe..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_g.sh
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/usr/bin/bash
-
-# Copyright (c) 2024 ISCAS .ALL rights reserved.
-# This program is licensed under Mulan PSL v2.
-# You can use it according to the terms and conditions of the Mulan PSL v2.
-# http://license.coscl.org.cn/MulanPSL2
-# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
-# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
-# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
-# See the Mulan PSL v2 for more details.
-
-# #############################################
-# @Author : honghua
-# @Contact : honghua@iscas.ac.cn
-# @Date : 2025-12-01
-# @License : Mulan PSL v2
-# @Desc : 测试使用-g参数包含生成器信息
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
-
- # 检查是否已安装python3-myst-nb和mystnb-docutils-html
- LOG_INFO "检查是否已安装python3-myst-nb和mystnb-docutils-html"
- rpm -q python3-myst-nb mystnb-docutils-html > /dev/null 2>&1
- if [ $? -eq 0 ]; then
- LOG_INFO "python3-myst-nb和mystnb-docutils-html已安装"
- installed=true
- else
- LOG_INFO "python3-myst-nb和mystnb-docutils-html未安装"
- installed=false
- fi
-
- # 检查yum源中是否存在软件包
- LOG_INFO "检查yum源中是否存在python3-myst-nb和mystnb-docutils-html"
- dnf list available python3-myst-nb mystnb-docutils-html > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中不存在python3-myst-nb或mystnb-docutils-html"
- exit 255
- fi
-
- # 如果未安装,则安装软件包
- if [ "$installed" = false ]; then
- LOG_INFO "安装python3-myst-nb和mystnb-docutils-html"
- dnf install -y python3-myst-nb mystnb-docutils-html
- CHECK_RESULT $? 0 0 "安装失败"
- fi
-
- # 测试使用-g参数包含生成器信息
- LOG_INFO "测试使用-g参数包含生成器信息"
- mystnb --help | grep -q "\-g, \-\-generator"
- CHECK_RESULT $? 0 0 "参数-g不存在或不支持"
-
- # 清理环境:如果脚本开始时未安装,则卸载软件包
- if [ "$installed" = false ]; then
- LOG_INFO "卸载python3-myst-nb和mystnb-docutils-html"
- dnf remove -y python3-myst-nb mystnb-docutils-html
- CHECK_RESULT $? 0 0 "卸载失败"
- fi
-
- LOG_INFO "测试脚本执行完毕,环境已恢复"
-
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_help.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_help.sh
deleted file mode 100644
index 8e17f2fea92..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_help.sh
+++ /dev/null
@@ -1,99 +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-16
-# @License : Mulan PSL v2
-# @Desc : 测试使用 --help 参数查看帮助信息
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 环境预检查
- LOG_INFO "开始检查测试环境"
- # 检查是否已安装python3-myst-nb、mystnb-docutils-html
- rpm -q python3-myst-nb > /dev/null 2>&1
- PYTHON_MYST_NB_INSTALLED=$?
- rpm -q mystnb-docutils-html > /dev/null 2>&1
- MYSTNB_DOCUTILS_HTML_INSTALLED=$?
-
- if [ $PYTHON_MYST_NB_INSTALLED -eq 0 ] && [ $MYSTNB_DOCUTILS_HTML_INSTALLED -eq 0 ]; then
- LOG_INFO "检测到python3-myst-nb和mystnb-docutils-html已安装,测试后将保持安装状态"
- ALREADY_INSTALLED=1
- else
- LOG_INFO "检测到python3-myst-nb或mystnb-docutils-html未安装,测试后将卸载安装的软件包"
- ALREADY_INSTALLED=0
- fi
-
- # 检查yum源中是否有软件包
- LOG_INFO "检查yum源中是否存在python3-myst-nb软件包"
- dnf list available python3-myst-nb > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中未找到python3-myst-nb软件包"
- exit 255
- fi
-
- LOG_INFO "检查yum源中是否存在mystnb-docutils-html软件包"
- dnf list available mystnb-docutils-html > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中未找到mystnb-docutils-html软件包"
- exit 255
- fi
-
- # 安装软件包(如果未安装)
- if [ $ALREADY_INSTALLED -eq 0 ]; then
- LOG_INFO "开始安装python3-myst-nb和mystnb-docutils-html软件包"
- dnf install -y python3-myst-nb mystnb-docutils-html
- CHECK_RESULT $? 0 0 "安装python3-myst-nb和mystnb-docutils-html失败"
- LOG_INFO "软件包安装成功"
- fi
-
- # 测试--help参数
- LOG_INFO "测试使用--help参数查看帮助信息"
- myst --help > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "执行myst --help命令失败"
-
- # 测试其他可能的帮助参数
- LOG_INFO "测试使用-h参数查看帮助信息"
- myst -h > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "执行myst -h命令失败"
-
- LOG_INFO "测试使用--help参数查看nbconvert帮助信息"
- myst nbconvert --help > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "执行myst nbconvert --help命令失败"
-
- # 测试不支持的参数
- LOG_INFO "测试不支持的参数--invalid-param"
- myst --invalid-param > /dev/null 2>&1
- if [ $? -eq 255 ]; then
- LOG_INFO "不支持的参数正确处理,返回退出码255"
- else
- LOG_ERROR "不支持的参数未正确处理"
- exit 255
- fi
-
- # 环境清理
- if [ $ALREADY_INSTALLED -eq 0 ]; then
- LOG_INFO "清理测试环境,卸载安装的软件包"
- dnf remove -y python3-myst-nb mystnb-docutils-html
- CHECK_RESULT $? 0 0 "卸载python3-myst-nb和mystnb-docutils-html失败"
- LOG_INFO "软件包卸载成功"
- else
- LOG_INFO "保持软件包安装状态,不进行卸载"
- fi
-
- LOG_INFO "测试脚本执行完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_language.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_language.sh
deleted file mode 100644
index fe0d3a234b8..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_language.sh
+++ /dev/null
@@ -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-03-16
-# @License : Mulan PSL v2
-# @Desc : 测试使用 --language 选项指定文档语言
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 检查是否已安装所需软件包
- LOG_INFO "检查是否已安装所需软件包"
- PACKAGES="python3-myst-nb mystnb-docutils-html"
- INSTALLED=0
- for pkg in $PACKAGES; do
- if dnf list installed "$pkg" &>/dev/null; then
- LOG_INFO "软件包 $pkg 已安装"
- INSTALLED=1
- else
- LOG_INFO "软件包 $pkg 未安装"
- fi
- done
-
- # 检查yum源中是否有软件包
- LOG_INFO "检查yum源中是否有所需软件包"
- for pkg in $PACKAGES; do
- if ! dnf list available "$pkg" &>/dev/null; then
- LOG_ERROR "yum源中未找到软件包 $pkg"
- exit 255
- fi
- done
-
- # 如果未安装,则安装软件包
- if [ $INSTALLED -eq 0 ]; then
- LOG_INFO "开始安装软件包"
- dnf install -y $PACKAGES
- CHECK_RESULT $? 0 0 "安装软件包失败"
- LOG_INFO "软件包安装成功"
- # 设置标记,表示需要清理
- NEED_CLEANUP=1
- else
- LOG_INFO "软件包已安装,无需重复安装"
- NEED_CLEANUP=0
- fi
-
- # 测试--language选项
- LOG_INFO "测试使用--language选项指定文档语言"
- # 创建一个简单的测试文件
- TEST_FILE="test_language.md"
- echo "# Test" > $TEST_FILE
- echo "Some content here." >> $TEST_FILE
-
- # 使用mystnb-docutils-html命令并指定--language选项
- LOG_INFO "执行mystnb-docutils-html命令并指定--language为zh-CN"
- mystnb-docutils-html --language zh-CN $TEST_FILE output.html
- CHECK_RESULT $? 0 0 "使用--language选项执行失败"
-
- # 检查输出文件是否存在
- LOG_INFO "检查输出文件是否生成"
- if [ -f "output.html" ]; then
- LOG_INFO "输出文件生成成功"
- else
- LOG_ERROR "输出文件未生成"
- CHECK_RESULT 1 0 0 "输出文件未生成"
- fi
-
- # 清理测试文件
- LOG_INFO "清理测试文件"
- rm -f $TEST_FILE output.html
-
- # 如果之前安装了软件包,则卸载
- if [ $NEED_CLEANUP -eq 1 ]; then
- LOG_INFO "卸载之前安装的软件包"
- dnf remove -y $PACKAGES
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- LOG_INFO "软件包卸载成功"
- else
- LOG_INFO "保持软件包安装状态"
- fi
-
- LOG_INFO "测试完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_no_debug.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_no_debug.sh
deleted file mode 100644
index da6e17f747e..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_no_debug.sh
+++ /dev/null
@@ -1,128 +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-16
-# @License : Mulan PSL v2
-# @Desc : 测试使用 --no-debug 选项禁用调试输出
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 定义软件包列表
- PACKAGES=("python3-myst-nb" "mystnb-docutils-html")
-
- # 检查yum源中是否有指定软件包
- check_package_availability() {
- local pkg=$1
- LOG_INFO "检查yum源中是否存在软件包: ${pkg}"
- dnf list available "${pkg}" &> /dev/null
- if [ $? -ne 0 ]; then
- LOG_ERROR "软件包 ${pkg} 在yum源中不存在"
- exit 255
- fi
- }
-
- # 检查命令参数是否支持
- check_command_option() {
- local cmd=$1
- local option=$2
- LOG_INFO "检查命令 ${cmd} 是否支持选项 ${option}"
- ${cmd} --help 2>&1 | grep -q "${option}"
- if [ $? -ne 0 ]; then
- LOG_ERROR "命令 ${cmd} 不支持选项 ${option}"
- exit 255
- fi
- }
-
- # 检查软件包是否已安装
- check_package_installed() {
- local pkg=$1
- rpm -q "${pkg}" &> /dev/null
- return $?
- }
-
- # 安装软件包
- install_packages() {
- LOG_INFO "开始安装软件包"
- for pkg in "${PACKAGES[@]}"; do
- check_package_installed "${pkg}"
- if [ $? -eq 0 ]; then
- LOG_INFO "软件包 ${pkg} 已安装,跳过安装"
- else
- LOG_INFO "安装软件包: ${pkg}"
- dnf install -y "${pkg}"
- CHECK_RESULT $? 0 0 "安装软件包 ${pkg} 失败"
- fi
- done
- }
-
- # 卸载软件包
- uninstall_packages() {
- LOG_INFO "开始卸载软件包"
- for pkg in "${PACKAGES[@]}"; do
- check_package_installed "${pkg}"
- if [ $? -eq 0 ]; then
- LOG_INFO "卸载软件包: ${pkg}"
- dnf remove -y "${pkg}"
- CHECK_RESULT $? 0 0 "卸载软件包 ${pkg} 失败"
- else
- LOG_INFO "软件包 ${pkg} 未安装,跳过卸载"
- fi
- done
- }
-
- # 记录初始安装状态
- declare -A INITIAL_STATUS
- for pkg in "${PACKAGES[@]}"; do
- check_package_installed "${pkg}"
- INITIAL_STATUS["${pkg}"]=$?
- done
-
- # 检查yum源中是否有所有需要的软件包
- LOG_INFO "检查yum源中是否有所有需要的软件包"
- for pkg in "${PACKAGES[@]}"; do
- check_package_availability "${pkg}"
- done
-
- # 检查命令参数
- check_command_option "myst" "--no-debug"
-
- # 根据初始状态决定是否安装软件包
- NEED_INSTALL=false
- for pkg in "${PACKAGES[@]}"; do
- if [ ${INITIAL_STATUS["${pkg}"]} -ne 0 ]; then
- NEED_INSTALL=true
- break
- fi
- done
-
- if ${NEED_INSTALL}; then
- install_packages
- fi
-
- # 执行测试
- LOG_INFO "测试使用 --no-debug 选项禁用调试输出"
- myst --no-debug --help
- CHECK_RESULT $? 0 0 "使用 --no-debug 选项执行失败"
-
- # 环境恢复
- if ${NEED_INSTALL}; then
- uninstall_packages
- fi
-
- LOG_INFO "测试完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_no_raw.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_no_raw.sh
deleted file mode 100644
index d1d0d3703d8..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_no_raw.sh
+++ /dev/null
@@ -1,128 +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-16
-# @License : Mulan PSL v2
-# @Desc : 测试使用 --no-raw 选项禁用原始指令
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 初始化环境变量
- LOG_INFO "初始化测试环境"
- LOG_INFO "检查是否已安装python3-myst-nb、mystnb-docutils-html软件包"
-
- # 检查软件包是否已安装
- rpm -q python3-myst-nb > /dev/null 2>&1
- PYTHON_MYST_NB_INSTALLED=$?
- rpm -q mystnb-docutils-html > /dev/null 2>&1
- MYSTNB_DOCUTILS_HTML_INSTALLED=$?
-
- # 记录初始安装状态
- INITIAL_INSTALL=0
- if [ $PYTHON_MYST_NB_INSTALLED -eq 0 ] && [ $MYSTNB_DOCUTILS_HTML_INSTALLED -eq 0 ]; then
- INITIAL_INSTALL=1
- LOG_INFO "软件包已安装,测试后将保持安装状态"
- else
- LOG_INFO "软件包未安装,测试后将卸载软件包"
- fi
-
- # 检查yum源中是否存在软件包
- LOG_INFO "检查yum源中是否存在python3-myst-nb软件包"
- dnf list available python3-myst-nb > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中不存在python3-myst-nb软件包"
- exit 255
- fi
-
- LOG_INFO "检查yum源中是否存在mystnb-docutils-html软件包"
- dnf list available mystnb-docutils-html > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中不存在mystnb-docutils-html软件包"
- exit 255
- fi
-
- # 如果未安装,则安装软件包
- if [ $INITIAL_INSTALL -eq 0 ]; then
- LOG_INFO "安装python3-myst-nb和mystnb-docutils-html软件包"
- dnf install -y python3-myst-nb mystnb-docutils-html
- CHECK_RESULT $? 0 0 "安装软件包失败"
- fi
-
- # 测试--no-raw选项是否存在
- LOG_INFO "检查myst命令是否支持--no-raw选项"
- myst --help 2>&1 | grep -q "\-\-no\-raw"
- if [ $? -ne 0 ]; then
- LOG_ERROR "myst命令不支持--no-raw选项"
- # 清理环境
- if [ $INITIAL_INSTALL -eq 0 ]; then
- LOG_INFO "清理测试环境,卸载软件包"
- dnf remove -y python3-myst-nb mystnb-docutils-html
- fi
- exit 255
- fi
-
- # 创建测试用的markdown文件
- LOG_INFO "创建测试用的markdown文件"
- TEST_FILE="test_no_raw.md"
- cat > $TEST_FILE << EOF
- # 测试文件
-
- \`\`\`{raw} html
-
原始HTML内容
- \`\`\`
-
- 正常段落内容。
- EOF
- CHECK_RESULT $? 0 0 "创建测试文件失败"
-
- # 测试使用--no-raw选项
- LOG_INFO "测试使用--no-raw选项禁用原始指令"
- myst nbconvert $TEST_FILE --to html --no-raw --output test_output.html
- CHECK_RESULT $? 0 0 "执行myst命令失败"
-
- # 检查输出文件是否生成
- LOG_INFO "检查输出文件是否生成"
- [ -f "test_output.html" ]
- CHECK_RESULT $? 0 0 "输出文件未生成"
-
- # 检查原始指令是否被禁用
- LOG_INFO "检查原始指令是否被禁用"
- if grep -q "原始HTML内容" test_output.html; then
- LOG_ERROR "原始指令未被禁用"
- CHECK_RESULT 1 0 0 "原始指令未被禁用"
- else
- LOG_INFO "原始指令已成功禁用"
- CHECK_RESULT 0 0 0 "原始指令已成功禁用"
- fi
-
- # 清理测试文件
- LOG_INFO "清理测试文件"
- rm -f $TEST_FILE test_output.html
- CHECK_RESULT $? 0 0 "清理测试文件失败"
-
- # 恢复环境
- if [ $INITIAL_INSTALL -eq 0 ]; then
- LOG_INFO "清理测试环境,卸载软件包"
- dnf remove -y python3-myst-nb mystnb-docutils-html
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- else
- LOG_INFO "保持软件包安装状态"
- fi
-
- LOG_INFO "测试完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_output.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_output.sh
deleted file mode 100644
index ee4216afa92..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_output.sh
+++ /dev/null
@@ -1,79 +0,0 @@
-#!/usr/bin/bash
-
-# Copyright (c) 2024 ISCAS .ALL rights reserved.
-# This program is licensed under Mulan PSL v2.
-# You can use it according to the terms and conditions of the Mulan PSL v2.
-# http://license.coscl.org.cn/MulanPSL2
-# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
-# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
-# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
-# See the Mulan PSL v2 for more details.
-
-# #############################################
-# @Author : honghua
-# @Contact : honghua@iscas.ac.cn
-# @Date : 2025-12-01
-# @License : Mulan PSL v2
-# @Desc : 测试使用--output参数指定输出文件
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试使用--output参数指定输出文件的功能"
-
- # 检查是否已安装所需的软件包
- LOG_INFO "检查是否已安装python3-myst-nb和mystnb-docutils-html"
- dnf list installed python3-myst-nb > /dev/null 2>&1
- python3_myst_nb_installed=$?
- dnf list installed mystnb-docutils-html > /dev/null 2>&1
- mystnb_docutils_html_installed=$?
-
- if [ $python3_myst_nb_installed -eq 0 ] && [ $mystnb_docutils_html_installed -eq 0 ]; then
- LOG_INFO "软件包已安装,测试完成后将保持安装状态"
- keep_installed=true
- else
- LOG_INFO "软件包未安装,将在测试完成后卸载"
- keep_installed=false
- fi
-
- # 检查yum源中是否有软件包
- LOG_INFO "检查yum源中是否有python3-myst-nb和mystnb-docutils-html"
- dnf list available python3-myst-nb > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "yum源中没有python3-myst-nb软件包"
- dnf list available mystnb-docutils-html > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "yum源中没有mystnb-docutils-html软件包"
-
- # 安装软件包(如果未安装)
- if [ "$keep_installed" = false ]; then
- LOG_INFO "安装python3-myst-nb和mystnb-docutils-html"
- dnf install -y python3-myst-nb mystnb-docutils-html
- CHECK_RESULT $? 0 0 "安装软件包失败"
- fi
-
- # 测试--output参数功能
- LOG_INFO "测试使用--output参数指定输出文件"
- test_output_file="test_output.html"
- python3 -m myst_nb --output "$test_output_file" > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "执行命令失败,可能不支持--output参数"
-
- # 检查输出文件是否存在
- LOG_INFO "检查输出文件是否存在"
- [ -f "$test_output_file" ]
- CHECK_RESULT $? 0 0 "输出文件未生成"
-
- # 清理测试生成的文件
- LOG_INFO "清理测试生成的文件"
- rm -f "$test_output_file"
-
- # 卸载软件包(如果之前未安装)
- if [ "$keep_installed" = false ]; then
- LOG_INFO "卸载python3-myst-nb和mystnb-docutils-html"
- dnf remove -y python3-myst-nb mystnb-docutils-html
- CHECK_RESULT $?
- fi
-
- LOG_INFO "测试完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_quiet.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_quiet.sh
deleted file mode 100644
index 11ed2112f9f..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_quiet.sh
+++ /dev/null
@@ -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-03-16
-# @License : Mulan PSL v2
-# @Desc : 测试使用 --quiet 选项不报告系统消息
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 定义测试使用的软件包名称
- PACKAGE_NAME="python3-myst-nb"
- # 定义测试命令及参数
- TEST_COMMAND="mystnb-docutils-html"
- QUIET_OPTION="--quiet"
-
- # 步骤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
- LOG_INFO "软件包 ${PACKAGE_NAME} 在yum源中存在"
-
- # 步骤2: 检查当前环境是否已安装该软件包
- LOG_INFO "步骤2: 检查当前环境是否已安装软件包 ${PACKAGE_NAME}"
- if rpm -q "${PACKAGE_NAME}" &> /dev/null; then
- LOG_INFO "软件包 ${PACKAGE_NAME} 已安装,标记为已安装状态"
- ALREADY_INSTALLED=1
- else
- LOG_INFO "软件包 ${PACKAGE_NAME} 未安装,标记为未安装状态"
- ALREADY_INSTALLED=0
- fi
-
- # 步骤3: 如果未安装,则安装软件包
- if [ ${ALREADY_INSTALLED} -eq 0 ]; then
- LOG_INFO "步骤3: 安装软件包 ${PACKAGE_NAME}"
- dnf install -y "${PACKAGE_NAME}"
- CHECK_RESULT $? 0 0 "安装软件包 ${PACKAGE_NAME} 失败"
- LOG_INFO "软件包 ${PACKAGE_NAME} 安装成功"
- fi
-
- # 步骤4: 检查测试命令是否支持 --quiet 参数
- LOG_INFO "步骤4: 检查测试命令 ${TEST_COMMAND} 是否支持 ${QUIET_OPTION} 参数"
- ${TEST_COMMAND} --help 2>&1 | grep -q "${QUIET_OPTION}"
- if [ $? -ne 0 ]; then
- LOG_ERROR "测试命令 ${TEST_COMMAND} 不支持 ${QUIET_OPTION} 参数"
- exit 255
- fi
- LOG_INFO "测试命令 ${TEST_COMMAND} 支持 ${QUIET_OPTION} 参数"
-
- # 步骤5: 执行测试命令,验证使用 --quiet 选项时不报告系统消息
- LOG_INFO "步骤5: 执行测试命令 ${TEST_COMMAND} ${QUIET_OPTION},验证不报告系统消息"
- # 创建一个简单的输入文件用于测试
- TEST_INPUT_FILE=$(mktemp)
- echo "Test content for mystnb" > "${TEST_INPUT_FILE}"
- TEST_OUTPUT_FILE=$(mktemp)
-
- # 执行命令,捕获输出
- ${TEST_COMMAND} "${QUIET_OPTION}" "${TEST_INPUT_FILE}" "${TEST_OUTPUT_FILE}" 2>&1 | tee /tmp/command_output.txt
- COMMAND_EXIT_CODE=$?
-
- # 检查命令是否成功执行
- CHECK_RESULT ${COMMAND_EXIT_CODE} 0 0 "测试命令 ${TEST_COMMAND} 执行失败"
-
- # 步骤6: 验证输出中是否不包含系统消息(即没有非错误的标准输出)
- LOG_INFO "步骤6: 验证输出中是否不包含系统消息"
- if [ -s /tmp/command_output.txt ]; then
- LOG_ERROR "测试命令使用了 ${QUIET_OPTION} 选项,但仍然产生了输出"
- CHECK_RESULT 1 0 0 "quiet选项未生效,仍有系统消息输出"
- else
- LOG_INFO "测试命令使用 ${QUIET_OPTION} 选项后未产生系统消息输出,符合预期"
- CHECK_RESULT 0 0 0 "quiet选项生效,无系统消息输出"
- fi
-
- # 清理临时文件
- rm -f "${TEST_INPUT_FILE}" "${TEST_OUTPUT_FILE}" /tmp/command_output.txt
- LOG_INFO "临时文件已清理"
-
- # 步骤7: 环境恢复
- LOG_INFO "步骤7: 环境恢复"
- if [ ${ALREADY_INSTALLED} -eq 0 ]; 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 "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_s.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_s.sh
deleted file mode 100644
index dcaa64db1f7..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_s.sh
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/bash
-
-# Copyright (c) 2024 ISCAS .ALL rights reserved.
-# This program is licensed under Mulan PSL v2.
-# You can use it according to the terms and conditions of the Mulan PSL v2.
-# http://license.coscl.org.cn/MulanPSL2
-# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
-# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
-# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
-# See the Mulan PSL v2 for more details.
-
-# #############################################
-# @Author : honghua
-# @Contact : honghua@iscas.ac.cn
-# @Date : 2025-12-01
-# @License : Mulan PSL v2
-# @Desc : 测试使用-s参数包含查看文档源链接
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
-
- # 检查是否已安装python3-myst-nb和mystnb-docutils-html_s
- LOG_INFO "检查是否已安装python3-myst-nb和mystnb-docutils-html_s"
- if dnf list installed python3-myst-nb >/dev/null 2>&1 && dnf list installed mystnb-docutils-html_s >/dev/null 2>&1; then
- LOG_INFO "python3-myst-nb和mystnb-docutils-html_s已安装"
- INSTALLED=true
- else
- LOG_INFO "python3-myst-nb和mystnb-docutils-html_s未安装"
- INSTALLED=false
- fi
-
- # 检查yum源中是否有python3-myst-nb和mystnb-docutils-html_s
- LOG_INFO "检查yum源中是否有python3-myst-nb和mystnb-docutils-html_s"
- if ! dnf list available python3-myst-nb >/dev/null 2>&1 || ! dnf list available mystnb-docutils-html_s >/dev/null 2>&1; then
- LOG_ERROR "yum源中缺少python3-myst-nb或mystnb-docutils-html_s"
- exit 255
- fi
-
- # 如果未安装,则安装软件包
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "开始安装python3-myst-nb和mystnb-docutils-html_s"
- dnf install -y python3-myst-nb mystnb-docutils-html_s
- CHECK_RESULT $? 0 0 "安装python3-myst-nb和mystnb-docutils-html_s失败"
- fi
-
- # 测试使用-s参数包含查看文档源链接
- LOG_INFO "测试使用-s参数包含查看文档源链接"
- output=$(python3 -m myst_nb --help | grep -w "\-s")
- CHECK_RESULT $? 0 0 "-s参数不支持或不存在"
-
- # 清理环境,恢复到之前的状态
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "卸载python3-myst-nb和mystnb-docutils-html_s"
- dnf remove -y python3-myst-nb mystnb-docutils-html_s
- CHECK_RESULT $? 0 0 "卸载python3-myst-nb和mystnb-docutils-html_s失败"
- fi
-
- LOG_INFO "测试脚本执行完成"
-
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_strict.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_strict.sh
deleted file mode 100644
index 2fd4070fd68..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_strict.sh
+++ /dev/null
@@ -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-03-16
-# @License : Mulan PSL v2
-# @Desc : 测试使用 --strict 选项在轻微问题时停止执行
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试使用 --strict 选项在轻微问题时停止执行"
-
- # 检查是否已安装所需的软件包
- LOG_INFO "检查是否已安装 python3-myst-nb、mystnb-docutils-html 软件包"
- if ! dnf list installed python3-myst-nb &> /dev/null; then
- INSTALLED_PYTHON3_MYST_NB=0
- else
- INSTALLED_PYTHON3_MYST_NB=1
- fi
- if ! dnf list installed mystnb-docutils-html &> /dev/null; then
- INSTALLED_MYSTNB_DOCUTILS_HTML=0
- else
- INSTALLED_MYSTNB_DOCUTILS_HTML=1
- fi
-
- # 如果未安装,则进行安装
- if [[ $INSTALLED_PYTHON3_MYST_NB -eq 0 ]] || [[ $INSTALLED_MYSTNB_DOCUTILS_HTML -eq 0 ]]; then
- LOG_INFO "部分或全部软件包未安装,开始安装"
-
- # 检查yum源中是否有 python3-myst-nb
- LOG_INFO "检查yum源中是否有 python3-myst-nb"
- if ! dnf list available python3-myst-nb &> /dev/null; then
- LOG_ERROR "yum源中未找到 python3-myst-nb 软件包"
- exit 255
- fi
-
- # 检查yum源中是否有 mystnb-docutils-html
- LOG_INFO "检查yum源中是否有 mystnb-docutils-html"
- if ! dnf list available mystnb-docutils-html &> /dev/null; then
- LOG_ERROR "yum源中未找到 mystnb-docutils-html 软件包"
- exit 255
- fi
-
- # 安装软件包
- LOG_INFO "安装 python3-myst-nb 和 mystnb-docutils-html"
- dnf install -y python3-myst-nb mystnb-docutils-html
- CHECK_RESULT $? 0 0 "安装软件包失败"
- else
- LOG_INFO "软件包已安装,跳过安装步骤"
- fi
-
- # 测试 --strict 选项
- LOG_INFO "测试使用 --strict 选项在轻微问题时停止执行"
- # 创建一个包含轻微问题的测试文件
- TEST_FILE="test_strict.md"
- cat > $TEST_FILE << EOF
- # Test Document
-
- This is a test document with a warning.
-
- \`\`\`{python}
- print("Hello, World!")
- \`\`\`
- EOF
-
- # 尝试使用 --strict 选项转换文档
- LOG_INFO "执行 mystnb-docutils-html 命令并启用 --strict 选项"
- mystnb-docutils-html --strict $TEST_FILE output.html 2>&1
- EXIT_CODE=$?
-
- # 检查退出码,期望非0(因为存在轻微问题)
- if [[ $EXIT_CODE -eq 0 ]]; then
- LOG_ERROR "命令执行成功,但预期应因轻微问题而失败"
- CHECK_RESULT 1 0 0 "--strict 选项未按预期工作"
- else
- LOG_INFO "命令因轻微问题而停止执行,符合预期"
- CHECK_RESULT 0 0 0 "--strict 选项工作正常"
- fi
-
- # 清理测试文件
- LOG_INFO "清理测试文件"
- rm -f $TEST_FILE output.html
-
- # 环境恢复:如果脚本开始时未安装软件包,则卸载它们
- if [[ $INSTALLED_PYTHON3_MYST_NB -eq 0 ]] || [[ $INSTALLED_MYSTNB_DOCUTILS_HTML -eq 0 ]]; then
- LOG_INFO "卸载测试安装的软件包"
- dnf remove -y python3-myst-nb mystnb-docutils-html
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- else
- LOG_INFO "保持原有软件包安装状态"
- fi
-
- LOG_INFO "测试完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_t.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_t.sh
deleted file mode 100644
index 231b60c1a80..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_t.sh
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/usr/bin/bash
-
-# Copyright (c) 2024 ISCAS .ALL rights reserved.
-# This program is licensed under Mulan PSL v2.
-# You can use it according to the terms and conditions of the Mulan PSL v2.
-# http://license.coscl.org.cn/MulanPSL2
-# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
-# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
-# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
-# See the Mulan PSL v2 for more details.
-
-# #############################################
-# @Author : honghua
-# @Contact : honghua@iscas.ac.cn
-# @Date : 2025-12-01
-# @License : Mulan PSL v2
-# @Desc : 测试使用-t参数包含时间和日期信息
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 检查是否已安装python3-myst-nb和mystnb-docutils-html_t
- LOG_INFO "检查是否已安装python3-myst-nb和mystnb-docutils-html_t"
- if rpm -q python3-myst-nb mystnb-docutils-html_t &>/dev/null; then
- LOG_INFO "软件包已安装,脚本结束时将保持安装状态"
- INSTALLED=true
- else
- LOG_INFO "软件包未安装,将在测试后卸载"
- INSTALLED=false
- fi
-
- # 检查yum源中是否存在软件包
- LOG_INFO "检查yum源中是否存在python3-myst-nb和mystnb-docutils-html_t"
- if ! dnf list available python3-myst-nb mystnb-docutils-html_t &>/dev/null; then
- LOG_ERROR "yum源中不存在python3-myst-nb或mystnb-docutils-html_t"
- exit 255
- fi
-
- # 安装软件包
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "安装python3-myst-nb和mystnb-docutils-html_t"
- dnf install -y python3-myst-nb mystnb-docutils-html_t
- CHECK_RESULT $? 0 0 "安装软件包失败"
- fi
-
- # 测试-t参数包含时间和日期信息
- LOG_INFO "测试使用-t参数包含时间和日期信息"
- output=$(mystnb-docutils-html_t -t "2023-10-01 12:00:00" 2>&1)
- CHECK_RESULT $? 0 0 "-t参数执行失败"
- if [[ "$output" != *"2023-10-01 12:00:00"* ]]; then
- LOG_ERROR "-t参数未正确包含时间和日期信息"
- exit 255
- fi
-
- # 清理环境:如果之前未安装则卸载软件包
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "卸载python3-myst-nb和mystnb-docutils-html_t"
- dnf remove -y python3-myst-nb mystnb-docutils-html_t
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- fi
-
- LOG_INFO "测试脚本执行完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_time.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_time.sh
deleted file mode 100644
index c8ce0f06c6f..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_time.sh
+++ /dev/null
@@ -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-16
-# @License : Mulan PSL v2
-# @Desc : 测试使用 --time 选项包含时间和日期
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- set -e
-
- LOG_INFO "开始测试使用 --time 选项包含时间和日期"
-
- # 检查环境是否已安装所需软件包
- LOG_INFO "检查环境是否已安装 python3-myst-nb, mystnb-docutils-html 软件包"
- if dnf list installed python3-myst-nb >/dev/null 2>&1 && dnf list installed mystnb-docutils-html >/dev/null 2>&1; then
- LOG_INFO "软件包已安装,测试结束后将保持安装状态"
- INSTALLED="yes"
- else
- LOG_INFO "软件包未安装,将在测试过程中安装,并在测试结束后卸载"
- INSTALLED="no"
- fi
-
- # 检查yum源中是否存在软件包
- LOG_INFO "检查yum源中是否存在 python3-myst-nb 软件包"
- if ! dnf list available python3-myst-nb >/dev/null 2>&1; then
- LOG_ERROR "yum源中未找到 python3-myst-nb 软件包"
- exit 255
- fi
-
- LOG_INFO "检查yum源中是否存在 mystnb-docutils-html 软件包"
- if ! dnf list available mystnb-docutils-html >/dev/null 2>&1; then
- LOG_ERROR "yum源中未找到 mystnb-docutils-html 软件包"
- exit 255
- fi
-
- # 如果未安装,则安装软件包
- if [ "$INSTALLED" = "no" ]; then
- LOG_INFO "安装 python3-myst-nb 和 mystnb-docutils-html 软件包"
- dnf install -y python3-myst-nb mystnb-docutils-html
- CHECK_RESULT $? 0 0 "安装软件包失败"
- fi
-
- # 检查 --time 参数是否被支持
- LOG_INFO "检查 myst 命令是否支持 --time 参数"
- if ! myst --help 2>&1 | grep -q -- "--time"; then
- LOG_ERROR "myst 命令不支持 --time 参数"
- # 如果是测试过程中安装的,需要卸载
- if [ "$INSTALLED" = "no" ]; then
- LOG_INFO "清理环境:卸载测试安装的软件包"
- dnf remove -y python3-myst-nb mystnb-docutils-html
- fi
- exit 255
- fi
-
- # 执行测试:使用 --time 选项
- LOG_INFO "执行测试:使用 myst --time 命令"
- myst --time
- CHECK_RESULT $? 0 0 "执行 myst --time 命令失败"
-
- # 清理环境:如果测试过程中安装了软件包,则卸载
- if [ "$INSTALLED" = "no" ]; then
- LOG_INFO "清理环境:卸载测试安装的软件包"
- dnf remove -y python3-myst-nb mystnb-docutils-html
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- else
- LOG_INFO "测试完成,保持软件包安装状态"
- fi
-
- LOG_INFO "测试使用 --time 选项包含时间和日期 完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_title.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_title.sh
deleted file mode 100644
index 0b45f3d0234..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_title.sh
+++ /dev/null
@@ -1,71 +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-01
-# @License : Mulan PSL v2
-# @Desc : 测试使用--title参数指定文档标题
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
-
- # 检查是否已安装python3-myst-nb和mystnb-docutils-html_title
- LOG_INFO "检查是否已安装python3-myst-nb和mystnb-docutils-html_title"
- if dnf list installed python3-myst-nb >/dev/null 2>&1 && dnf list installed mystnb-docutils-html_title >/dev/null 2>&1; then
- LOG_INFO "python3-myst-nb和mystnb-docutils-html_title已安装"
- installed=true
- else
- LOG_INFO "python3-myst-nb和mystnb-docutils-html_title未安装"
- installed=false
- fi
-
- # 检查yum源中是否有python3-myst-nb和mystnb-docutils-html_title
- LOG_INFO "检查yum源中是否有python3-myst-nb和mystnb-docutils-html_title"
- if ! dnf list available python3-myst-nb >/dev/null 2>&1 || ! dnf list available mystnb-docutils-html_title >/dev/null 2>&1; then
- LOG_ERROR "yum源中缺少python3-myst-nb或mystnb-docutils-html_title"
- exit 255
- fi
-
- # 如果未安装,则安装软件包
- if [ "$installed" = false ]; then
- LOG_INFO "安装python3-myst-nb和mystnb-docutils-html_title"
- dnf install -y python3-myst-nb mystnb-docutils-html_title
- CHECK_RESULT $? 0 0 "安装软件包失败"
- fi
-
- # 测试使用--title参数指定文档标题
- LOG_INFO "测试使用--title参数指定文档标题"
- output=$(python3 -m myst_nb --title "测试标题" 2>&1)
- CHECK_RESULT $? 0 0 "执行命令失败"
-
- # 检查输出是否包含指定的标题
- LOG_INFO "检查输出是否包含指定的标题"
- if [[ "$output" != *"测试标题"* ]]; then
- LOG_ERROR "--title参数未生效"
- exit 255
- fi
-
- # 恢复环境:如果脚本开始时未安装软件包,则卸载
- if [ "$installed" = false ]; then
- LOG_INFO "卸载python3-myst-nb和mystnb-docutils-html_title"
- dnf remove -y python3-myst-nb mystnb-docutils-html_title
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- fi
-
- LOG_INFO "测试脚本执行完成"
-
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_verbose.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_verbose.sh
deleted file mode 100644
index 4b0053b7d70..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_verbose.sh
+++ /dev/null
@@ -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 : 2026-03-16
-# @License : Mulan PSL v2
-# @Desc : 测试使用 --verbose 选项报告所有系统消息
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试:测试使用 --verbose 选项报告所有系统消息"
- # 步骤1:检查是否已安装 python3-myst-nb, mystnb-docutils-html 软件包
- LOG_INFO "检查 python3-myst-nb, mystnb-docutils-html 是否已安装"
- rpm -q python3-myst-nb mystnb-docutils-html > /dev/null 2>&1
- if [ $? -eq 0 ]; then
- LOG_INFO "软件包已安装,测试结束后保持安装状态"
- INSTALLED=1
- else
- LOG_INFO "软件包未安装,将在测试过程中安装"
- INSTALLED=0
- fi
-
- # 步骤2:检查 yum 源中是否有 python3-myst-nb, mystnb-docutils-html 软件包
- LOG_INFO "检查 yum 源中是否有 python3-myst-nb, mystnb-docutils-html 软件包"
- dnf list available python3-myst-nb mystnb-docutils-html > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "yum 源中缺少 python3-myst-nb 或 mystnb-docutils-html 软件包"
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum 源中缺少 python3-myst-nb 或 mystnb-docutils-html 软件包"
- exit 255
- fi
-
- # 步骤3:如果未安装,则安装软件包
- if [ $INSTALLED -eq 0 ]; then
- LOG_INFO "安装 python3-myst-nb, mystnb-docutils-html 软件包"
- dnf install -y python3-myst-nb mystnb-docutils-html
- CHECK_RESULT $? 0 0 "安装软件包失败"
- fi
-
- # 步骤4:执行测试命令,检查 --verbose 选项是否支持
- LOG_INFO "执行测试命令:python3-myst-nb --verbose"
- python3-myst-nb --verbose > /dev/null 2>&1
- if [ $? -eq 255 ]; then
- LOG_ERROR "--verbose 选项不支持"
- exit 255
- fi
- CHECK_RESULT $? 0 0 "执行 python3-myst-nb --verbose 失败"
-
- # 步骤5:验证 --verbose 选项输出系统消息
- LOG_INFO "验证 --verbose 选项是否输出系统消息"
- output=$(python3-myst-nb --verbose 2>&1)
- if echo "$output" | grep -q "系统消息\|verbose\|info"; then
- LOG_INFO "--verbose 选项成功输出系统消息"
- else
- LOG_ERROR "--verbose 选项未输出系统消息"
- exit 1
- fi
-
- # 步骤6:清理环境,如果测试前未安装,则卸载软件包
- if [ $INSTALLED -eq 0 ]; then
- LOG_INFO "卸载测试过程中安装的软件包"
- dnf remove -y python3-myst-nb mystnb-docutils-html
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- else
- LOG_INFO "测试前已安装软件包,保持安装状态"
- fi
-
- LOG_INFO "测试完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_version.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_version.sh
deleted file mode 100644
index 4bfeec602ff..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-html_version.sh
+++ /dev/null
@@ -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-16
-# @License : Mulan PSL v2
-# @Desc : 测试使用 --version 参数查看版本信息
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试:使用 --version 参数查看版本信息"
-
- # 检查软件包是否在yum源中
- LOG_INFO "检查软件包 python3-myst-nb、mystnb-docutils-html 是否在yum源中"
- dnf list available python3-myst-nb 2>&1 | grep -q "python3-myst-nb"
- if [ $? -ne 0 ]; then
- LOG_ERROR "软件包 python3-myst-nb 不在yum源中"
- exit 255
- fi
- dnf list available mystnb-docutils-html 2>&1 | grep -q "mystnb-docutils-html"
- if [ $? -ne 0 ]; then
- LOG_ERROR "软件包 mystnb-docutils-html 不在yum源中"
- exit 255
- fi
-
- # 检查是否已安装
- LOG_INFO "检查是否已安装 python3-myst-nb、mystnb-docutils-html"
- rpm -q python3-myst-nb > /dev/null 2>&1
- python3_myst_nb_installed=$?
- rpm -q mystnb-docutils-html > /dev/null 2>&1
- mystnb_docutils_html_installed=$?
-
- # 如果未安装,则安装
- if [ $python3_myst_nb_installed -ne 0 ] || [ $mystnb_docutils_html_installed -ne 0 ]; then
- LOG_INFO "未完全安装,开始安装软件包"
- dnf install -y python3-myst-nb mystnb-docutils-html
- CHECK_RESULT $? 0 0 "安装软件包失败"
- installed_during_test=1
- else
- LOG_INFO "软件包已安装,跳过安装步骤"
- installed_during_test=0
- fi
-
- # 测试 --version 参数
- LOG_INFO "测试 python3-myst-nb --version 命令"
- python3-myst-nb --version > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "python3-myst-nb --version 命令执行失败"
-
- LOG_INFO "测试 mystnb-docutils-html --version 命令"
- mystnb-docutils-html --version > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "mystnb-docutils-html --version 命令执行失败"
-
- # 清理环境
- if [ $installed_during_test -eq 1 ]; then
- LOG_INFO "卸载测试期间安装的软件包"
- dnf remove -y python3-myst-nb mystnb-docutils-html
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- else
- LOG_INFO "测试前已安装,保持安装状态"
- fi
-
- LOG_INFO "测试完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-latex_d.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-latex_d.sh
deleted file mode 100644
index 6c266a226b4..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-latex_d.sh
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/bash
-
-# Copyright (c) 2024 ISCAS .ALL rights reserved.
-# This program is licensed under Mulan PSL v2.
-# You can use it according to the terms and conditions of the Mulan PSL v2.
-# http://license.coscl.org.cn/MulanPSL2
-# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
-# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
-# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
-# See the Mulan PSL v2 for more details.
-
-# #############################################
-# @Author : honghua
-# @Contact : honghua@iscas.ac.cn
-# @Date : 2025-12-01
-# @License : Mulan PSL v2
-# @Desc : 测试使用-d参数包含日期信息
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
-
- # 检查是否已经安装所需软件包
- LOG_INFO "检查是否已安装python3-myst-nb、mystnb-docutils-latex_d"
- if ! dnf list installed python3-myst-nb &>/dev/null || ! dnf list installed mystnb-docutils-latex_d &>/dev/null; then
- LOG_INFO "软件包未安装,将进行安装测试"
- INSTALLED=false
- else
- LOG_INFO "软件包已安装,跳过安装步骤"
- INSTALLED=true
- fi
-
- # 检查yum源中是否存在所需软件包
- LOG_INFO "检查yum源中是否存在python3-myst-nb和mystnb-docutils-latex_d"
- if ! dnf list available python3-myst-nb &>/dev/null || ! dnf list available mystnb-docutils-latex_d &>/dev/null; then
- LOG_ERROR "yum源中缺少所需软件包"
- exit 255
- fi
-
- # 如果未安装,则安装软件包
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "开始安装python3-myst-nb和mystnb-docutils-latex_d"
- dnf install -y python3-myst-nb mystnb-docutils-latex_d
- CHECK_RESULT $? 0 0 "安装软件包失败"
- fi
-
- # 测试使用-d参数包含日期信息
- LOG_INFO "测试使用-d参数包含日期信息"
- output=$(mystnb-docutils-latex_d -d 2023-10-01)
- CHECK_RESULT $? 0 0 "执行命令失败"
-
- # 清理环境
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "卸载测试安装的软件包"
- dnf remove -y python3-myst-nb mystnb-docutils-latex_d
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- fi
-
- LOG_INFO "测试完成,环境已恢复"
-
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-latex_debug.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-latex_debug.sh
deleted file mode 100644
index e1e381de91a..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-latex_debug.sh
+++ /dev/null
@@ -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-03-16
-# @License : Mulan PSL v2
-# @Desc : 测试启用调试级别的系统消息和诊断
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 定义日志函数(虽然题目要求直接使用,但为了脚本完整运行,这里简单定义)
- LOG_INFO() {
- echo "[INFO] $*"
- }
- LOG_ERROR() {
- echo "[ERROR] $*"
- }
-
- # 定义CHECK_RESULT函数(虽然题目要求直接使用,但为了脚本完整运行,这里简单定义)
- 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 node_ip=$2
- local node_password=$3
- local node_user=$4
- sshpass -p "$node_password" ssh -o StrictHostKeyChecking=no "$node_user@$node_ip" "$cmd"
- }
-
- # 定义软件包列表
- PACKAGES="python3-myst-nb mystnb-docutils-latex_debug"
-
- # 步骤1:检查yum源中是否有指定软件包
- LOG_INFO "步骤1:检查yum源中是否有指定软件包"
- for pkg in $PACKAGES; do
- dnf list available $pkg &>/dev/null
- if [ $? -ne 0 ]; then
- LOG_ERROR "软件包 $pkg 在yum源中不存在"
- exit 255
- fi
- done
-
- # 步骤2:检查是否已经安装软件包
- LOG_INFO "步骤2:检查是否已经安装软件包"
- INSTALLED=false
- for pkg in $PACKAGES; do
- rpm -q $pkg &>/dev/null
- if [ $? -eq 0 ]; then
- INSTALLED=true
- LOG_INFO "软件包 $pkg 已经安装"
- fi
- done
-
- # 步骤3:如果未安装,则安装软件包
- if [ "$INSTALLED" = "false" ]; then
- LOG_INFO "步骤3:安装软件包"
- dnf install -y $PACKAGES
- CHECK_RESULT $? 0 0 "安装软件包失败"
- fi
-
- # 步骤4:测试启用调试级别的系统消息和诊断
- LOG_INFO "步骤4:测试启用调试级别的系统消息和诊断"
- # 假设测试命令是 "python3 -m myst_nb --debug",这里根据实际测试用例调整
- python3 -m myst_nb --debug &>/dev/null
- CHECK_RESULT $? 0 0 "启用调试级别的系统消息和诊断失败"
-
- # 步骤5:清理环境,恢复到之前的状态
- LOG_INFO "步骤5:清理环境,恢复到之前的状态"
- if [ "$INSTALLED" = "false" ]; then
- LOG_INFO "卸载软件包"
- dnf remove -y $PACKAGES
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- else
- LOG_INFO "软件包已安装,保持安装状态"
- fi
-
- LOG_INFO "测试完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-latex_g.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-latex_g.sh
deleted file mode 100644
index 9214c5190ec..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-latex_g.sh
+++ /dev/null
@@ -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 : 2025-12-01
-# @License : Mulan PSL v2
-# @Desc : 测试使用-g参数包含生成器信息
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
-
- # 检查是否已安装python3-myst-nb、mystnb-docutils-latex_g
- LOG_INFO "检查是否已安装python3-myst-nb和mystnb-docutils-latex_g"
- if dnf list installed python3-myst-nb && dnf list installed mystnb-docutils-latex_g; then
- LOG_INFO "python3-myst-nb和mystnb-docutils-latex_g已安装"
- INSTALLED=true
- else
- LOG_INFO "python3-myst-nb和mystnb-docutils-latex_g未安装"
- INSTALLED=false
- fi
-
- # 检查yum源中是否存在python3-myst-nb和mystnb-docutils-latex_g
- LOG_INFO "检查yum源中是否存在python3-myst-nb和mystnb-docutils-latex_g"
- if ! dnf list available python3-myst-nb || ! dnf list available mystnb-docutils-latex_g; then
- LOG_ERROR "yum源中不存在python3-myst-nb或mystnb-docutils-latex_g"
- exit 255
- fi
-
- # 如果未安装,则安装软件包
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "开始安装python3-myst-nb和mystnb-docutils-latex_g"
- dnf install -y python3-myst-nb mystnb-docutils-latex_g
- CHECK_RESULT $? 0 0 "安装python3-myst-nb和mystnb-docutils-latex_g失败"
- fi
-
- # 测试使用-g参数包含生成器信息
- LOG_INFO "测试使用-g参数包含生成器信息"
- output=$(python3-myst-nb -g 2>&1)
- if [[ $output == *"generator"* ]]; then
- LOG_INFO "测试通过:-g参数包含生成器信息"
- else
- LOG_ERROR "测试失败:-g参数不包含生成器信息或命令执行失败"
- CHECK_RESULT $? 0 1 "-g参数测试失败"
- fi
-
- # 如果之前未安装,则卸载软件包
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "卸载python3-myst-nb和mystnb-docutils-latex_g"
- dnf remove -y python3-myst-nb mystnb-docutils-latex_g
- CHECK_RESULT $? 0 0 "卸载python3-myst-nb和mystnb-docutils-latex_g失败"
- fi
-
- LOG_INFO "测试脚本执行完毕,环境已恢复"
-
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-latex_h.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-latex_h.sh
deleted file mode 100644
index b5d17f470b1..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-latex_h.sh
+++ /dev/null
@@ -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-16
-# @License : Mulan PSL v2
-# @Desc : 测试显示帮助信息
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试:测试显示帮助信息"
-
- # 检查是否已安装python3-myst-nb、mystnb-docutils-latex_h
- LOG_INFO "检查python3-myst-nb、mystnb-docutils-latex_h是否已安装"
- rpm -q python3-myst-nb mystnb-docutils-latex_h > /dev/null 2>&1
- installed=$?
-
- if [ $installed -eq 0 ]; then
- LOG_INFO "python3-myst-nb和mystnb-docutils-latex_h已安装,测试结束后将保持安装状态"
- pre_installed=true
- else
- LOG_INFO "python3-myst-nb和mystnb-docutils-latex_h未安装,将在测试步骤中安装,测试结束后卸载"
- pre_installed=false
- fi
-
- # 检查yum源中是否存在软件包
- LOG_INFO "检查yum源中是否存在python3-myst-nb"
- dnf list available python3-myst-nb > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "yum源中未找到python3-myst-nb软件包"
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中未找到python3-myst-nb软件包"
- exit 255
- fi
-
- LOG_INFO "检查yum源中是否存在mystnb-docutils-latex_h"
- dnf list available mystnb-docutils-latex_h > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "yum源中未找到mystnb-docutils-latex_h软件包"
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中未找到mystnb-docutils-latex_h软件包"
- exit 255
- fi
-
- # 如果未安装,则安装软件包
- if [ "$pre_installed" = false ]; then
- LOG_INFO "安装python3-myst-nb和mystnb-docutils-latex_h"
- dnf install -y python3-myst-nb mystnb-docutils-latex_h
- CHECK_RESULT $? 0 0 "安装python3-myst-nb和mystnb-docutils-latex_h失败"
- fi
-
- # 测试显示帮助信息
- LOG_INFO "测试myst命令显示帮助信息"
- myst --help > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "myst命令显示帮助信息失败"
-
- LOG_INFO "测试nbconvert命令显示帮助信息"
- jupyter nbconvert --help > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "nbconvert命令显示帮助信息失败"
-
- # 清理环境:如果测试前未安装,则卸载软件包
- if [ "$pre_installed" = false ]; then
- LOG_INFO "卸载python3-myst-nb和mystnb-docutils-latex_h"
- dnf remove -y python3-myst-nb mystnb-docutils-latex_h
- CHECK_RESULT $? 0 0 "卸载python3-myst-nb和mystnb-docutils-latex_h失败"
- fi
-
- LOG_INFO "测试完成:测试显示帮助信息"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-latex_output.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-latex_output.sh
deleted file mode 100644
index 470d509c80e..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-latex_output.sh
+++ /dev/null
@@ -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 : 2025-12-01
-# @License : Mulan PSL v2
-# @Desc : 测试使用--output参数指定输出文件
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
-
- # 检查是否已安装所需软件包
- LOG_INFO "检查是否已安装python3-myst-nb、mystnb-docutils-latex-output"
- dnf list installed python3-myst-nb mystnb-docutils-latex-output > /dev/null 2>&1
- if [ $? -eq 0 ]; then
- LOG_INFO "软件包已安装,脚本结束后将保持安装状态"
- INSTALLED=true
- else
- LOG_INFO "软件包未安装,将在测试完成后卸载"
- INSTALLED=false
- fi
-
- # 检查yum源中是否存在软件包
- LOG_INFO "检查yum源中是否存在python3-myst-nb和mystnb-docutils-latex-output"
- dnf list available python3-myst-nb mystnb-docutils-latex-output > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中不存在所需软件包"
- exit 255
- fi
-
- # 安装软件包
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "安装python3-myst-nb和mystnb-docutils-latex-output"
- dnf install -y python3-myst-nb mystnb-docutils-latex-output
- CHECK_RESULT $? 0 0 "安装软件包失败"
- fi
-
- # 测试--output参数
- LOG_INFO "测试使用--output参数指定输出文件"
- TEST_OUTPUT_FILE="/tmp/test_output.txt"
- python3 -m myst_nb --output "$TEST_OUTPUT_FILE" > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "执行命令失败"
-
- # 检查输出文件是否存在
- LOG_INFO "检查输出文件是否存在"
- if [ -f "$TEST_OUTPUT_FILE" ]; then
- LOG_INFO "输出文件创建成功"
- else
- LOG_ERROR "输出文件未创建"
- exit 1
- fi
-
- # 清理测试输出文件
- LOG_INFO "清理测试输出文件"
- rm -f "$TEST_OUTPUT_FILE"
-
- # 卸载软件包(如果最初未安装)
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "卸载python3-myst-nb和mystnb-docutils-latex-output"
- dnf remove -y python3-myst-nb mystnb-docutils-latex-output
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- fi
-
- LOG_INFO "测试完成"
-
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-latex_q.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-latex_q.sh
deleted file mode 100644
index 093521f3142..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-latex_q.sh
+++ /dev/null
@@ -1,165 +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-16
-# @License : Mulan PSL v2
-# @Desc : 测试不报告任何系统消息
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 环境检查:判断是否已安装所需软件包
- LOG_INFO "开始检查环境是否已安装python3-myst-nb、mystnb-docutils-latex_q软件包"
-
- # 检查python3-myst-nb是否已安装
- if dnf list installed python3-myst-nb &>/dev/null; then
- PYTHON3_MYST_NB_INSTALLED=1
- LOG_INFO "python3-myst-nb已安装"
- else
- PYTHON3_MYST_NB_INSTALLED=0
- LOG_INFO "python3-myst-nb未安装"
- fi
-
- # 检查mystnb-docutils-latex_q是否已安装
- if dnf list installed mystnb-docutils-latex_q &>/dev/null; then
- MYSTNB_DOCUTILS_LATEX_Q_INSTALLED=1
- LOG_INFO "mystnb-docutils-latex_q已安装"
- else
- MYSTNB_DOCUTILS_LATEX_Q_INSTALLED=0
- LOG_INFO "mystnb-docutils-latex_q未安装"
- fi
-
- # 检查yum源中是否有python3-myst-nb软件包
- LOG_INFO "检查yum源中是否有python3-myst-nb软件包"
- dnf list available python3-myst-nb &>/dev/null
- CHECK_RESULT $? 0 0 "yum源中未找到python3-myst-nb软件包"
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中未找到python3-myst-nb软件包"
- exit 255
- fi
-
- # 检查yum源中是否有mystnb-docutils-latex_q软件包
- LOG_INFO "检查yum源中是否有mystnb-docutils-latex_q软件包"
- dnf list available mystnb-docutils-latex_q &>/dev/null
- CHECK_RESULT $? 0 0 "yum源中未找到mystnb-docutils-latex_q软件包"
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中未找到mystnb-docutils-latex_q软件包"
- exit 255
- fi
-
- # 如果软件包未安装,则进行安装
- if [ $PYTHON3_MYST_NB_INSTALLED -eq 0 ]; then
- LOG_INFO "开始安装python3-myst-nb软件包"
- dnf install -y python3-myst-nb
- CHECK_RESULT $? 0 0 "安装python3-myst-nb失败"
- PYTHON3_MYST_NB_INSTALLED=1
- fi
-
- if [ $MYSTNB_DOCUTILS_LATEX_Q_INSTALLED -eq 0 ]; then
- LOG_INFO "开始安装mystnb-docutils-latex_q软件包"
- dnf install -y mystnb-docutils-latex_q
- CHECK_RESULT $? 0 0 "安装mystnb-docutils-latex_q失败"
- MYSTNB_DOCUTILS_LATEX_Q_INSTALLED=1
- fi
-
- # 测试步骤:测试不报告任何系统消息
- LOG_INFO "开始测试:测试不报告任何系统消息"
-
- # 检查python3-myst-nb命令是否存在
- LOG_INFO "检查python3-myst-nb命令是否存在"
- command -v python3-myst-nb &>/dev/null
- CHECK_RESULT $? 0 0 "python3-myst-nb命令不存在"
-
- # 检查mystnb-docutils-latex_q命令是否存在
- LOG_INFO "检查mystnb-docutils-latex_q命令是否存在"
- command -v mystnb-docutils-latex_q &>/dev/null
- CHECK_RESULT $? 0 0 "mystnb-docutils-latex_q命令不存在"
-
- # 测试python3-myst-nb命令是否支持--help参数
- LOG_INFO "测试python3-myst-nb命令是否支持--help参数"
- python3-myst-nb --help &>/dev/null
- CHECK_RESULT $? 0 0 "python3-myst-nb命令不支持--help参数"
-
- # 测试mystnb-docutils-latex_q命令是否支持--help参数
- LOG_INFO "测试mystnb-docutils-latex_q命令是否支持--help参数"
- mystnb-docutils-latex_q --help &>/dev/null
- CHECK_RESULT $? 0 0 "mystnb-docutils-latex_q命令不支持--help参数"
-
- # 测试python3-myst-nb执行简单命令
- LOG_INFO "测试python3-myst-nb执行简单命令"
- python3-myst-nb --version &>/dev/null
- CHECK_RESULT $? 0 0 "python3-myst-nb执行失败"
-
- # 测试mystnb-docutils-latex_q执行简单命令
- LOG_INFO "测试mystnb-docutils-latex_q执行简单命令"
- mystnb-docutils-latex_q --version &>/dev/null
- CHECK_RESULT $? 0 0 "mystnb-docutils-latex_q执行失败"
-
- # 测试不报告任何系统消息
- LOG_INFO "测试不报告任何系统消息"
- # 这里假设测试不报告任何系统消息意味着命令执行不产生额外输出
- python3-myst-nb --version 2>&1 | grep -q "系统消息"
- if [ $? -eq 0 ]; then
- LOG_ERROR "python3-myst-nb报告了系统消息"
- exit 1
- fi
-
- mystnb-docutils-latex_q --version 2>&1 | grep -q "系统消息"
- if [ $? -eq 0 ]; then
- LOG_ERROR "mystnb-docutils-latex_q报告了系统消息"
- exit 1
- fi
-
- LOG_INFO "测试完成:未报告任何系统消息"
-
- # 环境清理:如果测试前未安装,则卸载软件包
- LOG_INFO "开始环境清理"
-
- # 记录测试前的安装状态
- PYTHON3_MYST_NB_CLEANUP=0
- MYSTNB_DOCUTILS_LATEX_Q_CLEANUP=0
-
- if [ $PYTHON3_MYST_NB_INSTALLED -eq 1 ]; then
- # 如果测试前未安装,则标记需要清理
- if ! dnf list installed python3-myst-nb &>/dev/null 2>&1; then
- PYTHON3_MYST_NB_CLEANUP=1
- fi
- fi
-
- if [ $MYSTNB_DOCUTILS_LATEX_Q_INSTALLED -eq 1 ]; then
- # 如果测试前未安装,则标记需要清理
- if ! dnf list installed mystnb-docutils-latex_q &>/dev/null 2>&1; then
- MYSTNB_DOCUTILS_LATEX_Q_CLEANUP=1
- fi
- fi
-
- # 清理python3-myst-nb
- if [ $PYTHON3_MYST_NB_CLEANUP -eq 1 ]; then
- LOG_INFO "卸载python3-myst-nb软件包"
- dnf remove -y python3-myst-nb
- CHECK_RESULT $? 0 0 "卸载python3-myst-nb失败"
- fi
-
- # 清理mystnb-docutils-latex_q
- if [ $MYSTNB_DOCUTILS_LATEX_Q_CLEANUP -eq 1 ]; then
- LOG_INFO "卸载mystnb-docutils-latex_q软件包"
- dnf remove -y mystnb-docutils-latex_q
- CHECK_RESULT $? 0 0 "卸载mystnb-docutils-latex_q失败"
- fi
-
- LOG_INFO "环境清理完成,测试脚本执行完毕"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-latex_s.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-latex_s.sh
deleted file mode 100644
index d4bcf66a25c..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-latex_s.sh
+++ /dev/null
@@ -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 : 2025-12-01
-# @License : Mulan PSL v2
-# @Desc : 测试使用-s参数包含源链接
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试:测试使用-s参数包含源链接"
-
- # 检查是否已安装所需软件包
- LOG_INFO "检查是否已安装python3-myst-nb、mystnb-docutils-latex_s"
- dnf list installed python3-myst-nb > /dev/null 2>&1
- if [ $? -eq 0 ]; then
- installed_python3_myst_nb=1
- LOG_INFO "python3-myst-nb已安装"
- else
- installed_python3_myst_nb=0
- LOG_INFO "python3-myst-nb未安装"
- fi
-
- dnf list installed mystnb-docutils-latex_s > /dev/null 2>&1
- if [ $? -eq 0 ]; then
- installed_mystnb_docutils_latex_s=1
- LOG_INFO "mystnb-docutils-latex_s已安装"
- else
- installed_mystnb_docutils_latex_s=0
- LOG_INFO "mystnb-docutils-latex_s未安装"
- fi
-
- # 检查yum源中是否有软件包
- LOG_INFO "检查yum源中是否有python3-myst-nb和mystnb-docutils-latex_s"
- dnf list available python3-myst-nb > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中未找到python3-myst-nb"
- exit 255
- fi
-
- dnf list available mystnb-docutils-latex_s > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中未找到mystnb-docutils-latex_s"
- exit 255
- fi
-
- # 如果未安装,则安装软件包
- if [ $installed_python3_myst_nb -eq 0 ] || [ $installed_mystnb_docutils_latex_s -eq 0 ]; then
- LOG_INFO "开始安装python3-myst-nb和mystnb-docutils-latex_s"
- dnf install -y python3-myst-nb mystnb-docutils-latex_s
- CHECK_RESULT $? 0 0 "安装软件包失败"
- fi
-
- # 测试使用-s参数包含源链接
- LOG_INFO "测试使用-s参数包含源链接"
- python3 -m myst_nb --help | grep -q "\-s"
- if [ $? -ne 0 ]; then
- LOG_ERROR "-s参数不存在或不支持"
- exit 255
- fi
-
- # 执行命令并检查结果
- LOG_INFO "执行命令:python3 -m myst_nb -s "
- python3 -m myst_nb -s
- CHECK_RESULT $? 0 0 "执行命令失败"
-
- # 恢复环境
- if [ $installed_python3_myst_nb -eq 0 ] || [ $installed_mystnb_docutils_latex_s -eq 0 ]; then
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-latex_strict.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-latex_strict.sh
deleted file mode 100644
index 4b2f9b54c36..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-latex_strict.sh
+++ /dev/null
@@ -1,155 +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-16
-# @License : Mulan PSL v2
-# @Desc : 测试在遇到最轻微问题时停止执行
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 环境初始化检查
- LOG_INFO "开始检查环境状态"
-
- # 检查是否已安装相关软件包
- installed_packages=""
- if dnf list installed python3-myst-nb &>/dev/null; then
- installed_packages="$installed_packages python3-myst-nb"
- fi
- if dnf list installed mystnb-docutils-latex-strict &>/dev/null; then
- installed_packages="$installed_packages mystnb-docutils-latex-strict"
- fi
-
- if [ -n "$installed_packages" ]; then
- LOG_INFO "环境已安装软件包: $installed_packages"
- already_installed=true
- else
- LOG_INFO "环境未安装相关软件包"
- already_installed=false
- fi
-
- # 步骤1:检查yum源中是否存在指定软件包
- LOG_INFO "步骤1:检查yum源中是否存在python3-myst-nb和mystnb-docutils-latex-strict软件包"
-
- if ! dnf list available python3-myst-nb &>/dev/null; then
- LOG_ERROR "yum源中不存在python3-myst-nb软件包"
- exit 255
- fi
-
- if ! dnf list available mystnb-docutils-latex-strict &>/dev/null; then
- LOG_ERROR "yum源中不存在mystnb-docutils-latex-strict软件包"
- exit 255
- fi
-
- LOG_INFO "yum源中存在所有需要的软件包"
-
- # 步骤2:测试在遇到最轻微问题时停止执行
- LOG_INFO "步骤2:测试在遇到最轻微问题时停止执行"
-
- # 检查命令参数是否存在
- test_command="myst"
- if ! command -v $test_command &>/dev/null && [ "$already_installed" = "false" ]; then
- LOG_INFO "测试命令$test_command不存在,需要先安装软件包"
-
- # 安装软件包
- LOG_INFO "安装python3-myst-nb软件包"
- dnf install -y python3-myst-nb
- CHECK_RESULT $? 0 0 "安装python3-myst-nb失败"
-
- LOG_INFO "安装mystnb-docutils-latex-strict软件包"
- dnf install -y mystnb-docutils-latex-strict
- CHECK_RESULT $? 0 0 "安装mystnb-docutils-latex-strict失败"
- fi
-
- # 检查命令是否存在
- if ! command -v $test_command &>/dev/null; then
- LOG_ERROR "命令$test_command不存在"
- exit 255
- fi
-
- # 测试命令参数
- LOG_INFO "测试myst命令的--version参数"
- if ! $test_command --version &>/dev/null; then
- LOG_ERROR "myst命令不支持--version参数"
- exit 255
- fi
-
- # 测试无效参数(应该失败)
- LOG_INFO "测试myst命令的无效参数--invalid-param"
- if $test_command --invalid-param &>/dev/null; then
- LOG_ERROR "myst命令不应该支持--invalid-param参数"
- # 根据需求,遇到最轻微问题就停止执行
- exit 255
- fi
-
- LOG_INFO "参数检查通过"
-
- # 步骤3:执行基本功能测试
- LOG_INFO "步骤3:执行基本功能测试"
-
- # 创建一个简单的测试文件
- test_file="test_document.md"
- cat > $test_file << "EOF"
- # Test Document
-
- This is a test document for myst-nb testing.
-
- {python}
- print("Hello from MyST-NB")
-
- EOF
-
- # 尝试执行myst命令
- LOG_INFO "尝试使用myst处理测试文档"
- if ! $test_command $test_file 2>&1 | grep -q "Hello from MyST-NB"; then
- LOG_ERROR "myst命令执行失败或输出不符合预期"
- # 清理测试文件
- rm -f $test_file
- # 根据Linux标准退出码,127表示命令未找到,但这里应该是其他错误
- exit 1
- fi
-
- LOG_INFO "myst命令基本功能测试通过"
-
- # 清理测试文件
- rm -f $test_file
-
- # 环境恢复
- LOG_INFO "开始环境恢复"
-
- if [ "$already_installed" = "false" ]; then
- LOG_INFO "卸载测试安装的软件包"
-
- # 卸载软件包
- LOG_INFO "卸载mystnb-docutils-latex-strict软件包"
- dnf remove -y mystnb-docutils-latex-strict
- CHECK_RESULT $? 0 0 "卸载mystnb-docutils-latex-strict失败"
-
- LOG_INFO "卸载python3-myst-nb软件包"
- dnf remove -y python3-myst-nb
- CHECK_RESULT $? 0 0 "卸载python3-myst-nb失败"
-
- # 清理可能残留的依赖
- dnf autoremove -y
- CHECK_RESULT $? 0 0 "自动清理依赖失败"
- else
- LOG_INFO "保持原有软件包安装状态"
- fi
-
- LOG_INFO "环境恢复完成"
- LOG_INFO "测试脚本执行完毕"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-latex_t.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-latex_t.sh
deleted file mode 100644
index 2ec15b65f48..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-latex_t.sh
+++ /dev/null
@@ -1,76 +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-01
-# @License : Mulan PSL v2
-# @Desc : 测试使用-t参数包含时间和日期信息
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
-
- # 检查是否已安装所需软件包
- LOG_INFO "检查是否已安装python3-myst-nb、mystnb-docutils-latex软件包"
- dnf list installed python3-myst-nb > /dev/null 2>&1
- python3_myst_nb_installed=$?
- dnf list installed mystnb-docutils-latex > /dev/null 2>&1
- mystnb_docutils_latex_installed=$?
-
- if [ $python3_myst_nb_installed -eq 0 ] && [ $mystnb_docutils_latex_installed -eq 0 ]; then
- LOG_INFO "软件包已安装,脚本结束时将保持安装状态"
- already_installed=true
- else
- LOG_INFO "软件包未安装,将在测试步骤中安装并在脚本结束前卸载"
- already_installed=false
- fi
-
- # 检查yum源中是否有所需软件包
- LOG_INFO "检查yum源中是否有python3-myst-nb、mystnb-docutils-latex软件包"
- dnf list available python3-myst-nb > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中未找到python3-myst-nb软件包"
- exit 255
- fi
-
- dnf list available mystnb-docutils-latex > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中未找到mystnb-docutils-latex软件包"
- exit 255
- fi
-
- # 安装软件包(如果未安装)
- if [ "$already_installed" = false ]; then
- LOG_INFO "正在安装python3-myst-nb和mystnb-docutils-latex软件包"
- dnf install -y python3-myst-nb mystnb-docutils-latex > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "安装软件包失败"
- fi
-
- # 测试使用-t参数包含时间和日期信息
- LOG_INFO "测试使用-t参数包含时间和日期信息"
- python3 -m myst_nb --help | grep -q "\-t, \-\-time"
- CHECK_RESULT $? 0 0 "-t参数不支持"
-
- # 清理环境(如果之前未安装)
- if [ "$already_installed" = false ]; then
- LOG_INFO "正在卸载python3-myst-nb和mystnb-docutils-latex软件包"
- dnf remove -y python3-myst-nb mystnb-docutils-latex > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- fi
-
- LOG_INFO "测试脚本执行完毕,环境已恢复"
-
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-latex_title.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-latex_title.sh
deleted file mode 100644
index 4ee68ee8c5a..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-latex_title.sh
+++ /dev/null
@@ -1,59 +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-01
-# @License : Mulan PSL v2
-# @Desc : 测试使用--title参数指定文档标题
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试使用--title参数指定文档标题"
-
- # 检查是否已安装所需软件包
- LOG_INFO "检查是否已安装python3-myst-nb、mystnb-docutils-latex_title软件包"
- if ! dnf list installed python3-myst-nb &>/dev/null || ! dnf list installed mystnb-docutils-latex_title &>/dev/null; then
- LOG_INFO "软件包未安装,准备安装"
- # 检查yum源中是否有软件包
- if ! dnf list available python3-myst-nb &>/dev/null || ! dnf list available mystnb-docutils-latex_title &>/dev/null; then
- LOG_ERROR "yum源中缺少所需软件包"
- exit 255
- fi
- # 安装软件包
- dnf install -y python3-myst-nb mystnb-docutils-latex_title
- CHECK_RESULT $? 0 0 "安装软件包失败"
- # 标记需要卸载
- NEED_CLEANUP=1
- else
- LOG_INFO "软件包已安装"
- NEED_CLEANUP=0
- fi
-
- # 测试--title参数
- LOG_INFO "测试--title参数"
- mystnb-docutils-latex_title --title "测试标题"
- CHECK_RESULT $? 0 0 "执行--title参数失败"
-
- # 清理环境
- if [ $NEED_CLEANUP -eq 1 ]; then
- LOG_INFO "清理环境,卸载软件包"
- dnf remove -y python3-myst-nb mystnb-docutils-latex_title
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- fi
-
- LOG_INFO "测试完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-latex_upper_v.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-latex_upper_v.sh
deleted file mode 100644
index b7eda46bb3a..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-latex_upper_v.sh
+++ /dev/null
@@ -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-03-16
-# @License : Mulan PSL v2
-# @Desc : 测试显示程序版本号
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试:测试显示程序版本号"
-
- # 检查是否已安装python3-myst-nb、mystnb-docutils-latex_upper_v
- LOG_INFO "检查环境是否已安装所需软件包"
- if dnf list installed python3-myst-nb &> /dev/null && dnf list installed mystnb-docutils-latex_upper_v &> /dev/null; then
- LOG_INFO "环境已安装所需软件包,测试结束后将保持安装状态"
- INSTALLED=true
- else
- LOG_INFO "环境未安装所需软件包,将在测试前安装"
- INSTALLED=false
- fi
-
- # 检查yum源中是否有python3-myst-nb软件包
- LOG_INFO "检查yum源中是否有python3-myst-nb软件包"
- if ! dnf list available python3-myst-nb &> /dev/null; then
- LOG_ERROR "yum源中未找到python3-myst-nb软件包"
- exit 255
- fi
-
- # 检查yum源中是否有mystnb-docutils-latex_upper_v软件包
- LOG_INFO "检查yum源中是否有mystnb-docutils-latex_upper_v软件包"
- if ! dnf list available mystnb-docutils-latex_upper_v &> /dev/null; then
- LOG_ERROR "yum源中未找到mystnb-docutils-latex_upper_v软件包"
- exit 255
- fi
-
- # 如果未安装,则安装软件包
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "安装python3-myst-nb软件包"
- dnf install -y python3-myst-nb
- CHECK_RESULT $? 0 0 "安装python3-myst-nb失败"
-
- LOG_INFO "安装mystnb-docutils-latex_upper_v软件包"
- dnf install -y mystnb-docutils-latex_upper_v
- CHECK_RESULT $? 0 0 "安装mystnb-docutils-latex_upper_v失败"
- fi
-
- # 测试显示程序版本号
- LOG_INFO "测试显示python3-myst-nb版本号"
- python3-myst-nb --version
- CHECK_RESULT $? 0 0 "显示python3-myst-nb版本号失败"
-
- LOG_INFO "测试显示mystnb-docutils-latex_upper_v版本号"
- mystnb-docutils-latex_upper_v --version
- CHECK_RESULT $? 0 0 "显示mystnb-docutils-latex_upper_v版本号失败"
-
- # 清理环境
- LOG_INFO "清理测试环境"
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "卸载mystnb-docutils-latex_upper_v软件包"
- dnf remove -y mystnb-docutils-latex_upper_v
- CHECK_RESULT $? 0 0 "卸载mystnb-docutils-latex_upper_v失败"
-
- LOG_INFO "卸载python3-myst-nb软件包"
- dnf remove -y python3-myst-nb
- CHECK_RESULT $? 0 0 "卸载python3-myst-nb失败"
- fi
-
- LOG_INFO "测试完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-latex_v.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-latex_v.sh
deleted file mode 100644
index e5f2f33cace..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-latex_v.sh
+++ /dev/null
@@ -1,161 +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-16
-# @License : Mulan PSL v2
-# @Desc : 测试报告所有系统消息
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 测试脚本:测试报告所有系统消息
-
- # 定义颜色输出函数(可选,用于美化输出)
- LOG_INFO() {
- echo "[INFO] $1"
- }
-
- LOG_ERROR() {
- echo "[ERROR] $1"
- }
-
- # 检查软件包是否在yum源中
- check_package_in_repo() {
- local package_name="$1"
- LOG_INFO "检查yum源中是否存在软件包: $package_name"
- dnf list available "$package_name" &>/dev/null
- if [ $? -ne 0 ]; then
- LOG_ERROR "软件包 $package_name 不在yum源中"
- exit 255
- fi
- LOG_INFO "软件包 $package_name 在yum源中"
- }
-
- # 检查命令参数是否存在
- check_command_param() {
- local command="$1"
- local param="$2"
- LOG_INFO "检查命令 $command 是否支持参数: $param"
- $command --help 2>&1 | grep -q "$param"
- if [ $? -ne 0 ]; then
- LOG_ERROR "命令 $command 不支持参数 $param"
- exit 255
- fi
- LOG_INFO "命令 $command 支持参数 $param"
- }
-
- # 安装软件包
- install_package() {
- local package_name="$1"
- LOG_INFO "安装软件包: $package_name"
- dnf install -y "$package_name"
- CHECK_RESULT $? 0 0 "安装软件包 $package_name 失败"
- }
-
- # 卸载软件包
- uninstall_package() {
- local package_name="$1"
- LOG_INFO "卸载软件包: $package_name"
- dnf remove -y "$package_name"
- CHECK_RESULT $? 0 0 "卸载软件包 $package_name 失败"
- }
-
- # 检查软件包是否已安装
- is_package_installed() {
- local package_name="$1"
- rpm -q "$package_name" &>/dev/null
- return $?
- }
-
- # 主测试函数
- run_test() {
- LOG_INFO "开始测试:测试报告所有系统消息"
-
- # 定义需要测试的软件包
- packages=("python3-myst-nb" "mystnb-docutils-latex_v")
-
- # 记录初始安装状态
- initial_install_status=()
- for pkg in "${packages[@]}"; do
- if is_package_installed "$pkg"; then
- initial_install_status["$pkg"]=1
- LOG_INFO "软件包 $pkg 已安装"
- else
- initial_install_status["$pkg"]=0
- LOG_INFO "软件包 $pkg 未安装"
- fi
- done
-
- # 检查yum源中是否存在软件包
- for pkg in "${packages[@]}"; do
- check_package_in_repo "$pkg"
- done
-
- # 安装软件包(如果未安装)
- for pkg in "${packages[@]}"; do
- if [ "${initial_install_status[$pkg]}" -eq 0 ]; then
- install_package "$pkg"
- fi
- done
-
- # 测试命令参数
- LOG_INFO "测试python3命令参数"
- check_command_param "python3" "--version"
-
- # 执行python3命令测试
- LOG_INFO "执行python3 --version命令"
- python3 --version
- CHECK_RESULT $? 0 0 "python3 --version命令执行失败"
-
- # 测试myst命令(如果存在)
- LOG_INFO "测试myst命令"
- if command -v myst &>/dev/null; then
- check_command_param "myst" "--help"
- LOG_INFO "执行myst --help命令"
- myst --help
- CHECK_RESULT $? 0 0 "myst --help命令执行失败"
- else
- LOG_INFO "myst命令不存在,跳过测试"
- fi
-
- # 测试docutils命令(如果存在)
- LOG_INFO "测试docutils命令"
- if command -v rst2latex &>/dev/null; then
- check_command_param "rst2latex" "--help"
- LOG_INFO "执行rst2latex --help命令"
- rst2latex --help
- CHECK_RESULT $? 0 0 "rst2latex --help命令执行失败"
- else
- LOG_INFO "rst2latex命令不存在,跳过测试"
- fi
-
- # 清理环境:根据初始状态卸载软件包
- LOG_INFO "清理测试环境"
- for pkg in "${packages[@]}"; do
- if [ "${initial_install_status[$pkg]}" -eq 0 ]; then
- uninstall_package "$pkg"
- else
- LOG_INFO "软件包 $pkg 初始已安装,保持安装状态"
- fi
- done
-
- LOG_INFO "测试完成:测试报告所有系统消息"
- }
-
- # 执行测试
- run_test
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-pseudoxml_d.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-pseudoxml_d.sh
deleted file mode 100644
index 2c1694206e7..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-pseudoxml_d.sh
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/usr/bin/bash
-
-# Copyright (c) 2024 ISCAS .ALL rights reserved.
-# This program is licensed under Mulan PSL v2.
-# You can use it according to the terms and conditions of the Mulan PSL v2.
-# http://license.coscl.org.cn/MulanPSL2
-# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
-# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
-# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
-# See the Mulan PSL v2 for more details.
-
-# #############################################
-# @Author : honghua
-# @Contact : honghua@iscas.ac.cn
-# @Date : 2025-12-01
-# @License : Mulan PSL v2
-# @Desc : 测试使用-d参数包含日期信息
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试使用-d参数包含日期信息"
-
- # 检查是否已安装python3-myst-nb和mystnb-docutils-pseudoxml-d
- LOG_INFO "检查是否已安装python3-myst-nb和mystnb-docutils-pseudoxml-d"
- dnf list installed python3-myst-nb mystnb-docutils-pseudoxml-d > /dev/null 2>&1
- if [ $? -eq 0 ]; then
- LOG_INFO "软件包已安装,测试结束后将保持安装状态"
- INSTALLED=1
- else
- LOG_INFO "软件包未安装,将在测试结束后卸载"
- INSTALLED=0
- fi
-
- # 检查yum源中是否有python3-myst-nb和mystnb-docutils-pseudoxml-d
- LOG_INFO "检查yum源中是否有python3-myst-nb和mystnb-docutils-pseudoxml-d"
- dnf list available python3-myst-nb mystnb-docutils-pseudoxml-d > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中未找到python3-myst-nb或mystnb-docutils-pseudoxml-d"
- exit 255
- fi
-
- # 如果未安装,则安装软件包
- if [ $INSTALLED -eq 0 ]; then
- LOG_INFO "安装python3-myst-nb和mystnb-docutils-pseudoxml-d"
- dnf install -y python3-myst-nb mystnb-docutils-pseudoxml-d
- CHECK_RESULT $? 0 0 "安装软件包失败"
- fi
-
- # 测试使用-d参数包含日期信息
- LOG_INFO "测试使用-d参数包含日期信息"
- mystnb-docutils-pseudoxml -d 2023-10-01 > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "-d参数不支持或执行失败"
-
- # 清理环境:如果测试前未安装,则卸载软件包
- if [ $INSTALLED -eq 0 ]; then
- LOG_INFO "卸载python3-myst-nb和mystnb-docutils-pseudoxml-d"
- dnf remove -y python3-myst-nb mystnb-docutils-pseudoxml-d
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- fi
-
- LOG_INFO "测试完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-pseudoxml_g.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-pseudoxml_g.sh
deleted file mode 100644
index 709529e6b6d..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-pseudoxml_g.sh
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/usr/bin/bash
-
-# Copyright (c) 2024 ISCAS .ALL rights reserved.
-# This program is licensed under Mulan PSL v2.
-# You can use it according to the terms and conditions of the Mulan PSL v2.
-# http://license.coscl.org.cn/MulanPSL2
-# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
-# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
-# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
-# See the Mulan PSL v2 for more details.
-
-# #############################################
-# @Author : honghua
-# @Contact : honghua@iscas.ac.cn
-# @Date : 2025-12-01
-# @License : Mulan PSL v2
-# @Desc : 测试使用-g参数包含生成器信息
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试使用-g参数包含生成器信息"
-
- # 检查是否已安装所需软件包
- LOG_INFO "检查是否已安装python3-myst-nb、mystnb-docutils-pseudoxml_g"
- if ! dnf list installed python3-myst-nb &> /dev/null || ! dnf list installed mystnb-docutils-pseudoxml_g &> /dev/null; then
- LOG_INFO "软件包未安装,准备安装"
- # 检查yum源中是否有软件包
- LOG_INFO "检查yum源中是否有python3-myst-nb和mystnb-docutils-pseudoxml_g"
- if ! dnf list available python3-myst-nb &> /dev/null || ! dnf list available mystnb-docutils-pseudoxml_g &> /dev/null; then
- LOG_ERROR "yum源中缺少所需软件包"
- exit 255
- fi
- # 安装软件包
- LOG_INFO "安装python3-myst-nb和mystnb-docutils-pseudoxml_g"
- dnf install -y python3-myst-nb mystnb-docutils-pseudoxml_g
- CHECK_RESULT $? 0 0 "安装软件包失败"
- # 标记需要卸载
- NEED_CLEANUP=1
- else
- LOG_INFO "软件包已安装,无需重复安装"
- fi
-
- # 测试使用-g参数包含生成器信息
- LOG_INFO "测试使用-g参数包含生成器信息"
- output=$(mystnb-docutils-pseudoxml_g -g test_input)
- CHECK_RESULT $? 0 0 "执行命令失败"
-
- # 检查输出是否包含生成器信息
- if [[ "$output" != *"generator"* ]]; then
- LOG_ERROR "输出中未包含生成器信息"
- exit 255
- fi
-
- # 清理环境
- if [ "$NEED_CLEANUP" -eq 1 ]; then
- LOG_INFO "清理环境,卸载软件包"
- dnf remove -y python3-myst-nb mystnb-docutils-pseudoxml_g
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- fi
-
- LOG_INFO "测试完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-pseudoxml_s.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-pseudoxml_s.sh
deleted file mode 100644
index dd52b4805cf..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-pseudoxml_s.sh
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/bash
-
-# Copyright (c) 2024 ISCAS .ALL rights reserved.
-# This program is licensed under Mulan PSL v2.
-# You can use it according to the terms and conditions of the Mulan PSL v2.
-# http://license.coscl.org.cn/MulanPSL2
-# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
-# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
-# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
-# See the Mulan PSL v2 for more details.
-
-# #############################################
-# @Author : honghua
-# @Contact : honghua@iscas.ac.cn
-# @Date : 2025-12-01
-# @License : Mulan PSL v2
-# @Desc : 测试使用-s参数包含查看文档源链接
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试:测试使用-s参数包含查看文档源链接"
-
- # 检查软件包是否已安装
- LOG_INFO "检查软件包是否已安装"
- if dnf list installed | grep -q "python3-myst-nb"; then
- LOG_INFO "软件包已安装,脚本结束后将保持安装状态"
- installed=true
- else
- LOG_INFO "软件包未安装,将在脚本结束后卸载"
- installed=false
- fi
-
- # 检查yum源中是否有软件包
- LOG_INFO "检查yum源中是否有软件包"
- if ! dnf list available | grep -q "python3-myst-nb"; then
- LOG_ERROR "yum源中未找到软件包python3-myst-nb"
- exit 255
- fi
-
- # 安装软件包(如果未安装)
- if [ "$installed" = false ]; then
- LOG_INFO "安装软件包python3-myst-nb"
- dnf install -y python3-myst-nb
- CHECK_RESULT $? 0 0 "安装软件包失败"
- fi
-
- # 测试-s参数
- LOG_INFO "测试-s参数包含查看文档源链接"
- myst-nb --help | grep -q "\-s, \-\-source"
- CHECK_RESULT $? 0 0 "-s参数不支持或不存在"
-
- # 清理环境(如果脚本开始时未安装)
- if [ "$installed" = false ]; then
- LOG_INFO "卸载软件包python3-myst-nb"
- dnf remove -y python3-myst-nb
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- fi
-
- LOG_INFO "测试完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-pseudoxml_t.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-pseudoxml_t.sh
deleted file mode 100644
index 260434a2c3b..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-pseudoxml_t.sh
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/usr/bin/bash
-
-# Copyright (c) 2024 ISCAS .ALL rights reserved.
-# This program is licensed under Mulan PSL v2.
-# You can use it according to the terms and conditions of the Mulan PSL v2.
-# http://license.coscl.org.cn/MulanPSL2
-# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
-# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
-# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
-# See the Mulan PSL v2 for more details.
-
-# #############################################
-# @Author : honghua
-# @Contact : honghua@iscas.ac.cn
-# @Date : 2025-12-01
-# @License : Mulan PSL v2
-# @Desc : 测试使用-t参数包含时间和日期信息
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试:测试使用-t参数包含时间和日期信息"
-
- # 检查是否已安装python3-myst-nb和mystnb-docutils-pseudoxml
- LOG_INFO "检查是否已安装python3-myst-nb和mystnb-docutils-pseudoxml"
- dnf list installed python3-myst-nb mystnb-docutils-pseudoxml > /dev/null 2>&1
- if [ $? -eq 0 ]; then
- LOG_INFO "软件包已安装,测试结束后将保持安装状态"
- INSTALLED=1
- else
- LOG_INFO "软件包未安装,将在测试结束后卸载"
- INSTALLED=0
- fi
-
- # 检查yum源中是否有python3-myst-nb和mystnb-docutils-pseudoxml
- LOG_INFO "检查yum源中是否有python3-myst-nb和mystnb-docutils-pseudoxml"
- dnf list available python3-myst-nb mystnb-docutils-pseudoxml > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中缺少必要的软件包"
- exit 255
- fi
-
- # 如果未安装,则安装软件包
- if [ $INSTALLED -eq 0 ]; then
- LOG_INFO "安装python3-myst-nb和mystnb-docutils-pseudoxml"
- dnf install -y python3-myst-nb mystnb-docutils-pseudoxml
- CHECK_RESULT $? 0 0 "安装软件包失败"
- fi
-
- # 测试使用-t参数包含时间和日期信息
- LOG_INFO "测试使用-t参数包含时间和日期信息"
- myst nb --help | grep -q "\-t, \-\-time"
- CHECK_RESULT $? 0 255 "参数-t不支持"
-
- # 清理环境
- if [ $INSTALLED -eq 0 ]; then
- LOG_INFO "卸载python3-myst-nb和mystnb-docutils-pseudoxml"
- dnf remove -y python3-myst-nb mystnb-docutils-pseudoxml
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- fi
-
- LOG_INFO "测试完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_config.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_config.sh
deleted file mode 100644
index 794396b9f2b..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_config.sh
+++ /dev/null
@@ -1,120 +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-16
-# @License : Mulan PSL v2
-# @Desc : 测试从指定文件读取配置设置
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 测试脚本:测试从指定文件读取配置设置
-
- # 初始化变量
- PYTHON_PACKAGE="python3-myst-nb"
- DOCUTILS_PACKAGE="mystnb-docutils-xml_config"
- TEST_FILE="/tmp/test_config.xml"
- EXPECTED_OUTPUT="test_output"
- CLEANUP_FLAG=0
-
- # 步骤1:检查yum源中是否有需要的软件包
- LOG_INFO "步骤1:检查yum源中是否有需要的软件包"
- dnf list available ${PYTHON_PACKAGE} ${DOCUTILS_PACKAGE} &>/dev/null
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中缺少必要的软件包"
- exit 255
- fi
-
- # 步骤2:检查当前环境是否已安装软件包
- LOG_INFO "步骤2:检查当前环境是否已安装软件包"
- rpm -q ${PYTHON_PACKAGE} ${DOCUTILS_PACKAGE} &>/dev/null
- if [ $? -eq 0 ]; then
- LOG_INFO "软件包已安装,测试结束后将保持安装状态"
- INSTALLED=1
- else
- LOG_INFO "软件包未安装,将作为测试步骤进行安装"
- INSTALLED=0
- CLEANUP_FLAG=1
- fi
-
- # 步骤3:如果未安装,则安装软件包
- if [ ${INSTALLED} -eq 0 ]; then
- LOG_INFO "步骤3:安装必要的软件包"
- dnf install -y ${PYTHON_PACKAGE} ${DOCUTILS_PACKAGE}
- CHECK_RESULT $? 0 0 "软件包安装失败"
- fi
-
- # 步骤4:创建测试配置文件
- LOG_INFO "步骤4:创建测试配置文件"
- cat > ${TEST_FILE} << EOF
-
-
-
-
- xml
- UTF-8
-
-
- EOF
- CHECK_RESULT $? 0 0 "创建测试配置文件失败"
-
- # 步骤5:验证mystnb-docutils-xml_config命令是否存在
- LOG_INFO "步骤5:验证mystnb-docutils-xml_config命令是否存在"
- which mystnb-docutils-xml_config &>/dev/null
- if [ $? -ne 0 ]; then
- LOG_ERROR "mystnb-docutils-xml_config命令不存在"
- exit 255
- fi
-
- # 步骤6:测试从指定文件读取配置设置
- LOG_INFO "步骤6:测试从指定文件读取配置设置"
- mystnb-docutils-xml_config --help 2>&1 | grep -q "\-\-config"
- if [ $? -ne 0 ]; then
- LOG_ERROR "mystnb-docutils-xml_config不支持--config参数"
- exit 255
- fi
-
- # 步骤7:执行配置读取测试
- LOG_INFO "步骤7:执行配置读取测试"
- mystnb-docutils-xml_config --config ${TEST_FILE} --get output
- CHECK_RESULT $? 0 0 "从配置文件读取设置失败"
-
- # 步骤8:验证读取的配置值
- LOG_INFO "步骤8:验证读取的配置值"
- ACTUAL_OUTPUT=$(mystnb-docutils-xml_config --config ${TEST_FILE} --get output 2>/dev/null)
- if [ "${ACTUAL_OUTPUT}" = "${EXPECTED_OUTPUT}" ]; then
- LOG_INFO "配置读取成功:${ACTUAL_OUTPUT}"
- CHECK_RESULT 0 0 0 "配置值不匹配"
- else
- LOG_ERROR "配置读取失败,期望:${EXPECTED_OUTPUT},实际:${ACTUAL_OUTPUT}"
- CHECK_RESULT 1 0 0 "配置值不匹配"
- fi
-
- # 步骤9:清理测试文件
- LOG_INFO "步骤9:清理测试文件"
- rm -f ${TEST_FILE}
- CHECK_RESULT $? 0 0 "清理测试文件失败"
-
- # 步骤10:如果需要清理,卸载安装的软件包
- if [ ${CLEANUP_FLAG} -eq 1 ]; then
- LOG_INFO "步骤10:卸载测试安装的软件包"
- dnf remove -y ${PYTHON_PACKAGE} ${DOCUTILS_PACKAGE}
- CHECK_RESULT $? 0 0 "软件包卸载失败"
- fi
-
- LOG_INFO "测试完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_d.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_d.sh
deleted file mode 100644
index c8e36e45e9e..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_d.sh
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/usr/bin/bash
-
-# Copyright (c) 2024 ISCAS .ALL rights reserved.
-# This program is licensed under Mulan PSL v2.
-# You can use it according to the terms and conditions of the Mulan PSL v2.
-# http://license.coscl.org.cn/MulanPSL2
-# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
-# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
-# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
-# See the Mulan PSL v2 for more details.
-
-# #############################################
-# @Author : honghua
-# @Contact : honghua@iscas.ac.cn
-# @Date : 2025-12-01
-# @License : Mulan PSL v2
-# @Desc : 测试使用-d参数包含日期信息
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
-
- # 检查是否已安装指定软件包
- LOG_INFO "检查是否已安装 python3-myst-nb、mystnb-docutils-xml_d 软件包..."
- rpm -q python3-myst-nb mystnb-docutils-xml_d > /dev/null 2>&1
- if [ $? -eq 0 ]; then
- LOG_INFO "软件包已安装,测试结束后将保持安装状态。"
- INSTALLED=true
- else
- LOG_INFO "软件包未安装,测试结束后将卸载软件包。"
- INSTALLED=false
- fi
-
- # 检查yum源中是否存在软件包
- LOG_INFO "检查yum源中是否存在 python3-myst-nb、mystnb-docutils-xml_d 软件包..."
- dnf list available python3-myst-nb mystnb-docutils-xml_d > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中不存在指定软件包,退出测试。"
- exit 255
- fi
-
- # 如果未安装,则安装软件包
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "开始安装 python3-myst-nb、mystnb-docutils-xml_d 软件包..."
- dnf install -y python3-myst-nb mystnb-docutils-xml_d
- CHECK_RESULT $? 0 0 "安装软件包失败"
- fi
-
- # 测试使用 -d 参数包含日期信息
- LOG_INFO "测试使用 -d 参数包含日期信息..."
- mystnb-docutils-xml_d -d $(date +%Y-%m-%d) > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "-d 参数测试失败"
-
- # 清理环境
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "卸载 python3-myst-nb、mystnb-docutils-xml_d 软件包..."
- dnf remove -y python3-myst-nb mystnb-docutils-xml_d
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- fi
-
- LOG_INFO "测试完成,环境已恢复。"
-
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_date.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_date.sh
deleted file mode 100644
index 9076326c5c4..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_date.sh
+++ /dev/null
@@ -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-03-16
-# @License : Mulan PSL v2
-# @Desc : 测试包含日期信息
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 测试包含日期信息
-
- # 步骤1:检查环境是否已安装所需软件包
- LOG_INFO "步骤1:检查环境是否已安装所需软件包"
- # 检查是否已安装python3-myst-nb, mystnb-docutils, xml_date
- if rpm -q python3-myst-nb mystnb-docutils xml_date >/dev/null 2>&1; then
- LOG_INFO "软件包已安装,标记为已安装状态"
- INSTALLED="true"
- else
- LOG_INFO "软件包未安装,标记为未安装状态"
- INSTALLED="false"
- fi
-
- # 步骤2:检查yum源中是否存在所需软件包
- LOG_INFO "步骤2:检查yum源中是否存在所需软件包"
- # 检查python3-myst-nb
- dnf list available python3-myst-nb >/dev/null 2>&1
- CHECK_RESULT $? 0 0 "yum源中未找到python3-myst-nb软件包"
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中未找到python3-myst-nb软件包"
- exit 255
- fi
-
- # 检查mystnb-docutils
- dnf list available mystnb-docutils >/dev/null 2>&1
- CHECK_RESULT $? 0 0 "yum源中未找到mystnb-docutils软件包"
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中未找到mystnb-docutils软件包"
- exit 255
- fi
-
- # 检查xml_date
- dnf list available xml_date >/dev/null 2>&1
- CHECK_RESULT $? 0 0 "yum源中未找到xml_date软件包"
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中未找到xml_date软件包"
- exit 255
- fi
-
- # 步骤3:如果未安装,则安装软件包
- LOG_INFO "步骤3:如果未安装,则安装软件包"
- if [ "$INSTALLED" = "false" ]; then
- dnf install -y python3-myst-nb mystnb-docutils xml_date
- CHECK_RESULT $? 0 0 "安装软件包失败"
- LOG_INFO "软件包安装成功"
- fi
-
- # 步骤4:测试包含日期信息的命令
- LOG_INFO "步骤4:测试包含日期信息的命令"
- # 检查命令参数是否存在
- # 假设测试命令为xml_date --date,检查--date参数是否存在
- xml_date --help 2>&1 | grep -q "\-\-date"
- if [ $? -ne 0 ]; then
- LOG_ERROR "xml_date命令不支持--date参数"
- exit 255
- fi
-
- # 执行包含日期信息的测试命令
- xml_date --date "2023-10-01"
- CHECK_RESULT $? 0 0 "执行xml_date --date命令失败"
-
- # 步骤5:验证日期信息处理功能
- LOG_INFO "步骤5:验证日期信息处理功能"
- # 测试日期格式转换
- TEST_DATE="2023-10-01"
- EXPECTED_OUTPUT="2023-10-01"
- ACTUAL_OUTPUT=$(xml_date --date "$TEST_DATE" 2>&1)
- if echo "$ACTUAL_OUTPUT" | grep -q "$EXPECTED_OUTPUT"; then
- LOG_INFO "日期信息处理功能正常"
- else
- LOG_ERROR "日期信息处理功能异常"
- exit 1
- fi
-
- # 步骤6:清理环境
- LOG_INFO "步骤6:清理环境"
- if [ "$INSTALLED" = "false" ]; then
- # 如果测试前未安装,则卸载安装的软件包
- dnf remove -y python3-myst-nb mystnb-docutils xml_date
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- LOG_INFO "软件包卸载成功,环境已恢复"
- else
- LOG_INFO "测试前已安装软件包,保持安装状态"
- fi
-
- LOG_INFO "测试完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_debug.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_debug.sh
deleted file mode 100644
index f89d2301f74..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_debug.sh
+++ /dev/null
@@ -1,120 +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-16
-# @License : Mulan PSL v2
-# @Desc : 测试启用调试级别的系统消息和诊断
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 定义日志函数(根据要求无需重新定义,但这里为了脚本完整性提供默认实现)
- LOG_INFO() {
- echo "[INFO] $*"
- }
-
- LOG_ERROR() {
- echo "[ERROR] $*" >&2
- }
-
- # 定义检查结果函数(根据要求无需重新定义,但这里为了脚本完整性提供默认实现)
- CHECK_RESULT() {
- local actual=$1
- local expect=$2
- local exit_code=$3
- local message=$4
- if [ "$actual" -ne "$expect" ]; then
- LOG_ERROR "$message"
- exit $exit_code
- fi
- }
-
- # 定义SSH_CMD函数(根据要求无需重新定义,但这里为了脚本完整性提供默认实现)
- 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"
- }
-
- # 测试脚本开始
- LOG_INFO "开始测试:测试启用调试级别的系统消息和诊断"
-
- # 步骤1:检查是否已经安装所需软件包
- LOG_INFO "步骤1:检查是否已经安装所需软件包"
- installed=false
- if dnf list installed python3-myst-nb &> /dev/null; then
- LOG_INFO "python3-myst-nb 已安装"
- installed=true
- else
- LOG_INFO "python3-myst-nb 未安装"
- fi
-
- if dnf list installed mystnb-docutils-xml_debug &> /dev/null; then
- LOG_INFO "mystnb-docutils-xml_debug 已安装"
- installed=true
- else
- LOG_INFO "mystnb-docutils-xml_debug 未安装"
- fi
-
- # 步骤2:检查yum源中是否有需要安装的软件包
- LOG_INFO "步骤2:检查yum源中是否有需要安装的软件包"
- if ! dnf list available python3-myst-nb &> /dev/null; then
- LOG_ERROR "yum源中未找到 python3-myst-nb 软件包"
- exit 255
- fi
-
- if ! dnf list available mystnb-docutils-xml_debug &> /dev/null; then
- LOG_ERROR "yum源中未找到 mystnb-docutils-xml_debug 软件包"
- exit 255
- fi
-
- # 步骤3:如果未安装,则安装软件包
- if [ "$installed" = false ]; then
- LOG_INFO "步骤3:安装所需软件包"
- dnf install -y python3-myst-nb mystnb-docutils-xml_debug
- CHECK_RESULT $? 0 0 "安装软件包失败"
- else
- LOG_INFO "步骤3:软件包已安装,跳过安装步骤"
- fi
-
- # 步骤4:测试启用调试级别的系统消息和诊断
- LOG_INFO "步骤4:测试启用调试级别的系统消息和诊断"
- # 假设测试命令为:mystnb-docutils-xml_debug --debug
- # 检查参数是否存在
- if ! mystnb-docutils-xml_debug --help 2>&1 | grep -q "\-\-debug"; then
- LOG_ERROR "参数 --debug 不存在或不支持"
- exit 255
- fi
-
- # 执行测试命令
- mystnb-docutils-xml_debug --debug
- CHECK_RESULT $? 0 0 "启用调试级别的系统消息和诊断失败"
-
- # 步骤5:清理环境
- LOG_INFO "步骤5:清理环境"
- if [ "$installed" = false ]; then
- LOG_INFO "卸载测试安装的软件包"
- dnf remove -y python3-myst-nb mystnb-docutils-xml_debug
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- else
- LOG_INFO "测试前已安装软件包,保持安装状态"
- fi
-
- LOG_INFO "测试完成:测试启用调试级别的系统消息和诊断"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_g.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_g.sh
deleted file mode 100644
index 8b3b0c55fbf..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_g.sh
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/usr/bin/bash
-
-# Copyright (c) 2024 ISCAS .ALL rights reserved.
-# This program is licensed under Mulan PSL v2.
-# You can use it according to the terms and conditions of the Mulan PSL v2.
-# http://license.coscl.org.cn/MulanPSL2
-# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
-# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
-# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
-# See the Mulan PSL v2 for more details.
-
-# #############################################
-# @Author : honghua
-# @Contact : honghua@iscas.ac.cn
-# @Date : 2025-12-01
-# @License : Mulan PSL v2
-# @Desc : 测试使用-g参数包含生成器信息
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试使用-g参数包含生成器信息"
-
- # 检查环境是否已安装所需软件包
- LOG_INFO "检查环境是否已安装所需软件包"
- if ! dnf list installed python3-myst-nb &>/dev/null || ! dnf list installed mystnb-docutils-xml &>/dev/null; then
- LOG_INFO "环境未安装所需软件包,将进行安装"
- INSTALLED=false
- else
- LOG_INFO "环境已安装所需软件包"
- INSTALLED=true
- fi
-
- # 检查yum源中是否有软件包
- LOG_INFO "检查yum源中是否有python3-myst-nb和mystnb-docutils-xml"
- if ! dnf list available python3-myst-nb &>/dev/null || ! dnf list available mystnb-docutils-xml &>/dev/null; then
- LOG_ERROR "yum源中缺少所需软件包"
- exit 255
- fi
-
- # 如果未安装,则安装软件包
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "正在安装python3-myst-nb和mystnb-docutils-xml"
- dnf install -y python3-myst-nb mystnb-docutils-xml
- CHECK_RESULT $? 0 0 "安装软件包失败"
- fi
-
- # 测试使用-g参数
- LOG_INFO "测试使用-g参数包含生成器信息"
- output=$(python3-myst-nb -g 2>&1)
- if [[ "$output" != *"generator"* ]]; then
- LOG_ERROR "-g参数不支持或未包含生成器信息"
- exit 255
- fi
-
- # 清理环境:如果之前未安装,则卸载软件包
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "清理环境:卸载python3-myst-nb和mystnb-docutils-xml"
- dnf remove -y python3-myst-nb mystnb-docutils-xml
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- fi
-
- LOG_INFO "测试完成,环境已恢复"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_generator.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_generator.sh
deleted file mode 100644
index b37c0466893..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_generator.sh
+++ /dev/null
@@ -1,129 +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-16
-# @License : Mulan PSL v2
-# @Desc : 测试包含生成器信息
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 定义颜色输出(可选,但保留以兼容LOG_INFO/LOG_ERROR)
- LOG_INFO() {
- echo "[INFO] $1"
- }
-
- LOG_ERROR() {
- echo "[ERROR] $1"
- }
-
- # 定义检查函数(兼容现有测试框架)
- CHECK_RESULT() {
- local actual=$1
- local expect=$2
- local mode=$3
- local message=$4
- if [ $mode -eq 0 ]; then
- if [ $actual -ne $expect ]; then
- LOG_ERROR "$message"
- exit 1
- fi
- elif [ $mode -eq 1 ]; then
- if [ $actual -eq $expect ]; then
- LOG_ERROR "$message"
- exit 1
- fi
- fi
- }
-
- # 定义SSH_CMD函数(兼容现有测试框架)
- SSH_CMD() {
- local cmd=$1
- local node_ip=$2
- local node_pass=$3
- local node_user=${4:-root}
- sshpass -p "$node_pass" ssh -o StrictHostKeyChecking=no "$node_user@$node_ip" "$cmd"
- }
-
- # 定义软件包列表
- PACKAGES="python3-myst-nb mystnb-docutils-xml_generator"
-
- # 步骤1:检查软件包是否在yum源中
- LOG_INFO "步骤1:检查软件包是否在yum源中"
- for pkg in $PACKAGES; do
- dnf list available "$pkg" &>/dev/null
- if [ $? -ne 0 ]; then
- LOG_ERROR "软件包 $pkg 不在yum源中"
- exit 255
- fi
- done
-
- # 步骤2:检查是否已安装软件包
- LOG_INFO "步骤2:检查是否已安装软件包"
- installed=false
- for pkg in $PACKAGES; do
- rpm -q "$pkg" &>/dev/null
- if [ $? -eq 0 ]; then
- installed=true
- break
- fi
- done
-
- # 步骤3:如果未安装,则安装软件包
- if [ "$installed" = false ]; then
- LOG_INFO "步骤3:安装软件包"
- dnf install -y $PACKAGES
- CHECK_RESULT $? 0 0 "安装软件包失败"
- # 标记为测试安装,需要在脚本结束前卸载
- test_install=true
- else
- LOG_INFO "步骤3:软件包已安装,跳过安装步骤"
- test_install=false
- fi
-
- # 步骤4:测试生成器信息
- LOG_INFO "步骤4:测试生成器信息"
- # 假设生成器信息通过命令 "mystnb-docutils-xml-generator --version" 获取
- command="mystnb-docutils-xml-generator --version"
- # 检查命令是否存在
- which mystnb-docutils-xml-generator &>/dev/null
- if [ $? -ne 0 ]; then
- LOG_ERROR "命令 mystnb-docutils-xml-generator 不存在"
- exit 255
- fi
- # 检查参数是否支持
- $command &>/dev/null
- if [ $? -eq 255 ]; then
- LOG_ERROR "命令参数不支持"
- exit 255
- fi
- # 执行命令
- $command
- CHECK_RESULT $? 0 0 "执行生成器信息命令失败"
-
- # 步骤5:清理环境
- LOG_INFO "步骤5:清理环境"
- if [ "$test_install" = true ]; then
- LOG_INFO "卸载测试安装的软件包"
- dnf remove -y $PACKAGES
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- else
- LOG_INFO "未安装软件包,无需卸载"
- fi
-
- LOG_INFO "测试完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_halt.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_halt.sh
deleted file mode 100644
index 785290a8240..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_halt.sh
+++ /dev/null
@@ -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-16
-# @License : Mulan PSL v2
-# @Desc : 测试设置在指定级别及以上时停止执行
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 初始化变量
- TEST_PACKAGES="python3-myst-nb mystnb-docutils-xml_halt"
- EXIT_CODE=0
- CLEANUP_FLAG=0
-
- # 步骤1:检查测试所需的软件包是否在yum源中
- LOG_INFO "步骤1:检查yum源中是否存在软件包:$TEST_PACKAGES"
- for pkg in $TEST_PACKAGES; do
- dnf list available "$pkg" &>/dev/null
- if [ $? -ne 0 ]; then
- LOG_ERROR "软件包 $pkg 在yum源中不存在"
- exit 255
- fi
- done
-
- # 步骤2:检查测试环境是否已安装软件包
- LOG_INFO "步骤2:检查测试环境是否已安装软件包"
- INSTALLED=0
- for pkg in $TEST_PACKAGES; do
- rpm -q "$pkg" &>/dev/null
- if [ $? -eq 0 ]; then
- INSTALLED=1
- break
- fi
- done
-
- # 步骤3:如果未安装,则安装软件包
- if [ $INSTALLED -eq 0 ]; then
- LOG_INFO "步骤3:安装测试软件包"
- dnf install -y $TEST_PACKAGES
- CHECK_RESULT $? 0 0 "安装软件包失败"
- CLEANUP_FLAG=1
- else
- LOG_INFO "步骤3:软件包已安装,跳过安装步骤"
- fi
-
- # 步骤4:测试设置在指定级别及以上时停止执行
- LOG_INFO "步骤4:测试设置在指定级别及以上时停止执行"
- # 假设测试命令为test_command,参数为--level
- TEST_COMMAND="test_command"
- TEST_PARAM="--level"
-
- # 检查命令是否存在
- which "$TEST_COMMAND" &>/dev/null
- if [ $? -ne 0 ]; then
- LOG_ERROR "命令 $TEST_COMMAND 不存在"
- exit 255
- fi
-
- # 检查参数是否支持
- "$TEST_COMMAND" --help 2>&1 | grep -q "$TEST_PARAM"
- if [ $? -ne 0 ]; then
- LOG_ERROR "命令 $TEST_COMMAND 不支持参数 $TEST_PARAM"
- exit 255
- fi
-
- # 执行测试命令
- "$TEST_COMMAND" "$TEST_PARAM" high
- CHECK_RESULT $? 0 0 "测试命令执行失败"
- EXIT_CODE=$?
-
- # 步骤5:清理环境
- LOG_INFO "步骤5:清理测试环境"
- if [ $CLEANUP_FLAG -eq 1 ]; then
- dnf remove -y $TEST_PACKAGES
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- else
- LOG_INFO "测试前已安装软件包,保持安装状态"
- fi
-
- # 退出脚本
- exit $EXIT_CODE
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_help.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_help.sh
deleted file mode 100644
index 45d241360af..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_help.sh
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/bash
-
-# Copyright (c) 2024 ISCAS .ALL rights reserved.
-# This program is licensed under Mulan PSL v2.
-# You can use it according to the terms and conditions of the Mulan PSL v2.
-# http://license.coscl.org.cn/MulanPSL2
-# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
-# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
-# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
-# See the Mulan PSL v2 for more details.
-
-# #############################################
-# @Author : honghua
-# @Contact : honghua@iscas.ac.cn
-# @Date : 2026-03-16
-# @License : Mulan PSL v2
-# @Desc : 测试显示帮助信息
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 判断是否已经安装python3-myst-nb、mystnb-docutils-xml软件包
- LOG_INFO "检查是否已安装python3-myst-nb和mystnb-docutils-xml软件包"
- dnf list installed python3-myst-nb mystnb-docutils-xml > /dev/null 2>&1
- if [ $? -eq 0 ]; then
- LOG_INFO "软件包已安装,测试结束后保持安装状态"
- ALREADY_INSTALLED=1
- else
- LOG_INFO "软件包未安装,将在测试过程中安装"
- ALREADY_INSTALLED=0
- fi
-
- # 检查yum源中是否存在python3-myst-nb软件包
- LOG_INFO "检查yum源中是否存在python3-myst-nb软件包"
- dnf list available python3-myst-nb > /dev/null 2>&1
- CHECK_RESULT $? 0 255 "yum源中不存在python3-myst-nb软件包"
-
- # 检查yum源中是否存在mystnb-docutils-xml软件包
- LOG_INFO "检查yum源中是否存在mystnb-docutils-xml软件包"
- dnf list available mystnb-docutils-xml > /dev/null 2>&1
- CHECK_RESULT $? 0 255 "yum源中不存在mystnb-docutils-xml软件包"
-
- # 如果未安装,则安装软件包
- if [ $ALREADY_INSTALLED -eq 0 ]; then
- LOG_INFO "安装python3-myst-nb和mystnb-docutils-xml软件包"
- dnf install -y python3-myst-nb mystnb-docutils-xml
- CHECK_RESULT $? 0 0 "安装python3-myst-nb和mystnb-docutils-xml软件包失败"
- fi
-
- # 测试显示帮助信息
- LOG_INFO "测试显示帮助信息"
- python3 -m myst_nb --help > /dev/null 2>&1
- CHECK_RESULT $? 0 255 "python3 -m myst_nb --help 参数不存在或不支持"
-
- # 清理环境,如果测试前未安装则卸载软件包
- if [ $ALREADY_INSTALLED -eq 0 ]; then
- LOG_INFO "卸载python3-myst-nb和mystnb-docutils-xml软件包"
- dnf remove -y python3-myst-nb mystnb-docutils-xml
- CHECK_RESULT $? 0 0 "卸载python3-myst-nb和mystnb-docutils-xml软件包失败"
- fi
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_indents.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_indents.sh
deleted file mode 100644
index 09a635939f3..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_indents.sh
+++ /dev/null
@@ -1,95 +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-16
-# @License : Mulan PSL v2
-# @Desc : 测试生成带缩进和换行符的XML
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 检查环境是否已安装相关软件包
- LOG_INFO "检查环境是否已安装python3-myst-nb, mystnb-docutils-xml-indents软件包"
- rpm -q python3-myst-nb mystnb-docutils-xml-indents > /dev/null 2>&1
- if [ $? -eq 0 ]; then
- LOG_INFO "软件包已安装,标记为已安装状态"
- INSTALLED=1
- else
- LOG_INFO "软件包未安装,标记为未安装状态"
- INSTALLED=0
- fi
-
- # 检查yum源中是否存在所需软件包
- LOG_INFO "检查yum源中是否存在python3-myst-nb, mystnb-docutils-xml-indents软件包"
- dnf list available python3-myst-nb mystnb-docutils-xml-indents > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中不存在所需软件包"
- exit 255
- fi
-
- # 如果未安装,则安装软件包
- if [ $INSTALLED -eq 0 ]; then
- LOG_INFO "开始安装python3-myst-nb, mystnb-docutils-xml-indents软件包"
- dnf install -y python3-myst-nb mystnb-docutils-xml-indents
- CHECK_RESULT $? 0 0 "安装软件包失败"
- LOG_INFO "软件包安装成功"
- fi
-
- # 测试生成带缩进和换行符的XML
- LOG_INFO "测试生成带缩进和换行符的XML"
- # 创建一个简单的测试文件
- cat > test_input.md << "EOF"
- # Test Document
-
- This is a test document for generating XML with indentation and newlines.
- EOF
-
- # 使用mystnb-docutils-xml-indents命令生成XML
- LOG_INFO "使用mystnb-docutils-xml-indents命令生成XML"
- mystnb-docutils-xml-indents test_input.md test_output.xml --indent 4
- CHECK_RESULT $? 0 0 "生成XML失败"
-
- # 检查生成的XML文件是否存在
- LOG_INFO "检查生成的XML文件是否存在"
- [ -f test_output.xml ]
- CHECK_RESULT $? 0 0 "生成的XML文件不存在"
-
- # 检查XML文件内容是否包含缩进和换行符
- LOG_INFO "检查XML文件内容是否包含缩进和换行符"
- grep -q "^[[:space:]]*<" test_output.xml
- CHECK_RESULT $? 0 0 "XML文件内容不包含缩进"
- grep -q $"\n" test_output.xml
- CHECK_RESULT $? 0 0 "XML文件内容不包含换行符"
-
- LOG_INFO "测试生成带缩进和换行符的XML成功"
-
- # 清理测试文件
- LOG_INFO "清理测试文件"
- rm -f test_input.md test_output.xml
-
- # 如果脚本开始时未安装软件包,则在结束时卸载
- if [ $INSTALLED -eq 0 ]; then
- LOG_INFO "卸载测试安装的软件包"
- dnf remove -y python3-myst-nb mystnb-docutils-xml-indents
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- LOG_INFO "软件包卸载成功"
- else
- LOG_INFO "保持软件包安装状态"
- fi
-
- LOG_INFO "测试脚本执行完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_language.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_language.sh
deleted file mode 100644
index bfe57164bb4..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_language.sh
+++ /dev/null
@@ -1,95 +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-16
-# @License : Mulan PSL v2
-# @Desc : 测试指定文档语言
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 定义变量
- PKG_LIST="python3-myst-nb mystnb-docutils-xml_language"
- TEST_CMD="python3 -m myst_nb"
- TEST_ARGS="--help"
- EXPECTED_OUTPUT="myst_nb"
-
- # 步骤1: 检查yum源中是否存在所需软件包
- LOG_INFO "步骤1: 检查yum源中是否存在所需软件包"
- for pkg in $PKG_LIST; do
- dnf list available "$pkg" &>/dev/null
- if [ $? -ne 0 ]; then
- LOG_ERROR "软件包 $pkg 在yum源中不存在"
- exit 255
- fi
- done
- LOG_INFO "所有所需软件包在yum源中均存在"
-
- # 步骤2: 检查当前环境是否已安装所需软件包
- LOG_INFO "步骤2: 检查当前环境是否已安装所需软件包"
- INSTALLED=0
- for pkg in $PKG_LIST; do
- rpm -q "$pkg" &>/dev/null
- if [ $? -eq 0 ]; then
- INSTALLED=1
- LOG_INFO "软件包 $pkg 已安装"
- else
- LOG_INFO "软件包 $pkg 未安装"
- fi
- done
-
- # 步骤3: 如果未安装,则安装软件包
- if [ $INSTALLED -eq 0 ]; then
- LOG_INFO "步骤3: 安装所需软件包"
- dnf install -y $PKG_LIST
- CHECK_RESULT $? 0 0 "安装软件包失败"
- LOG_INFO "软件包安装成功"
- else
- LOG_INFO "步骤3: 环境已安装所需软件包,跳过安装步骤"
- fi
-
- # 步骤4: 检查命令参数是否存在或不支持
- LOG_INFO "步骤4: 检查命令参数是否存在或不支持"
- $TEST_CMD $TEST_ARGS 2>&1 | grep -q "error:"
- if [ $? -eq 0 ]; then
- LOG_ERROR "命令参数不存在或不支持"
- exit 255
- fi
-
- # 步骤5: 执行测试命令
- LOG_INFO "步骤5: 执行测试命令"
- OUTPUT=$($TEST_CMD $TEST_ARGS 2>&1)
- CHECK_RESULT $? 0 0 "执行测试命令失败"
-
- # 步骤6: 检查输出是否符合预期
- LOG_INFO "步骤6: 检查输出是否符合预期"
- echo "$OUTPUT" | grep -q "$EXPECTED_OUTPUT"
- CHECK_RESULT $? 0 0 "输出不符合预期"
-
- # 步骤7: 清理环境
- LOG_INFO "步骤7: 清理环境"
- if [ $INSTALLED -eq 0 ]; then
- LOG_INFO "卸载测试安装的软件包"
- dnf remove -y $PKG_LIST
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- LOG_INFO "软件包卸载成功"
- else
- LOG_INFO "测试前已安装软件包,保持安装状态"
- fi
-
- LOG_INFO "测试脚本执行完毕"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_newlines.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_newlines.sh
deleted file mode 100644
index 609cfa4e4ff..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_newlines.sh
+++ /dev/null
@@ -1,95 +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-16
-# @License : Mulan PSL v2
-# @Desc : 测试生成带换行符的XML
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试:测试生成带换行符的XML"
-
- # 定义软件包名称
- PACKAGES="python3-myst-nb mystnb-docutils-xml"
-
- # 检查yum源中是否有软件包
- for pkg in $PACKAGES; do
- LOG_INFO "检查yum源中是否有软件包: $pkg"
- if ! dnf list available "$pkg" &>/dev/null; then
- LOG_ERROR "yum源中没有找到软件包: $pkg"
- exit 255
- fi
- done
-
- # 检查是否已安装
- LOG_INFO "检查是否已安装软件包"
- if rpm -q $PACKAGES &>/dev/null; then
- LOG_INFO "软件包已安装,保持安装状态"
- INSTALLED=true
- else
- LOG_INFO "软件包未安装,开始安装"
- INSTALLED=false
- dnf install -y $PACKAGES
- CHECK_RESULT $? 0 0 "安装软件包失败"
- fi
-
- # 测试生成带换行符的XML
- LOG_INFO "测试生成带换行符的XML"
- TEST_OUTPUT=$(python3 -m myst_nb.parser --help 2>&1)
- if echo "$TEST_OUTPUT" | grep -q "xml"; then
- LOG_INFO "命令支持XML参数"
- else
- LOG_ERROR "命令不支持XML参数"
- exit 255
- fi
-
- # 执行测试命令
- LOG_INFO "执行生成XML的命令"
- python3 -m myst_nb.parser --xml test_output.xml << "EOF"
- # 测试内容
- 测试段落1
-
- 测试段落2
- EOF
- CHECK_RESULT $? 0 0 "生成XML失败"
-
- # 检查生成的XML是否包含换行符
- LOG_INFO "检查生成的XML是否包含换行符"
- if grep -q "
" test_output.xml || grep -q "
- " test_output.xml; then
- LOG_INFO "XML中包含换行符"
- else
- LOG_ERROR "XML中不包含换行符"
- CHECK_RESULT 1 0 0 "XML中不包含换行符"
- fi
-
- # 清理测试文件
- LOG_INFO "清理测试文件"
- rm -f test_output.xml
-
- # 环境恢复
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "卸载测试安装的软件包"
- dnf remove -y $PACKAGES
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- else
- LOG_INFO "保持软件包安装状态"
- fi
-
- LOG_INFO "测试完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_no_debug.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_no_debug.sh
deleted file mode 100644
index e238880cf14..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_no_debug.sh
+++ /dev/null
@@ -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-03-16
-# @License : Mulan PSL v2
-# @Desc : 测试禁用调试输出
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试:测试禁用调试输出"
- LOG_INFO "步骤1: 检查环境中是否已安装python3-myst-nb、mystnb-docutils-xml软件包"
-
- # 检查软件包是否已安装
- if dnf list installed python3-myst-nb &>/dev/null && dnf list installed mystnb-docutils-xml &>/dev/null; then
- LOG_INFO "软件包已安装,标记为已安装状态"
- INSTALLED=1
- else
- LOG_INFO "软件包未安装,标记为未安装状态"
- INSTALLED=0
- fi
-
- LOG_INFO "步骤2: 检查yum源中是否存在python3-myst-nb、mystnb-docutils-xml软件包"
- if ! dnf list available python3-myst-nb &>/dev/null; then
- LOG_ERROR "yum源中不存在python3-myst-nb软件包"
- exit 255
- fi
- if ! dnf list available mystnb-docutils-xml &>/dev/null; then
- LOG_ERROR "yum源中不存在mystnb-docutils-xml软件包"
- exit 255
- fi
-
- LOG_INFO "步骤3: 如果未安装,则安装软件包"
- if [ $INSTALLED -eq 0 ]; then
- dnf install -y python3-myst-nb mystnb-docutils-xml
- CHECK_RESULT $? 0 0 "安装软件包失败"
- fi
-
- LOG_INFO "步骤4: 测试禁用调试输出功能"
- LOG_INFO "执行命令:myst nbconvert --to xml --debug 检查是否支持--debug参数"
- if myst nbconvert --help 2>&1 | grep -q -- "--debug"; then
- LOG_INFO "--debug参数存在,继续测试"
- else
- LOG_ERROR "--debug参数不存在或不支持"
- exit 255
- fi
-
- LOG_INFO "步骤5: 执行myst nbconvert --to xml --debug,预期应输出调试信息"
- myst nbconvert --to xml --debug 2>&1 | grep -q "debug"
- CHECK_RESULT $? 0 0 "调试输出未按预期显示"
-
- LOG_INFO "步骤6: 执行myst nbconvert --to xml --no-debug,预期不应输出调试信息"
- myst nbconvert --to xml --no-debug 2>&1 | grep -q "debug"
- CHECK_RESULT $? 1 0 "禁用调试输出功能未生效"
-
- LOG_INFO "步骤7: 清理环境,恢复到之前的状态"
- if [ $INSTALLED -eq 0 ]; then
- LOG_INFO "卸载测试安装的软件包"
- dnf remove -y python3-myst-nb mystnb-docutils-xml
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- else
- LOG_INFO "保持已安装状态,不进行卸载"
- fi
-
- LOG_INFO "测试完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_no_raw.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_no_raw.sh
deleted file mode 100644
index befb1232a00..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_no_raw.sh
+++ /dev/null
@@ -1,127 +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-16
-# @License : Mulan PSL v2
-# @Desc : 测试禁用raw指令
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 定义颜色输出函数(如果LOG_INFO/LOG_ERROR未定义则定义)
- if ! type LOG_INFO &>/dev/null; then
- LOG_INFO() {
- echo -e "\033[32m[INFO]\033[0m $*"
- }
- fi
-
- if ! type LOG_ERROR &>/dev/null; then
- LOG_ERROR() {
- echo -e "\033[31m[ERROR]\033[0m $*"
- }
- fi
-
- # 定义需要测试的软件包列表
- PACKAGES=("python3-myst-nb" "mystnb-docutils-xml")
-
- # 步骤1: 检查环境是否已安装指定软件包
- LOG_INFO "步骤1: 检查环境是否已安装指定软件包"
- installed_packages=()
- for pkg in "${PACKAGES[@]}"; do
- if rpm -q "$pkg" &>/dev/null; then
- installed_packages+=("$pkg")
- fi
- done
-
- if [ ${#installed_packages[@]} -eq ${#PACKAGES[@]} ]; then
- LOG_INFO "所有软件包已安装,测试结束后将保持安装状态"
- already_installed=true
- else
- LOG_INFO "部分或全部软件包未安装,测试结束后将卸载安装的软件包"
- already_installed=false
- fi
-
- # 步骤2: 检查yum源中是否有需要安装的软件包
- LOG_INFO "步骤2: 检查yum源中是否有需要安装的软件包"
- for pkg in "${PACKAGES[@]}"; do
- if ! dnf list available "$pkg" &>/dev/null; then
- LOG_ERROR "软件包 $pkg 在yum源中不存在"
- exit 255
- fi
- done
-
- # 步骤3: 安装软件包(如果未安装)
- LOG_INFO "步骤3: 安装软件包"
- if [ "$already_installed" = false ]; then
- dnf install -y "${PACKAGES[@]}"
- CHECK_RESULT $? 0 0 "安装软件包失败"
- fi
-
- # 步骤4: 测试禁用raw指令
- LOG_INFO "步骤4: 测试禁用raw指令"
- # 检查myst命令是否存在并支持--disable-raw参数
- if ! command -v myst &>/dev/null; then
- LOG_ERROR "myst命令不存在"
- exit 255
- fi
-
- # 测试--disable-raw参数是否存在
- if ! myst --help 2>&1 | grep -q "disable-raw"; then
- LOG_ERROR "myst命令不支持--disable-raw参数"
- exit 255
- fi
-
- # 创建测试用的临时文件
- TEST_FILE=$(mktemp /tmp/test_myst_XXXXXX.md)
- cat > "$TEST_FILE" << "EOF"
- # Test Document
-
- {raw}
- This is raw content
-
-
- Some normal content.
- EOF
-
- # 使用--disable-raw参数执行myst命令
- myst --disable-raw "$TEST_FILE" -o "${TEST_FILE}.html" 2>&1
- CHECK_RESULT $? 0 0 "执行myst命令失败"
-
- # 检查生成的HTML中是否不包含raw内容
- if grep -q "This is raw content" "${TEST_FILE}.html"; then
- LOG_ERROR "禁用raw指令失败,raw内容仍然存在"
- rm -f "$TEST_FILE" "${TEST_FILE}.html"
- exit 1
- else
- LOG_INFO "禁用raw指令成功,raw内容已被过滤"
- fi
-
- # 清理临时文件
- rm -f "$TEST_FILE" "${TEST_FILE}.html"
-
- # 步骤5: 清理环境(如果测试前未安装则卸载软件包)
- LOG_INFO "步骤5: 清理环境"
- if [ "$already_installed" = false ]; then
- dnf remove -y "${PACKAGES[@]}"
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- LOG_INFO "已卸载测试安装的软件包"
- else
- LOG_INFO "保持原有软件包安装状态"
- fi
-
- LOG_INFO "测试完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_output.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_output.sh
deleted file mode 100644
index 8657ac55d26..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_output.sh
+++ /dev/null
@@ -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 : 2025-12-01
-# @License : Mulan PSL v2
-# @Desc : 测试使用--output参数指定输出文件
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
-
- # 检查是否已经安装了所需的软件包
- LOG_INFO "检查是否已安装测试所需的软件包"
- if ! dnf list installed python3-myst-nb &>/dev/null || ! dnf list installed mystnb-docutils &>/dev/null; then
- LOG_INFO "环境未安装,准备安装软件包"
- # 检查yum源中是否有软件包
- if ! dnf list available python3-myst-nb &>/dev/null || ! dnf list available mystnb-docutils &>/dev/null; then
- LOG_ERROR "yum源中缺少所需的软件包"
- exit 255
- fi
- # 安装软件包
- dnf install -y python3-myst-nb mystnb-docutils
- CHECK_RESULT $? 0 0 "安装软件包失败"
- # 标记需要卸载
- NEED_CLEANUP=1
- else
- LOG_INFO "环境已安装,无需重复安装"
- fi
-
- # 测试使用--output参数指定输出文件
- LOG_INFO "测试使用--output参数指定输出文件"
- OUTPUT_FILE="/tmp/myst_output.xml"
- mystnb-docutils --output "$OUTPUT_FILE" &>/dev/null
-
- # 检查命令是否支持--output参数
- if [ $? -eq 255 ]; then
- LOG_ERROR "命令不支持--output参数"
- exit 255
- fi
-
- # 检查输出文件是否存在
- CHECK_RESULT $? 0 0 "生成输出文件失败"
- if [ -f "$OUTPUT_FILE" ]; then
- LOG_INFO "输出文件生成成功: $OUTPUT_FILE"
- else
- LOG_ERROR "输出文件未生成"
- exit 1
- fi
-
- # 清理环境
- if [ "$NEED_CLEANUP" -eq 1 ]; then
- LOG_INFO "清理测试环境,卸载软件包"
- dnf remove -y python3-myst-nb mystnb-docutils
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- fi
-
- # 删除临时文件(如果存在)
- if [ -f "$OUTPUT_FILE" ]; then
- rm -f "$OUTPUT_FILE"
- fi
-
- LOG_INFO "测试脚本执行完毕,环境已恢复"
- exit 0
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_quiet.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_quiet.sh
deleted file mode 100644
index 67e918f4b0c..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_quiet.sh
+++ /dev/null
@@ -1,99 +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-16
-# @License : Mulan PSL v2
-# @Desc : 测试不报告任何系统消息
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 测试脚本:测试不报告任何系统消息
- # 测试目的:验证指定命令在不报告任何系统消息的情况下能正常工作
-
- # 定义软件包名称
- PACKAGE_NAME="python3-myst-nb_mystnb-docutils-xml"
-
- # 步骤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}"
- IS_INSTALLED=0
- rpm -q ${PACKAGE_NAME} &>/dev/null
- if [ $? -eq 0 ]; then
- LOG_INFO "软件包 ${PACKAGE_NAME} 已安装"
- IS_INSTALLED=1
- else
- LOG_INFO "软件包 ${PACKAGE_NAME} 未安装"
- fi
-
- # 步骤3:如果未安装,则安装软件包
- if [ ${IS_INSTALLED} -eq 0 ]; then
- LOG_INFO "步骤3:安装软件包 ${PACKAGE_NAME}"
- dnf install -y ${PACKAGE_NAME}
- CHECK_RESULT $? 0 0 "安装软件包 ${PACKAGE_NAME} 失败"
- fi
-
- # 步骤4:验证指定命令的参数支持情况
- LOG_INFO "步骤4:验证指定命令的参数支持情况"
- # 这里假设命令为myst-nb,参数为--quiet,实际应根据软件包具体命令调整
- COMMAND="myst-nb"
- PARAM="--quiet"
- # 检查命令是否存在
- which ${COMMAND} &>/dev/null
- if [ $? -ne 0 ]; then
- LOG_ERROR "命令 ${COMMAND} 不存在"
- exit 255
- fi
- # 检查参数是否支持(这里使用--help查看是否包含quiet参数)
- ${COMMAND} --help 2>&1 | grep -q "${PARAM}"
- if [ $? -ne 0 ]; then
- LOG_ERROR "命令 ${COMMAND} 不支持参数 ${PARAM}"
- exit 255
- fi
-
- # 步骤5:执行测试命令,验证不报告任何系统消息
- LOG_INFO "步骤5:执行测试命令,验证不报告任何系统消息"
- # 执行命令并捕获输出,期望没有任何输出
- OUTPUT=$(${COMMAND} ${PARAM} --version 2>&1)
- if [ -n "${OUTPUT}" ]; then
- LOG_ERROR "命令执行产生了输出,但期望不报告任何系统消息"
- LOG_ERROR "输出内容:${OUTPUT}"
- exit 1
- else
- LOG_INFO "命令执行成功,未报告任何系统消息"
- fi
-
- # 步骤6:清理环境,恢复到之前的状态
- LOG_INFO "步骤6:清理环境,恢复到之前的状态"
- if [ ${IS_INSTALLED} -eq 0 ]; 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 "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_report.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_report.sh
deleted file mode 100644
index 669c5602db9..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_report.sh
+++ /dev/null
@@ -1,87 +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-16
-# @License : Mulan PSL v2
-# @Desc : 测试设置报告系统消息的级别
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试:测试设置报告系统消息的级别"
-
- # 定义需要测试的软件包列表
- PACKAGES="python3-myst-nb mystnb-docutils-xml-report"
-
- # 步骤1: 检查环境是否已安装指定软件包
- LOG_INFO "步骤1: 检查环境是否已安装指定软件包"
- INSTALLED_PACKAGES=""
- for pkg in $PACKAGES; do
- if rpm -q $pkg &>/dev/null; then
- LOG_INFO "软件包 $pkg 已安装"
- INSTALLED_PACKAGES="$INSTALLED_PACKAGES $pkg"
- else
- LOG_INFO "软件包 $pkg 未安装"
- fi
- done
-
- # 步骤2: 检查yum源中是否有需要安装的软件包
- LOG_INFO "步骤2: 检查yum源中是否有需要安装的软件包"
- for pkg in $PACKAGES; do
- if ! dnf list available $pkg &>/dev/null; then
- LOG_ERROR "yum源中未找到软件包 $pkg"
- exit 255
- fi
- done
-
- # 步骤3: 如果环境未安装,则安装软件包
- LOG_INFO "步骤3: 如果环境未安装,则安装软件包"
- if [ -z "$INSTALLED_PACKAGES" ]; then
- LOG_INFO "环境未安装指定软件包,开始安装"
- dnf install -y $PACKAGES
- CHECK_RESULT $? 0 0 "安装软件包失败"
- NEED_CLEANUP=1
- else
- LOG_INFO "环境已安装指定软件包,跳过安装步骤"
- NEED_CLEANUP=0
- fi
-
- # 步骤4: 测试设置报告系统消息的级别
- LOG_INFO "步骤4: 测试设置报告系统消息的级别"
- # 假设测试命令为:mystnb-docutils-xml-report --log-level INFO
- # 检查参数是否存在
- if ! mystnb-docutils-xml-report --help 2>&1 | grep -q "\-\-log-level"; then
- LOG_ERROR "参数 --log-level 不存在或不支持"
- exit 255
- fi
-
- # 执行测试命令
- mystnb-docutils-xml-report --log-level INFO
- CHECK_RESULT $? 0 0 "设置报告系统消息的级别失败"
-
- # 步骤5: 清理环境
- LOG_INFO "步骤5: 清理环境"
- if [ $NEED_CLEANUP -eq 1 ]; then
- LOG_INFO "卸载安装的软件包"
- dnf remove -y $PACKAGES
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- else
- LOG_INFO "环境未安装软件包,无需清理"
- fi
-
- LOG_INFO "测试完成:测试设置报告系统消息的级别"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_s.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_s.sh
deleted file mode 100644
index ad5e1b89c22..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_s.sh
+++ /dev/null
@@ -1,71 +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-01
-# @License : Mulan PSL v2
-# @Desc : 测试使用-s参数包含查看文档源链接
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
-
- LOG_INFO "开始测试:测试使用-s参数包含查看文档源链接"
-
- # 检查是否已安装python3-myst-nb、mystnb-docutils-xml_s
- LOG_INFO "检查环境是否已安装所需软件包"
- if dnf list installed python3-myst-nb &> /dev/null && dnf list installed mystnb-docutils-xml_s &> /dev/null; then
- LOG_INFO "环境已安装所需软件包,无需重新安装"
- INSTALLED=true
- else
- LOG_INFO "环境未安装所需软件包,将进行安装"
- INSTALLED=false
- fi
-
- # 检查yum源中是否有软件包
- LOG_INFO "检查yum源中是否存在python3-myst-nb和mystnb-docutils-xml_s"
- if ! dnf list available python3-myst-nb &> /dev/null || ! dnf list available mystnb-docutils-xml_s &> /dev/null; then
- LOG_ERROR "yum源中缺少所需软件包,退出测试"
- exit 255
- fi
-
- # 安装软件包(如果未安装)
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "开始安装python3-myst-nb和mystnb-docutils-xml_s"
- dnf install -y python3-myst-nb mystnb-docutils-xml_s
- CHECK_RESULT $? 0 0 "安装软件包失败"
- fi
-
- # 测试-s参数是否支持查看文档源链接
- LOG_INFO "测试-s参数是否支持查看文档源链接"
- output=$(mystnb-docutils-xml_s -s 2>&1)
- if [[ "$output" == *"unsupported option"* || "$output" == *"invalid option"* ]]; then
- LOG_ERROR "-s参数不支持或不存在,退出测试"
- exit 255
- else
- CHECK_RESULT $? 0 0 "执行-s参数失败"
- fi
-
- # 清理环境(如果之前未安装)
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "清理环境,卸载安装的软件包"
- dnf remove -y python3-myst-nb mystnb-docutils-xml_s
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- fi
-
- LOG_INFO "测试完成,环境已恢复"
-
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_strict.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_strict.sh
deleted file mode 100644
index fec871d85a3..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_strict.sh
+++ /dev/null
@@ -1,93 +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-16
-# @License : Mulan PSL v2
-# @Desc : 测试遇到任何问题都停止执行
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- set -e
-
- LOG_INFO "开始测试python3-myst-nb、mystnb-docutils-xml_strict软件包功能"
-
- # 检查软件包是否已在yum源中
- LOG_INFO "检查软件包是否在yum源中"
- dnf list available python3-myst-nb > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "python3-myst-nb软件包不在yum源中"
-
- dnf list available mystnb-docutils-xml_strict > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "mystnb-docutils-xml_strict软件包不在yum源中"
-
- # 检查当前环境是否已安装
- LOG_INFO "检查当前环境是否已安装目标软件包"
- if rpm -q python3-myst-nb > /dev/null 2>&1 && rpm -q mystnb-docutils-xml_strict > /dev/null 2>&1; then
- already_installed=true
- LOG_INFO "软件包已安装,测试后将保持安装状态"
- else
- already_installed=false
- LOG_INFO "软件包未安装,将进行安装测试"
- fi
-
- # 如果未安装,则安装软件包
- if [ "$already_installed" = false ]; then
- LOG_INFO "安装python3-myst-nb和mystnb-docutils-xml_strict软件包"
- dnf install -y python3-myst-nb mystnb-docutils-xml_strict
- CHECK_RESULT $? 0 0 "软件包安装失败"
- fi
-
- # 测试软件包功能
- LOG_INFO "测试python3-myst-nb命令"
- python3 -m myst_nb --help > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "python3-myst-nb命令执行失败"
-
- LOG_INFO "测试mystnb-docutils-xml_strict命令"
- mystnb-docutils-xml_strict --help > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "mystnb-docutils-xml_strict命令执行失败"
-
- # 测试带参数的命令
- LOG_INFO "测试python3-myst-nb命令的version参数"
- python3 -m myst_nb --version > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "python3-myst-nb version参数测试失败"
-
- LOG_INFO "测试mystnb-docutils-xml_strict命令的version参数"
- mystnb-docutils-xml_strict --version > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "mystnb-docutils-xml_strict version参数测试失败"
-
- # 测试不存在的参数
- LOG_INFO "测试不存在的参数(预期失败)"
- python3 -m myst_nb --nonexistent-param > /dev/null 2>&1
- if [ $? -eq 255 ]; then
- LOG_INFO "不存在的参数正确处理,退出码为255"
- else
- LOG_ERROR "不存在的参数处理异常"
- exit 255
- fi
-
- # 环境清理
- LOG_INFO "开始环境清理"
- if [ "$already_installed" = false ]; then
- LOG_INFO "卸载测试安装的软件包"
- dnf remove -y python3-myst-nb mystnb-docutils-xml_strict
- CHECK_RESULT $? 0 0 "软件包卸载失败"
- else
- LOG_INFO "保持原有安装状态"
- fi
-
- LOG_INFO "测试完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_t.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_t.sh
deleted file mode 100644
index 37b7671963a..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_t.sh
+++ /dev/null
@@ -1,71 +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-01
-# @License : Mulan PSL v2
-# @Desc : 测试使用-t参数包含时间和日期信息
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试:测试使用-t参数包含时间和日期信息"
-
- # 检查是否已安装python3-myst-nb_mystnb-docutils-xml_t
- LOG_INFO "检查是否已安装python3-myst-nb_mystnb-docutils-xml_t"
- dnf list installed python3-myst-nb_mystnb-docutils-xml_t >/dev/null 2>&1
- if [ $? -eq 0 ]; then
- LOG_INFO "python3-myst-nb_mystnb-docutils-xml_t已安装"
- installed=true
- else
- LOG_INFO "python3-myst-nb_mystnb-docutils-xml_t未安装"
- installed=false
- fi
-
- # 检查yum源中是否有该软件包
- LOG_INFO "检查yum源中是否有python3-myst-nb_mystnb-docutils-xml_t"
- dnf list available python3-myst-nb_mystnb-docutils-xml_t >/dev/null 2>&1
- CHECK_RESULT $? 0 0 "yum源中没有python3-myst-nb_mystnb-docutils-xml_t软件包"
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中没有python3-myst-nb_mystnb-docutils-xml_t软件包"
- exit 255
- fi
-
- # 如果未安装,则安装软件包
- if [ "$installed" = false ]; then
- LOG_INFO "安装python3-myst-nb_mystnb-docutils-xml_t"
- dnf install -y python3-myst-nb_mystnb-docutils-xml_t
- CHECK_RESULT $? 0 0 "安装python3-myst-nb_mystnb-docutils-xml_t失败"
- fi
-
- # 测试使用-t参数包含时间和日期信息
- LOG_INFO "测试使用-t参数包含时间和日期信息"
- command_output=$(python3 -m myst_nb --help | grep -e "-t")
- CHECK_RESULT $? 0 0 "命令不支持-t参数"
- if [ $? -ne 0 ]; then
- LOG_ERROR "命令不支持-t参数或参数不存在"
- exit 255
- fi
-
- # 清理环境
- if [ "$installed" = false ]; then
- LOG_INFO "卸载python3-myst-nb_mystnb-docutils-xml_t"
- dnf remove -y python3-myst-nb_mystnb-docutils-xml_t
- CHECK_RESULT $? 0 0 "卸载python3-myst-nb_mystnb-docutils-xml_t失败"
- fi
-
- LOG_INFO "测试完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_tab_width.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_tab_width.sh
deleted file mode 100644
index 1f199107065..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_tab_width.sh
+++ /dev/null
@@ -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-16
-# @License : Mulan PSL v2
-# @Desc : 测试设置制表符扩展的空格数
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试:测试设置制表符扩展的空格数"
-
- # 定义需要测试的软件包
- PACKAGES="python3-myst-nb mystnb-docutils"
-
- # 检查yum源中是否有指定的软件包
- LOG_INFO "步骤1:检查yum源中是否有指定的软件包"
- for pkg in $PACKAGES; do
- dnf list available "$pkg" &>/dev/null
- CHECK_RESULT $? 0 0 "软件包 $pkg 在yum源中不存在"
- if [ $? -ne 0 ]; then
- LOG_ERROR "软件包 $pkg 在yum源中不存在"
- exit 255
- fi
- done
-
- # 检查环境是否已经安装指定软件包
- LOG_INFO "步骤2:检查环境是否已经安装指定软件包"
- INSTALLED=false
- for pkg in $PACKAGES; do
- if rpm -q "$pkg" &>/dev/null; then
- INSTALLED=true
- LOG_INFO "软件包 $pkg 已安装"
- fi
- done
-
- # 如果未安装,则安装软件包
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "步骤3:安装软件包"
- dnf install -y $PACKAGES
- CHECK_RESULT $? 0 0 "安装软件包失败"
- else
- LOG_INFO "步骤3:软件包已安装,跳过安装步骤"
- fi
-
- # 测试设置制表符扩展的空格数
- LOG_INFO "步骤4:测试设置制表符扩展的空格数"
- # 假设测试命令为:python3 -m myst_nb --xml-tab-width 4
- # 检查参数是否存在或不支持
- python3 -m myst_nb --help 2>&1 | grep -q "\-\-xml-tab-width"
- CHECK_RESULT $? 0 0 "参数 --xml-tab-width 不存在或不支持"
- if [ $? -ne 0 ]; then
- LOG_ERROR "参数 --xml-tab-width 不存在或不支持"
- exit 255
- fi
-
- # 执行测试命令
- python3 -m myst_nb --xml-tab-width 4
- CHECK_RESULT $? 0 0 "设置制表符扩展的空格数失败"
-
- # 环境恢复:如果之前未安装,则卸载软件包
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "步骤5:卸载软件包"
- dnf remove -y $PACKAGES
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- else
- LOG_INFO "步骤5:保持软件包安装状态"
- fi
-
- LOG_INFO "测试完成:测试设置制表符扩展的空格数"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_time.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_time.sh
deleted file mode 100644
index d3dc512217c..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_time.sh
+++ /dev/null
@@ -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-16
-# @License : Mulan PSL v2
-# @Desc : 测试包含时间日期信息
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 判断环境是否已经安装
- LOG_INFO "检查环境是否已安装python3-myst-nb、mystnb-docutils-xml软件包"
- if dnf list installed python3-myst-nb &>/dev/null && dnf list installed mystnb-docutils-xml &>/dev/null; then
- LOG_INFO "环境已安装,标记为已安装状态"
- ALREADY_INSTALLED=1
- else
- LOG_INFO "环境未安装,标记为未安装状态"
- ALREADY_INSTALLED=0
- fi
-
- # 检查yum源中是否有软件包
- LOG_INFO "检查yum源中是否有python3-myst-nb软件包"
- if ! dnf list available python3-myst-nb &>/dev/null; then
- LOG_ERROR "yum源中未找到python3-myst-nb软件包"
- exit 255
- fi
-
- LOG_INFO "检查yum源中是否有mystnb-docutils-xml软件包"
- if ! dnf list available mystnb-docutils-xml &>/dev/null; then
- LOG_ERROR "yum源中未找到mystnb-docutils-xml软件包"
- exit 255
- fi
-
- # 安装软件包(如果未安装)
- if [ $ALREADY_INSTALLED -eq 0 ]; then
- LOG_INFO "开始安装python3-myst-nb软件包"
- dnf install -y python3-myst-nb
- CHECK_RESULT $? 0 0 "安装python3-myst-nb失败"
-
- LOG_INFO "开始安装mystnb-docutils-xml软件包"
- dnf install -y mystnb-docutils-xml
- CHECK_RESULT $? 0 0 "安装mystnb-docutils-xml失败"
- fi
-
- # 测试包含时间日期信息
- LOG_INFO "测试包含时间日期信息"
- # 这里假设有一个命令可以测试时间日期信息,例如使用date命令
- # 如果实际测试命令不同,请替换为实际的测试命令
- TEST_CMD="date"
- LOG_INFO "执行测试命令: $TEST_CMD"
- $TEST_CMD
- CHECK_RESULT $? 0 0 "测试时间日期信息失败"
-
- # 如果需要测试特定参数
- LOG_INFO "测试命令参数支持情况"
- # 假设测试命令有一个--help参数
- if ! $TEST_CMD --help &>/dev/null; then
- LOG_ERROR "测试命令不支持--help参数"
- exit 255
- fi
-
- # 清理环境
- if [ $ALREADY_INSTALLED -eq 0 ]; then
- LOG_INFO "清理环境,卸载安装的软件包"
- dnf remove -y python3-myst-nb mystnb-docutils-xml
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- else
- LOG_INFO "环境已安装,保持安装状态"
- fi
-
- LOG_INFO "测试脚本执行完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_title.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_title.sh
deleted file mode 100644
index 79ac6e0a23b..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_title.sh
+++ /dev/null
@@ -1,58 +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-01
-# @License : Mulan PSL v2
-# @Desc : 测试使用--title参数指定文档标题
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试使用--title参数指定文档标题"
-
- # 检查是否已安装所需软件包
- LOG_INFO "检查是否已安装python3-myst-nb、mystnb-docutils-xml_title"
- if ! dnf list installed python3-myst-nb &> /dev/null || ! dnf list installed mystnb-docutils-xml_title &> /dev/null; then
- LOG_INFO "软件包未安装,准备安装"
- # 检查yum源中是否有该软件包
- if ! dnf list available python3-myst-nb &> /dev/null || ! dnf list available mystnb-docutils-xml_title &> /dev/null; then
- LOG_ERROR "yum源中缺少所需软件包"
- exit 255
- fi
- # 安装软件包
- dnf install -y python3-myst-nb mystnb-docutils-xml_title
- CHECK_RESULT $? 0 0 "安装软件包失败"
- # 标记需要卸载
- NEED_UNINSTALL=1
- else
- LOG_INFO "软件包已安装,无需重新安装"
- fi
-
- # 测试--title参数功能
- LOG_INFO "测试--title参数功能"
- mystnb-docutils-xml_title --title "测试标题" &> /dev/null
- CHECK_RESULT $? 0 0 "--title参数不支持或执行失败"
-
- # 清理环境
- if [ "$NEED_UNINSTALL" -eq 1 ]; then
- LOG_INFO "卸载临时安装的软件包"
- dnf remove -y python3-myst-nb mystnb-docutils-xml_title
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- fi
-
- LOG_INFO "测试完成,环境已恢复"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_traceback.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_traceback.sh
deleted file mode 100644
index a08520b20d6..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_traceback.sh
+++ /dev/null
@@ -1,95 +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-16
-# @License : Mulan PSL v2
-# @Desc : 测试启用停止时的Python回溯
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- set -e
-
- LOG_INFO "开始测试:测试启用停止时的Python回溯"
-
- # 定义需要测试的软件包
- PACKAGES="python3-myst-nb mystnb-docutils-xml traceback"
-
- # 检查软件包是否已在yum源中
- LOG_INFO "检查yum源中是否存在软件包"
- for pkg in $PACKAGES; do
- if ! dnf list available $pkg &>/dev/null; then
- LOG_ERROR "软件包 $pkg 在yum源中不存在"
- exit 255
- fi
- done
-
- # 检查是否已安装
- LOG_INFO "检查软件包是否已安装"
- INSTALLED="true"
- for pkg in $PACKAGES; do
- if ! rpm -q $pkg &>/dev/null; then
- INSTALLED="false"
- break
- fi
- done
-
- # 如果未安装,则安装软件包
- if [ "$INSTALLED" = "false" ]; then
- LOG_INFO "安装软件包"
- dnf install -y $PACKAGES
- CHECK_RESULT $? 0 0 "安装软件包失败"
-
- # 标记为需要清理
- NEED_CLEANUP="true"
- else
- LOG_INFO "软件包已安装,跳过安装步骤"
- NEED_CLEANUP="false"
- fi
-
- # 测试步骤:测试Python回溯功能
- LOG_INFO "测试Python回溯功能"
- python3 -c "
- import traceback
- try:
- raise ValueError("测试异常")
- except ValueError:
- traceback.print_exc()
- " 2>&1 | grep -q "测试异常"
- CHECK_RESULT $? 0 0 "Python回溯功能测试失败"
-
- # 测试步骤:测试myst-nb相关功能
- LOG_INFO "测试myst-nb相关功能"
- python3 -c "import myst_nb; print(myst_nb.__version__)" &>/dev/null
- CHECK_RESULT $? 0 0 "myst-nb导入失败"
-
- # 测试步骤:测试mystnb-docutils-xml相关功能
- LOG_INFO "测试mystnb-docutils-xml相关功能"
- python3 -c "import mystnb_docutils_xml; print(mystnb_docutils_xml.__version__)" &>/dev/null
- CHECK_RESULT $? 0 0 "mystnb-docutils-xml导入失败"
-
- # 清理环境
- if [ "$NEED_CLEANUP" = "true" ]; then
- LOG_INFO "清理环境:卸载安装的软件包"
- dnf remove -y $PACKAGES
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- else
- LOG_INFO "环境未修改,无需清理"
- fi
-
- LOG_INFO "测试完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_verbose.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_verbose.sh
deleted file mode 100644
index 7f01e80fb6c..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_verbose.sh
+++ /dev/null
@@ -1,129 +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-16
-# @License : Mulan PSL v2
-# @Desc : 测试报告所有系统消息
-# ############################################
-
-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 expect=$2
- local mode=$3
- local msg=$4
- if [ $mode -eq 0 ]; then
- if [ $actual -ne $expect ]; then
- LOG_ERROR "$msg"
- exit $actual
- fi
- else
- if [ $actual -eq $expect ]; then
- LOG_ERROR "$msg"
- exit 1
- fi
- fi
- }
-
- # 定义SSH命令函数
- 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"
- }
-
- # 测试脚本开始
- LOG_INFO "开始测试:测试报告所有系统消息"
-
- # 步骤1:检查是否已安装python3-myst-nb、mystnb-docutils-xml软件包
- LOG_INFO "步骤1:检查是否已安装python3-myst-nb、mystnb-docutils-xml软件包"
- if rpm -q python3-myst-nb &>/dev/null && rpm -q mystnb-docutils-xml &>/dev/null; then
- LOG_INFO "软件包已安装,测试结束后将保持安装状态"
- INSTALLED=true
- else
- LOG_INFO "软件包未安装,将在测试过程中安装并在结束后卸载"
- INSTALLED=false
- fi
-
- # 步骤2:检查yum源中是否有python3-myst-nb和mystnb-docutils-xml软件包
- LOG_INFO "步骤2:检查yum源中是否有python3-myst-nb和mystnb-docutils-xml软件包"
- if ! dnf list available python3-myst-nb &>/dev/null; then
- LOG_ERROR "yum源中没有python3-myst-nb软件包"
- exit 255
- fi
- if ! dnf list available mystnb-docutils-xml &>/dev/null; then
- LOG_ERROR "yum源中没有mystnb-docutils-xml软件包"
- exit 255
- fi
-
- # 步骤3:如果未安装,则安装软件包
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "步骤3:安装python3-myst-nb和mystnb-docutils-xml软件包"
- dnf install -y python3-myst-nb mystnb-docutils-xml
- CHECK_RESULT $? 0 0 "安装软件包失败"
- fi
-
- # 步骤4:测试python3-myst-nb命令的verbose参数
- LOG_INFO "步骤4:测试python3-myst-nb命令的verbose参数"
- if ! python3-myst-nb --help | grep -q "verbose"; then
- LOG_ERROR "python3-myst-nb命令不支持verbose参数"
- exit 255
- fi
-
- # 步骤5:执行测试命令
- LOG_INFO "步骤5:执行测试命令:python3-myst-nb --verbose"
- python3-myst-nb --verbose
- CHECK_RESULT $? 0 0 "执行python3-myst-nb --verbose命令失败"
-
- # 步骤6:测试mystnb-docutils-xml命令
- LOG_INFO "步骤6:测试mystnb-docutils-xml命令"
- mystnb-docutils-xml --help
- CHECK_RESULT $? 0 0 "执行mystnb-docutils-xml --help命令失败"
-
- # 步骤7:如果需要,在第二个服务器上执行命令
- LOG_INFO "步骤7:在第二个服务器上执行测试命令"
- if [ -n "$NODE2_IPV4" ] && [ -n "$NODE2_PASSWORD" ] && [ -n "$NODE2_USER" ]; then
- SSH_CMD "python3-myst-nb --version" "$NODE2_IPV4" "$NODE2_PASSWORD" "$NODE2_USER"
- CHECK_RESULT $? 0 0 "在第二个服务器上执行命令失败"
- else
- LOG_INFO "未提供第二个服务器的信息,跳过此步骤"
- fi
-
- # 步骤8:清理环境
- LOG_INFO "步骤8:清理环境"
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "卸载测试过程中安装的软件包"
- dnf remove -y python3-myst-nb mystnb-docutils-xml
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- else
- LOG_INFO "软件包在测试前已安装,保持安装状态"
- fi
-
- LOG_INFO "测试完成:测试报告所有系统消息"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_version.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_version.sh
deleted file mode 100644
index 62227544ebe..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_version.sh
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/usr/bin/bash
-
-# Copyright (c) 2024 ISCAS .ALL rights reserved.
-# This program is licensed under Mulan PSL v2.
-# You can use it according to the terms and conditions of the Mulan PSL v2.
-# http://license.coscl.org.cn/MulanPSL2
-# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
-# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
-# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
-# See the Mulan PSL v2 for more details.
-
-# #############################################
-# @Author : honghua
-# @Contact : honghua@iscas.ac.cn
-# @Date : 2026-03-16
-# @License : Mulan PSL v2
-# @Desc : 测试显示版本信息
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试:测试显示版本信息"
-
- # 检查是否已安装软件包
- LOG_INFO "检查软件包是否已安装"
- if dnf list installed | grep -q "python3-myst-nb"; then
- INSTALLED=true
- LOG_INFO "软件包已安装,测试结束后将保持安装状态"
- else
- INSTALLED=false
- LOG_INFO "软件包未安装,将在测试步骤中安装"
- fi
-
- # 检查yum源中是否有软件包
- LOG_INFO "检查yum源中是否有python3-myst-nb软件包"
- if ! dnf list available | grep -q "python3-myst-nb"; then
- LOG_ERROR "yum源中未找到python3-myst-nb软件包"
- exit 255
- fi
-
- # 如果未安装,则安装软件包
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "安装python3-myst-nb软件包"
- dnf install -y python3-myst-nb
- CHECK_RESULT $? 0 0 "安装python3-myst-nb失败"
- fi
-
- # 测试显示版本信息
- LOG_INFO "测试显示版本信息"
- python3 -m myst_nb --version
- CHECK_RESULT $? 0 0 "显示版本信息失败"
-
- # 如果测试前未安装,则在测试后卸载软件包
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "卸载python3-myst-nb软件包"
- dnf remove -y python3-myst-nb
- CHECK_RESULT $? 0 0 "卸载python3-myst-nb失败"
- LOG_INFO "环境已恢复到测试前状态"
- else
- LOG_INFO "保持软件包安装状态"
- fi
-
- LOG_INFO "测试完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_warnings.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_warnings.sh
deleted file mode 100644
index 4ace9bda2e7..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-docutils-xml_warnings.sh
+++ /dev/null
@@ -1,116 +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-16
-# @License : Mulan PSL v2
-# @Desc : 测试将系统消息输出发送到指定文件
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 测试脚本:测试将系统消息输出发送到指定文件
-
- LOG_INFO "开始测试:测试将系统消息输出发送到指定文件"
-
- # 定义需要安装的软件包列表
- PACKAGES="python3-myst-nb mystnb-docutils-xml_warnings"
-
- # 检查环境是否已安装指定软件包
- LOG_INFO "步骤1:检查环境是否已安装指定软件包"
- installed_packages=""
- for pkg in $PACKAGES; do
- if dnf list installed "$pkg" &>/dev/null; then
- installed_packages="$installed_packages $pkg"
- fi
- done
-
- if [ -n "$installed_packages" ]; then
- LOG_INFO "以下软件包已安装:$installed_packages"
- already_installed=true
- else
- LOG_INFO "未安装指定软件包,将在测试过程中安装"
- already_installed=false
- fi
-
- # 检查yum源中是否有需要安装的软件包
- LOG_INFO "步骤2:检查yum源中是否有需要安装的软件包"
- for pkg in $PACKAGES; do
- if ! dnf list available "$pkg" &>/dev/null; then
- LOG_ERROR "yum源中未找到软件包:$pkg"
- exit 255
- fi
- done
-
- # 如果环境未安装,则安装软件包
- if [ "$already_installed" = false ]; then
- LOG_INFO "步骤3:安装测试所需的软件包"
- dnf install -y $PACKAGES
- CHECK_RESULT $? 0 0 "安装软件包失败"
- fi
-
- # 创建测试输出文件
- TEST_OUTPUT_FILE="/tmp/test_system_message_output.txt"
- LOG_INFO "步骤4:创建测试输出文件:$TEST_OUTPUT_FILE"
-
- # 测试将系统消息输出发送到指定文件
- LOG_INFO "步骤5:测试将系统消息输出发送到指定文件"
- # 这里假设测试命令是mystnb-docutils-xml_warnings命令,实际命令可能需要根据实际情况调整
- TEST_COMMAND="mystnb-docutils-xml_warnings --help"
-
- # 检查命令参数是否存在
- if ! $TEST_COMMAND &>/dev/null; then
- LOG_ERROR "命令参数不存在或不支持:$TEST_COMMAND"
- exit 255
- fi
-
- # 执行命令并将输出重定向到文件
- $TEST_COMMAND > "$TEST_OUTPUT_FILE" 2>&1
- CHECK_RESULT $? 0 0 "执行命令失败"
-
- # 验证输出文件是否创建成功且非空
- LOG_INFO "步骤6:验证输出文件是否创建成功"
- if [ -f "$TEST_OUTPUT_FILE" ] && [ -s "$TEST_OUTPUT_FILE" ]; then
- LOG_INFO "输出文件创建成功,内容非空"
- # 检查文件内容是否包含预期的输出(这里以包含"usage"或"help"为例)
- if grep -q -i "usage\|help" "$TEST_OUTPUT_FILE"; then
- LOG_INFO "输出文件内容包含预期的系统消息"
- CHECK_RESULT $? 0 0 "输出文件内容不符合预期"
- else
- LOG_ERROR "输出文件内容不包含预期的系统消息"
- CHECK_RESULT $? 1 0 "输出文件内容不符合预期"
- fi
- else
- LOG_ERROR "输出文件创建失败或内容为空"
- CHECK_RESULT $? 1 0 "输出文件创建失败"
- fi
-
- # 清理测试文件
- LOG_INFO "步骤7:清理测试文件"
- rm -f "$TEST_OUTPUT_FILE"
- CHECK_RESULT $? 0 0 "清理测试文件失败"
-
- # 如果测试前未安装软件包,则在测试结束后卸载
- if [ "$already_installed" = false ]; then
- LOG_INFO "步骤8:卸载测试安装的软件包"
- dnf remove -y $PACKAGES
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- else
- LOG_INFO "测试前已安装软件包,保持安装状态"
- fi
-
- LOG_INFO "测试完成:测试将系统消息输出发送到指定文件"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-quickstart_path.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-quickstart_path.sh
deleted file mode 100644
index 8ebe7657a5b..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-quickstart_path.sh
+++ /dev/null
@@ -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 : 2025-12-01
-# @License : Mulan PSL v2
-# @Desc : 测试 mystnb-quickstart 命令的基本功能,指定输出目录
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
-
- # 检查是否已安装python3-myst-nb软件包
- LOG_INFO "检查是否已安装python3-myst-nb软件包"
- if dnf list installed python3-myst-nb &>/dev/null; then
- LOG_INFO "python3-myst-nb已安装,脚本结束时将保持安装状态"
- INSTALLED=true
- else
- LOG_INFO "python3-myst-nb未安装,将在测试结束后卸载"
- INSTALLED=false
- fi
-
- # 检查yum源中是否有python3-myst-nb软件包
- LOG_INFO "检查yum源中是否有python3-myst-nb软件包"
- if ! dnf list available python3-myst-nb &>/dev/null; then
- LOG_ERROR "yum源中未找到python3-myst-nb软件包"
- exit 255
- fi
-
- # 安装python3-myst-nb软件包
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "安装python3-myst-nb软件包"
- dnf install -y python3-myst-nb
- CHECK_RESULT $? 0 0 "安装python3-myst-nb失败"
- fi
-
- # 测试mystnb-quickstart命令的基本功能,指定输出目录
- LOG_INFO "测试mystnb-quickstart命令的基本功能,指定输出目录"
- OUTPUT_DIR="/tmp/mystnb_output"
- mkdir -p "$OUTPUT_DIR"
- mystnb-quickstart --output-dir "$OUTPUT_DIR"
- CHECK_RESULT $? 0 0 "mystnb-quickstart命令执行失败"
-
- # 检查输出目录是否创建成功
- LOG_INFO "检查输出目录是否创建成功"
- if [ -d "$OUTPUT_DIR" ]; then
- LOG_INFO "输出目录创建成功: $OUTPUT_DIR"
- else
- LOG_ERROR "输出目录创建失败"
- exit 1
- fi
-
- # 清理输出目录
- LOG_INFO "清理输出目录"
- rm -rf "$OUTPUT_DIR"
- CHECK_RESULT $? 0 0 "清理输出目录失败"
-
- # 如果测试前未安装,则卸载python3-myst-nb软件包
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "卸载python3-myst-nb软件包"
- dnf remove -y python3-myst-nb
- CHECK_RESULT $? 0 0 "卸载python3-myst-nb失败"
- fi
-
- LOG_INFO "测试脚本执行完成"
-
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-quickstart_path_o.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-quickstart_path_o.sh
deleted file mode 100644
index 8afdb792149..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-quickstart_path_o.sh
+++ /dev/null
@@ -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 : 2025-12-01
-# @License : Mulan PSL v2
-# @Desc : 测试 mystnb-quickstart 命令的覆盖功能,指定输出目录并覆盖现有文件
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试 mystnb-quickstart 命令的覆盖功能,指定输出目录并覆盖现有文件"
-
- # 检查是否已安装 python3-myst-nb 包
- LOG_INFO "检查是否已安装 python3-myst-nb 包"
- if ! dnf list installed python3-myst-nb &>/dev/null; then
- LOG_INFO "python3-myst-nb 未安装,准备安装"
- # 检查 yum 源中是否有该软件包
- if ! dnf list available python3-myst-nb &>/dev/null; then
- LOG_ERROR "yum 源中未找到 python3-myst-nb 包"
- exit 255
- fi
- # 安装软件包
- dnf install -y python3-myst-nb
- CHECK_RESULT $? 0 0 "安装 python3-myst-nb 失败"
- # 标记为需要卸载
- NEED_UNINSTALL=1
- else
- LOG_INFO "python3-myst-nb 已安装"
- fi
-
- # 创建测试目录和文件
- LOG_INFO "创建测试目录和文件"
- TEST_DIR="/tmp/mystnb_test"
- mkdir -p $TEST_DIR
- echo "existing content" > $TEST_DIR/existing_file.md
-
- # 执行 mystnb-quickstart 命令并覆盖现有文件
- LOG_INFO "执行 mystnb-quickstart 命令并覆盖现有文件"
- mystnb-quickstart --output-dir $TEST_DIR --force
- CHECK_RESULT $? 0 0 "mystnb-quickstart 命令执行失败"
-
- # 验证文件是否被覆盖
- LOG_INFO "验证文件是否被覆盖"
- if grep -q "existing content" $TEST_DIR/existing_file.md; then
- LOG_ERROR "文件未被成功覆盖"
- exit 1
- else
- LOG_INFO "文件成功被覆盖"
- fi
-
- # 清理测试目录
- LOG_INFO "清理测试目录"
- rm -rf $TEST_DIR
-
- # 如果之前未安装,则卸载软件包
- if [ "$NEED_UNINSTALL" -eq 1 ]; then
- LOG_INFO "卸载 python3-myst-nb 包"
- dnf remove -y python3-myst-nb
- CHECK_RESULT $? 0 0 "卸载 python3-myst-nb 失败"
- fi
-
- LOG_INFO "测试完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-quickstart_path_o_v.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-quickstart_path_o_v.sh
deleted file mode 100644
index 7872ab51a7b..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-quickstart_path_o_v.sh
+++ /dev/null
@@ -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-01
-# @License : Mulan PSL v2
-# @Desc : 测试 mystnb-quickstart 命令的组合功能,指定输出目录、覆盖现有文件并启用详细模式
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试 mystnb-quickstart 命令的组合功能,指定输出目录、覆盖现有文件并启用详细模式"
-
- # 检查是否已安装 python3-myst-nb 和 mystnb-quickstart
- LOG_INFO "检查是否已安装 python3-myst-nb 和 mystnb-quickstart"
- if ! dnf list installed python3-myst-nb &> /dev/null; then
- LOG_INFO "python3-myst-nb 未安装,将进行安装"
- INSTALLED=false
- else
- LOG_INFO "python3-myst-nb 已安装"
- INSTALLED=true
- fi
-
- # 检查 yum 源中是否有 python3-myst-nb
- LOG_INFO "检查 yum 源中是否有 python3-myst-nb"
- if ! dnf list available python3-myst-nb &> /dev/null; then
- LOG_ERROR "yum 源中未找到 python3-myst-nb"
- exit 255
- fi
-
- # 如果未安装,则进行安装
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "正在安装 python3-myst-nb"
- dnf install -y python3-myst-nb
- CHECK_RESULT $? 0 0 "安装 python3-myst-nb 失败"
- fi
-
- # 检查 mystnb-quickstart 命令是否可用
- LOG_INFO "检查 mystnb-quickstart 命令是否可用"
- if ! command -v mystnb-quickstart &> /dev/null; then
- LOG_ERROR "mystnb-quickstart 命令不可用"
- exit 255
- fi
-
- # 创建测试目录
- TEST_DIR="/tmp/mytestdir"
- LOG_INFO "创建测试目录 $TEST_DIR"
- mkdir -p "$TEST_DIR"
- CHECK_RESULT $? 0 0 "创建测试目录失败"
-
- # 测试 mystnb-quickstart 命令
- LOG_INFO "测试 mystnb-quickstart 命令,指定输出目录、覆盖现有文件并启用详细模式"
- mystnb-quickstart -o "$TEST_DIR" --overwrite -v
- CHECK_RESULT $? 0 0 "mystnb-quickstart 命令执行失败"
-
- # 清理测试目录
- LOG_INFO "清理测试目录 $TEST_DIR"
- rm -rf "$TEST_DIR"
- CHECK_RESULT $? 0 0 "清理测试目录失败"
-
- #如果脚本开始时未安装,则卸载软件包以恢复环境
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "卸载 python3-myst-nb"
- dnf remove -y python3-myst-nb
- CHECK_RESULT $? 0 0 \“卸载 python3-myst-nb 失败”
- fi
-
- LOG_INFO \“测试完成”
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-quickstart_path_v.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-quickstart_path_v.sh
deleted file mode 100644
index a4fe51ec185..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-quickstart_path_v.sh
+++ /dev/null
@@ -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 : 2025-12-01
-# @License : Mulan PSL v2
-# @Desc : 测试 mystnb-quickstart 命令的详细输出功能,指定输出目录并启用详细模式
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 检查是否已安装mystnb-quickstart
- LOG_INFO "检查是否已安装mystnb-quickstart"
- if dnf list installed python3-myst-nb &>/dev/null; then
- LOG_INFO "python3-myst-nb已安装"
- installed=true
- else
- LOG_INFO "python3-myst-nb未安装"
- installed=false
- fi
-
- # 检查yum源中是否有python3-myst-nb软件包
- LOG_INFO "检查yum源中是否有python3-myst-nb软件包"
- if ! dnf list available python3-myst-nb &>/dev/null; then
- LOG_ERROR "yum源中未找到python3-myst-nb软件包"
- exit 255
- fi
-
- # 如果未安装,则安装软件包
- if [ "$installed" = false ]; then
- LOG_INFO "安装python3-myst-nb软件包"
- dnf install -y python3-myst-nb
- CHECK_RESULT $? 0 0 "安装python3-myst-nb失败"
- fi
-
- # 测试mystnb-quickstart命令的详细输出功能
- LOG_INFO "测试mystnb-quickstart命令的详细输出功能,指定输出目录并启用详细模式"
- output_dir="/tmp/mystnb_test_output"
- mkdir -p "$output_dir"
- CHECK_RESULT $? 0 0 "创建输出目录失败"
-
- mystnb-quickstart --output-dir "$output_dir" --verbose &>/dev/null
- CHECK_RESULT $? 0 0 "执行mystnb-quickstart命令失败"
-
- # 检查输出目录是否生成文件
- LOG_INFO "检查输出目录是否生成文件"
- if [ -f "$output_dir/conf.py" ] && [ -f "$output_dir/index.md" ]; then
- LOG_INFO "输出目录中成功生成文件"
- else
- LOG_ERROR "输出目录中未生成预期文件"
- exit 1
- fi
-
- # 清理输出目录
- LOG_INFO "清理输出目录"
- rm -rf "$output_dir"
- CHECK_RESULT $? 0 0 "清理输出目录失败"
-
- # 如果脚本开始时未安装软件包,则在结束时卸载
- if [ "$installed" = false ]; then
- LOG_INFO "卸载python3-myst-nb软件包"
- dnf remove -y python3-myst-nb
- CHECK_RESULT $? 0 0 "卸载python3-myst-nb失败"
- fi
-
- LOG_INFO "测试脚本执行完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-to-jupyter_help.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-to-jupyter_help.sh
deleted file mode 100644
index 569298c596b..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-to-jupyter_help.sh
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/usr/bin/bash
-
-# Copyright (c) 2024 ISCAS .ALL rights reserved.
-# This program is licensed under Mulan PSL v2.
-# You can use it according to the terms and conditions of the Mulan PSL v2.
-# http://license.coscl.org.cn/MulanPSL2
-# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
-# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
-# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
-# See the Mulan PSL v2 for more details.
-
-# #############################################
-# @Author : honghua
-# @Contact : honghua@iscas.ac.cn
-# @Date : 2026-03-16
-# @License : Mulan PSL v2
-# @Desc : 测试显示帮助信息
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试:测试显示帮助信息"
-
- # 检查是否已安装python3-myst-nb和mystnb-to-jupyter包
- LOG_INFO "步骤1:检查python3-myst-nb和mystnb-to-jupyter包是否已安装"
- if dnf list installed python3-myst-nb &> /dev/null && dnf list installed mystnb-to-jupyter &> /dev/null; then
- LOG_INFO "python3-myst-nb和mystnb-to-jupyter已安装"
- already_installed=true
- else
- LOG_INFO "python3-myst-nb和mystnb-to-jupyter未安装"
- already_installed=false
- fi
-
- # 检查yum源中是否有python3-myst-nb和mystnb-to-jupyter包
- LOG_INFO "步骤2:检查yum源中是否有python3-myst-nb和mystnb-to-jupyter包"
- if ! dnf list available python3-myst-nb &> /dev/null; then
- LOG_ERROR "yum源中未找到python3-myst-nb包"
- exit 255
- fi
- if ! dnf list available mystnb-to-jupyter &> /dev/null; then
- LOG_ERROR "yum源中未找到mystnb-to-jupyter包"
- exit 255
- fi
-
- # 如果未安装,则安装软件包
- if [ "$already_installed" = false ]; then
- LOG_INFO "步骤3:安装python3-myst-nb和mystnb-to-jupyter包"
- dnf install -y python3-myst-nb mystnb-to-jupyter
- CHECK_RESULT $? 0 0 "安装python3-myst-nb和mystnb-to-jupyter失败"
- fi
-
- # 测试显示帮助信息
- LOG_INFO "步骤4:测试显示帮助信息"
- mystnb-to-jupyter --help
- CHECK_RESULT $? 0 0 "显示帮助信息失败"
-
- # 清理环境:如果之前未安装,则卸载软件包
- if [ "$already_installed" = false ]; then
- LOG_INFO "步骤5:清理环境,卸载python3-myst-nb和mystnb-to-jupyter包"
- dnf remove -y python3-myst-nb mystnb-to-jupyter
- CHECK_RESULT $? 0 0 "卸载python3-myst-nb和mystnb-to-jupyter失败"
- fi
-
- LOG_INFO "测试完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-to-jupyter_overwrite.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-to-jupyter_overwrite.sh
deleted file mode 100644
index 7b473c2d8ed..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-to-jupyter_overwrite.sh
+++ /dev/null
@@ -1,118 +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-16
-# @License : Mulan PSL v2
-# @Desc : 测试使用覆盖选项转换文件
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 定义日志函数
- LOG_INFO() {
- echo "INFO: $*"
- }
-
- LOG_ERROR() {
- echo "ERROR: $*" >&2
- }
-
- # 定义检查结果函数
- CHECK_RESULT() {
- local actual_ret=$1
- local expect_ret=$2
- local expect_ret2=$3
- local error_msg=$4
- if [[ $actual_ret -ne $expect_ret ]] && [[ $actual_ret -ne $expect_ret2 ]]; then
- LOG_ERROR "$error_msg"
- exit $actual_ret
- 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 -o UserKnownHostsFile=/dev/null "$node_user@$node_ip" "$cmd"
- }
-
- # 测试脚本开始
- LOG_INFO "开始测试:测试使用覆盖选项转换文件"
-
- # 检查软件包是否在yum源中
- LOG_INFO "检查yum源中是否存在python3-myst-nb和python3-mystnb-to-jupyter包"
- dnf list available python3-myst-nb python3-mystnb-to-jupyter > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中不存在所需的软件包"
- exit 255
- fi
-
- # 检查是否已安装
- LOG_INFO "检查是否已安装python3-myst-nb和python3-mystnb-to-jupyter"
- if rpm -q python3-myst-nb python3-mystnb-to-jupyter > /dev/null 2>&1; then
- LOG_INFO "软件包已安装,测试结束后保持安装状态"
- already_installed=true
- else
- LOG_INFO "软件包未安装,将在测试步骤中安装"
- already_installed=false
- fi
-
- # 如果未安装,则安装软件包
- if [ "$already_installed" = false ]; then
- LOG_INFO "安装python3-myst-nb和python3-mystnb-to-jupyter"
- dnf install -y python3-myst-nb python3-mystnb-to-jupyter
- CHECK_RESULT $? 0 0 "安装软件包失败"
- fi
-
- # 创建测试文件
- LOG_INFO "创建测试文件test.md"
- echo "# Test Markdown" > test.md
- echo "Some content" >> test.md
-
- # 测试转换文件
- LOG_INFO "测试转换文件为Jupyter Notebook格式"
- mystnb-to-jupyter test.md -o test.ipynb
- CHECK_RESULT $? 0 0 "转换文件失败"
-
- # 测试覆盖选项
- LOG_INFO "测试使用覆盖选项转换文件"
- mystnb-to-jupyter test.md -o test.ipynb --overwrite
- CHECK_RESULT $? 0 0 "使用覆盖选项转换文件失败"
-
- # 检查参数是否存在或不支持
- LOG_INFO "检查不支持的参数"
- mystnb-to-jupyter test.md --invalid-option 2>/dev/null
- if [ $? -ne 255 ]; then
- LOG_ERROR "不支持的参数未正确处理"
- exit 255
- fi
-
- # 清理测试文件
- LOG_INFO "清理测试文件"
- rm -f test.md test.ipynb
-
- # 如果测试前未安装,则卸载软件包
- if [ "$already_installed" = false ]; then
- LOG_INFO "卸载python3-myst-nb和python3-mystnb-to-jupyter"
- dnf remove -y python3-myst-nb python3-mystnb-to-jupyter
- CHECK_RESULT $? 0 0 "卸载软件包失败"
- fi
-
- LOG_INFO "测试完成:测试使用覆盖选项转换文件"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-to-jupyter_verbose.sh b/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-to-jupyter_verbose.sh
deleted file mode 100644
index 1b69c0036fe..00000000000
--- a/testcases/function_test/pkg_test/python-myst-nb/python3-myst-nb/test_python3-myst-nb_mystnb-to-jupyter_verbose.sh
+++ /dev/null
@@ -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-16
-# @License : Mulan PSL v2
-# @Desc : 测试使用详细输出选项转换文件
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 定义颜色代码(可选,用于日志高亮)
- RED="\033[0;31m"
- GREEN="\033[0;32m"
- YELLOW="\033[0;33m"
- NC="\033[0m" # No Color
-
- # 定义软件包名称
- PACKAGE_NAME="python3-myst-nb"
-
- # 初始化安装标志
- INSTALLED_BEFORE=0
-
- # 检查环境是否已安装指定软件包
- LOG_INFO "检查是否已安装 ${PACKAGE_NAME}"
- if dnf list installed "${PACKAGE_NAME}" &>/dev/null; then
- LOG_INFO "${PACKAGE_NAME} 已安装"
- INSTALLED_BEFORE=1
- else
- LOG_INFO "${PACKAGE_NAME} 未安装"
- 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 [[ ${INSTALLED_BEFORE} -eq 0 ]]; then
- LOG_INFO "安装 ${PACKAGE_NAME}"
- dnf install -y "${PACKAGE_NAME}"
- CHECK_RESULT $? 0 0 "安装 ${PACKAGE_NAME} 失败"
- fi
-
- # 测试使用详细输出选项转换文件
- LOG_INFO "测试使用详细输出选项转换文件"
- # 创建一个临时的MyST Notebook文件用于测试
- TEST_FILE="/tmp/test_myst_notebook.md"
- cat > "${TEST_FILE}" << "EOF"
- ---
- jupyter:
- jupytext:
- text_representation:
- extension: .md
- format_name: myst
- format_version: 0.13
- jupytext_version: 1.14.5
- kernelspec:
- display_name: Python 3
- language: python
- name: python3
- ---
-
- # 测试MyST Notebook
-
- 这是一个测试文件。
- EOF
-
- # 检查mystnb-to-jupyter命令是否支持--verbose参数
- LOG_INFO "检查mystnb-to-jupyter命令是否支持--verbose参数"
- if ! mystnb-to-jupyter --help 2>/dev/null | grep -q -- "--verbose"; then
- LOG_ERROR "mystnb-to-jupyter命令不支持--verbose参数"
- # 清理临时文件
- rm -f "${TEST_FILE}"
- # 如果之前未安装,则卸载软件包
- if [[ ${INSTALLED_BEFORE} -eq 0 ]]; then
- LOG_INFO "卸载 ${PACKAGE_NAME}"
- dnf remove -y "${PACKAGE_NAME}"
- CHECK_RESULT $? 0 0 "卸载 ${PACKAGE_NAME} 失败"
- fi
- exit 255
- fi
-
- # 执行转换命令,使用--verbose参数
- LOG_INFO "执行mystnb-to-jupyter --verbose转换"
- OUTPUT_FILE="/tmp/test_myst_notebook.ipynb"
- mystnb-to-jupyter --verbose "${TEST_FILE}" -o "${OUTPUT_FILE}"
- CHECK_RESULT $? 0 0 "使用详细输出选项转换文件失败"
-
- # 检查输出文件是否生成
- LOG_INFO "检查输出文件是否生成"
- if [[ -f "${OUTPUT_FILE}" ]]; then
- LOG_INFO "输出文件已生成: ${OUTPUT_FILE}"
- else
- LOG_ERROR "输出文件未生成"
- CHECK_RESULT 1 0 0 "输出文件未生成"
- fi
-
- # 清理临时文件
- LOG_INFO "清理临时文件"
- rm -f "${TEST_FILE}" "${OUTPUT_FILE}"
-
- # 如果之前未安装,则卸载软件包
- if [[ ${INSTALLED_BEFORE} -eq 0 ]]; then
- LOG_INFO "卸载 ${PACKAGE_NAME}"
- dnf remove -y "${PACKAGE_NAME}"
- CHECK_RESULT $? 0 0 "卸载 ${PACKAGE_NAME} 失败"
- fi
-
- LOG_INFO "测试完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/texlive-filesystem/texlive-collection-music/test_texlive-collection-music_function_basic.sh b/testcases/function_test/pkg_test/texlive-filesystem/texlive-collection-music/test_texlive-collection-music_function_basic.sh
deleted file mode 100644
index dfb298ea46a..00000000000
--- a/testcases/function_test/pkg_test/texlive-filesystem/texlive-collection-music/test_texlive-collection-music_function_basic.sh
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/usr/bin/bash
-
-# Copyright (c) 2024 ISCAS .ALL rights reserved.
-# This program is licensed under Mulan PSL v2.
-# You can use it according to the terms and conditions of the Mulan PSL v2.
-# http://license.coscl.org.cn/MulanPSL2
-# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
-# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
-# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
-# See the Mulan PSL v2 for more details.
-
-# #############################################
-# @Author : honghua
-# @Contact : honghua@iscas.ac.cn
-# @Date : 2025-11-27
-# @License : Mulan PSL v2
-# @Desc : Test basic functionality of texlive-collection-music
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试 texlive-collection-music 的基本功能"
-
- # 检查 yum 源中是否存在 texlive-collection-music 软件包
- LOG_INFO "检查 yum 源中是否存在 texlive-collection-music 软件包"
- dnf list available texlive-collection-music &>/dev/null
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum 源中未找到 texlive-collection-music 软件包"
- exit 255
- fi
-
- # 检查是否已安装 texlive-collection-music
- LOG_INFO "检查是否已安装 texlive-collection-music"
- rpm -q texlive-collection-music &>/dev/null
- if [ $? -eq 0 ]; then
- LOG_INFO "texlive-collection-music 已安装,测试结束后保持安装状态"
- INSTALLED=true
- else
- LOG_INFO "texlive-collection-music 未安装,将在测试结束后卸载"
- INSTALLED=false
- fi
-
- # 若未安装则安装软件包
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "安装 texlive-collection-music"
- dnf install -y texlive-collection-music
- CHECK_RESULT $? 0 0 "安装 texlive-collection-music 失败"
- fi
-
- # 测试 texlive-collection-music 的基本功能
- LOG_INFO "测试 texlive-collection-music 的基本功能"
-
- # TODO: 添加具体的功能测试步骤,例如执行某些命令并验证结果
-
- # 清理环境:若测试前未安装则卸载软件包
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "卸载 texlive-collection-music"
- dnf remove -y texlive-collection-music
- CHECK_RESULT $? 0 0 "卸载 texlive-collection-music 失败"
- fi
-
- LOG_INFO "测试完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/texlive-split-o/texlive-mathpunctspace/test_texlive-mathpunctspace_function_check.sh b/testcases/function_test/pkg_test/texlive-split-o/texlive-mathpunctspace/test_texlive-mathpunctspace_function_check.sh
deleted file mode 100644
index 16d8cef422e..00000000000
--- a/testcases/function_test/pkg_test/texlive-split-o/texlive-mathpunctspace/test_texlive-mathpunctspace_function_check.sh
+++ /dev/null
@@ -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-04
-# @License : Mulan PSL v2
-# @Desc : Check package availability
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- set -e
-
- LOG_INFO "开始测试:检查软件包可用性"
-
- # 检查是否已安装texlive-mathpunctspace
- if rpm -q texlive-mathpunctspace &>/dev/null; then
- LOG_INFO "检测到texlive-mathpunctspace已安装,测试结束后将保持安装状态"
- already_installed=true
- else
- LOG_INFO "检测到texlive-mathpunctspace未安装,将在测试过程中安装并最终卸载"
- already_installed=false
- fi
-
- # 检查yum源中是否有texlive-mathpunctspace包
- LOG_INFO "步骤1:检查yum源中是否存在texlive-mathpunctspace软件包"
- if ! dnf list available texlive-mathpunctspace &>/dev/null; then
- LOG_ERROR "yum源中未找到texlive-mathpunctspace软件包"
- exit 255
- fi
- LOG_INFO "yum源中存在texlive-mathpunctspace软件包"
-
- # 如果未安装,则安装软件包
- if [ "$already_installed" = false ]; then
- LOG_INFO "步骤2:安装texlive-mathpunctspace软件包"
- dnf install -y texlive-mathpunctspace
- CHECK_RESULT $? 0 0 "安装texlive-mathpunctspace失败"
- LOG_INFO "texlive-mathpunctspace安装成功"
- fi
-
- # 检查软件包是否安装成功
- LOG_INFO "步骤3:验证texlive-mathpunctspace是否安装成功"
- rpm -q texlive-mathpunctspace
- CHECK_RESULT $? 0 0 "验证texlive-mathpunctspace安装状态失败"
-
- # 执行测试命令(示例:检查包提供的文件)
- LOG_INFO "步骤4:检查texlive-mathpunctspace提供的文件"
- rpm -ql texlive-mathpunctspace | head -5
- CHECK_RESULT $? 0 0 "获取texlive-mathpunctspace文件列表失败"
-
- LOG_INFO "步骤5:测试命令执行完成"
-
- # 环境恢复:如果测试前未安装,则卸载软件包
- if [ "$already_installed" = false ]; then
- LOG_INFO "步骤6:卸载测试安装的texlive-mathpunctspace软件包"
- dnf remove -y texlive-mathpunctspace
- CHECK_RESULT $? 0 0 "卸载texlive-mathpunctspace失败"
- LOG_INFO "texlive-mathpunctspace卸载成功"
- else
- LOG_INFO "步骤6:测试前已安装texlive-mathpunctspace,保持安装状态"
- fi
-
- LOG_INFO "测试完成:软件包可用性检查通过"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/texlive-split-o/texlive-mathpunctspace/test_texlive-mathpunctspace_function_usage.sh b/testcases/function_test/pkg_test/texlive-split-o/texlive-mathpunctspace/test_texlive-mathpunctspace_function_usage.sh
deleted file mode 100644
index 3e7221eff29..00000000000
--- a/testcases/function_test/pkg_test/texlive-split-o/texlive-mathpunctspace/test_texlive-mathpunctspace_function_usage.sh
+++ /dev/null
@@ -1,104 +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 : Test basic package usage
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 判断是否已经安装texlive-mathpunctspace软件包
- LOG_INFO "检查texlive-mathpunctspace软件包是否已安装"
- rpm -q texlive-mathpunctspace > /dev/null 2>&1
- if [ $? -eq 0 ]; then
- LOG_INFO "texlive-mathpunctspace已安装,脚本结束时将保持安装状态"
- INSTALLED_BEFORE="yes"
- else
- LOG_INFO "texlive-mathpunctspace未安装,将在测试步骤中安装"
- INSTALLED_BEFORE="no"
- fi
-
- # 检查yum源中是否有该软件包
- LOG_INFO "检查yum源中是否有texlive-mathpunctspace软件包"
- dnf list available texlive-mathpunctspace > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中没有texlive-mathpunctspace软件包"
- exit 255
- fi
-
- # 如果未安装,则安装软件包
- if [ "$INSTALLED_BEFORE" = "no" ]; then
- LOG_INFO "安装texlive-mathpunctspace软件包"
- dnf install -y texlive-mathpunctspace
- CHECK_RESULT $? 0 0 "安装texlive-mathpunctspace失败"
- fi
-
- # 测试基本包使用
- LOG_INFO "测试texlive-mathpunctspace基本包使用"
- # 假设texlive-mathpunctspace提供了一个命令行工具mathpunctspace,测试其基本用法
- # 检查命令是否存在
- command -v mathpunctspace > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "mathpunctspace命令不存在"
- exit 255
- fi
-
- # 测试不带参数执行命令,预期失败
- LOG_INFO "测试不带参数执行mathpunctspace命令"
- mathpunctspace 2>&1 | grep -q "usage"
- CHECK_RESULT $? 0 0 "不带参数执行mathpunctspace命令未显示用法信息"
-
- # 测试带--help参数
- LOG_INFO "测试带--help参数执行mathpunctspace命令"
- mathpunctspace --help 2>&1 | grep -q "usage"
- CHECK_RESULT $? 0 0 "带--help参数执行mathpunctspace命令未显示用法信息"
-
- # 测试带无效参数
- LOG_INFO "测试带无效参数执行mathpunctspace命令"
- mathpunctspace --invalid-param 2>&1 | grep -q "unrecognized option"
- if [ $? -ne 0 ]; then
- LOG_ERROR "无效参数未被正确识别"
- exit 255
- fi
-
- # 测试正常功能
- LOG_INFO "测试mathpunctspace命令正常功能"
- # 假设mathpunctspace命令接受一个输入文件并处理
- # 创建一个测试文件
- cat > test_input.tex << "EOF"
- \documentclass{article}
- \begin{document}
- Hello, world!
- \end{document}
- EOF
-
- mathpunctspace test_input.tex > test_output.tex 2>&1
- CHECK_RESULT $? 0 0 "mathpunctspace命令处理测试文件失败"
-
- # 清理测试文件
- rm -f test_input.tex test_output.tex
-
- # 如果测试前未安装,则在测试结束后卸载软件包
- if [ "$INSTALLED_BEFORE" = "no" ]; then
- LOG_INFO "卸载texlive-mathpunctspace软件包"
- dnf remove -y texlive-mathpunctspace
- CHECK_RESULT $? 0 0 "卸载texlive-mathpunctspace失败"
- fi
-
- LOG_INFO "测试完成,环境已恢复"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/texlive-split-y/texlive-hitszbeamer/test_texlive-hitszbeamer_function_basic.sh b/testcases/function_test/pkg_test/texlive-split-y/texlive-hitszbeamer/test_texlive-hitszbeamer_function_basic.sh
deleted file mode 100644
index efb350f0739..00000000000
--- a/testcases/function_test/pkg_test/texlive-split-y/texlive-hitszbeamer/test_texlive-hitszbeamer_function_basic.sh
+++ /dev/null
@@ -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-11-26
-# @License : Mulan PSL v2
-# @Desc : Test basic functionality of texlive-hitszbeamer
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
-
- # 检查是否已安装texlive-hitszbeamer
- LOG_INFO "检查是否已安装texlive-hitszbeamer"
- rpm -q texlive-hitszbeamer > /dev/null 2>&1
- if [ $? -eq 0 ]; then
- LOG_INFO "texlive-hitszbeamer已安装,脚本结束时将保持安装状态"
- INSTALLED=true
- else
- LOG_INFO "texlive-hitszbeamer未安装,将在测试结束后卸载"
- INSTALLED=false
- fi
-
- # 检查yum源中是否有texlive-hitszbeamer
- LOG_INFO "检查yum源中是否有texlive-hitszbeamer"
- dnf list available texlive-hitszbeamer > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum源中未找到texlive-hitszbeamer软件包"
- exit 255
- fi
-
- # 安装texlive-hitszbeamer
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "安装texlive-hitszbeamer"
- dnf install -y texlive-hitszbeamer
- CHECK_RESULT $? 0 0 "安装texlive-hitszbeamer失败"
- fi
-
- # 测试texlive-hitszbeamer基本功能
- LOG_INFO "测试texlive-hitszbeamer基本功能"
- texlive-hitszbeamer --version > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "texlive-hitszbeamer基本功能测试失败"
-
- # 测试texlive-hitszbeamer不支持参数
- LOG_INFO "测试texlive-hitszbeamer不支持参数"
- texlive-hitszbeamer --invalid-arg > /dev/null 2>&1
- if [ $? -ne 255 ]; then
- LOG_ERROR "texlive-hitszbeamer未正确处理不支持参数"
- exit 255
- fi
-
- # 清理环境
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "卸载texlive-hitszbeamer"
- dnf remove -y texlive-hitszbeamer
- CHECK_RESULT $? 0 0 "卸载texlive-hitszbeamer失败"
- fi
-
- LOG_INFO "测试脚本执行完成"
-
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/texlive-split-y/texlive-hitszbeamer/test_texlive-hitszbeamer_function_basic_compile.sh b/testcases/function_test/pkg_test/texlive-split-y/texlive-hitszbeamer/test_texlive-hitszbeamer_function_basic_compile.sh
deleted file mode 100644
index cce17d3407d..00000000000
--- a/testcases/function_test/pkg_test/texlive-split-y/texlive-hitszbeamer/test_texlive-hitszbeamer_function_basic_compile.sh
+++ /dev/null
@@ -1,106 +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-25
-# @License : Mulan PSL v2
-# @Desc : Test basic compilation with hitszbeamer document class
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 定义颜色输出函数(可选,但通常测试框架会提供)
- LOG_INFO() {
- echo "[INFO] $*"
- }
-
- LOG_ERROR() {
- echo "[ERROR] $*"
- }
-
- # 定义软件包名称
- PACKAGE_NAME="texlive-hitszbeamer"
-
- # 步骤1: 检查yum源中是否存在texlive-hitszbeamer软件包
- 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
-
- # 步骤2: 检查系统是否已安装texlive-hitszbeamer
- LOG_INFO "步骤2: 检查系统是否已安装${PACKAGE_NAME}"
- if rpm -q "${PACKAGE_NAME}" &>/dev/null; then
- LOG_INFO "${PACKAGE_NAME}已安装,脚本结束后将保持安装状态"
- ALREADY_INSTALLED=1
- else
- LOG_INFO "${PACKAGE_NAME}未安装,将在测试过程中安装"
- ALREADY_INSTALLED=0
- fi
-
- # 步骤3: 安装texlive-hitszbeamer(如果未安装)
- if [ ${ALREADY_INSTALLED} -eq 0 ]; then
- LOG_INFO "步骤3: 安装${PACKAGE_NAME}"
- dnf install -y "${PACKAGE_NAME}"
- CHECK_RESULT $? 0 0 "安装${PACKAGE_NAME}失败"
- fi
-
- # 步骤4: 创建测试用的LaTeX文档
- LOG_INFO "步骤4: 创建测试用的LaTeX文档"
- TEST_DIR="/tmp/test_texlive_hitszbeamer_$(date +%s)"
- mkdir -p "${TEST_DIR}"
- cd "${TEST_DIR}" || exit 1
-
- cat > test.tex << "EOF"
- \documentclass{hitszbeamer}
- \begin{document}
- \begin{frame}
- \frametitle{测试标题}
- 这是一个测试文档。
- \end{frame}
- \end{document}
- EOF
-
- # 步骤5: 使用pdflatex编译LaTeX文档
- LOG_INFO "步骤5: 使用pdflatex编译LaTeX文档"
- pdflatex -interaction=nonstopmode test.tex
- CHECK_RESULT $? 0 0 "pdflatex编译失败"
-
- # 步骤6: 检查生成的PDF文件
- LOG_INFO "步骤6: 检查生成的PDF文件"
- if [ -f test.pdf ]; then
- LOG_INFO "PDF文件生成成功"
- else
- LOG_ERROR "PDF文件未生成"
- exit 1
- fi
-
- # 步骤7: 清理测试目录
- LOG_INFO "步骤7: 清理测试目录"
- cd /tmp && rm -rf "${TEST_DIR}"
-
- # 步骤8: 卸载texlive-hitszbeamer(如果测试前未安装)
- if [ ${ALREADY_INSTALLED} -eq 0 ]; then
- LOG_INFO "步骤8: 卸载${PACKAGE_NAME}"
- dnf remove -y "${PACKAGE_NAME}"
- CHECK_RESULT $? 0 0 "卸载${PACKAGE_NAME}失败"
- else
- LOG_INFO "步骤8: 保持${PACKAGE_NAME}安装状态,不进行卸载"
- fi
-
- LOG_INFO "测试完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/texlive-split-y/texlive-hitszbeamer/test_texlive-hitszbeamer_function_check_installed.sh b/testcases/function_test/pkg_test/texlive-split-y/texlive-hitszbeamer/test_texlive-hitszbeamer_function_check_installed.sh
deleted file mode 100644
index 8f25e1f9a84..00000000000
--- a/testcases/function_test/pkg_test/texlive-split-y/texlive-hitszbeamer/test_texlive-hitszbeamer_function_check_installed.sh
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/bash
-
-# Copyright (c) 2024 ISCAS .ALL rights reserved.
-# This program is licensed under Mulan PSL v2.
-# You can use it according to the terms and conditions of the Mulan PSL v2.
-# http://license.coscl.org.cn/MulanPSL2
-# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
-# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
-# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
-# See the Mulan PSL v2 for more details.
-
-# #############################################
-# @Author : honghua
-# @Contact : honghua@iscas.ac.cn
-# @Date : 2026-02-25
-# @License : Mulan PSL v2
-# @Desc : Check if texlive-hitszbeamer is installed
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- PACKAGE_NAME="texlive-hitszbeamer"
- LOG_INFO "开始测试:检查${PACKAGE_NAME}是否安装"
- 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
- LOG_INFO "yum源中存在${PACKAGE_NAME}软件包"
- LOG_INFO "步骤2:检查当前环境是否已安装${PACKAGE_NAME}"
- dnf list installed "${PACKAGE_NAME}" > /dev/null 2>&1
- IS_INSTALLED=$?
- if [ ${IS_INSTALLED} -eq 0 ]; then
- LOG_INFO "当前环境已安装${PACKAGE_NAME}"
- INSTALLED_BEFORE_TEST=1
- else
- LOG_INFO "当前环境未安装${PACKAGE_NAME}"
- INSTALLED_BEFORE_TEST=0
- fi
- if [ ${INSTALLED_BEFORE_TEST} -eq 0 ]; then
- LOG_INFO "步骤3:安装${PACKAGE_NAME}软件包"
- dnf install -y "${PACKAGE_NAME}"
- CHECK_RESULT $? 0 0 "安装${PACKAGE_NAME}失败"
- LOG_INFO "安装${PACKAGE_NAME}成功"
- fi
- LOG_INFO "步骤4:验证${PACKAGE_NAME}功能"
- rpm -qi "${PACKAGE_NAME}" > /dev/null
- CHECK_RESULT $? 0 0 "查询${PACKAGE_NAME}软件包信息失败"
- LOG_INFO "查询${PACKAGE_NAME}软件包信息成功"
- LOG_INFO "步骤5:清理测试环境"
- if [ ${INSTALLED_BEFORE_TEST} -eq 0 ]; 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 "测试完成:${PACKAGE_NAME}安装检查通过"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/texlive-split-y/texlive-hitszbeamer/test_texlive-hitszbeamer_function_install.sh b/testcases/function_test/pkg_test/texlive-split-y/texlive-hitszbeamer/test_texlive-hitszbeamer_function_install.sh
deleted file mode 100644
index 2e035f38490..00000000000
--- a/testcases/function_test/pkg_test/texlive-split-y/texlive-hitszbeamer/test_texlive-hitszbeamer_function_install.sh
+++ /dev/null
@@ -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-02-25
-# @License : Mulan PSL v2
-# @Desc : Test installation of texlive-hitszbeamer package
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 检查是否已安装 texlive-hitszbeamer 软件包
- LOG_INFO "检查是否已安装 texlive-hitszbeamer 软件包"
- dnf list installed texlive-hitszbeamer > /dev/null 2>&1
- installed=$?
-
- # 判断 yum 源中是否有 texlive-hitszbeamer 软件包
- LOG_INFO "检查 yum 源中是否有 texlive-hitszbeamer 软件包"
- dnf list available texlive-hitszbeamer > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "yum 源中不存在 texlive-hitszbeamer 软件包"
- if [ $? -ne 0 ]; then
- LOG_ERROR "yum 源中不存在 texlive-hitszbeamer 软件包"
- exit 255
- fi
-
- # 如果未安装,则执行安装
- if [ $installed -ne 0 ]; then
- LOG_INFO "未检测到 texlive-hitszbeamer 软件包,开始安装"
- dnf install -y texlive-hitszbeamer
- CHECK_RESULT $? 0 0 "安装 texlive-hitszbeamer 软件包失败"
- LOG_INFO "texlive-hitszbeamer 软件包安装成功"
- # 标记为需要清理
- need_cleanup=1
- else
- LOG_INFO "texlive-hitszbeamer 软件包已安装,跳过安装步骤"
- need_cleanup=0
- fi
-
- # 测试安装后的功能
- LOG_INFO "测试 texlive-hitszbeamer 软件包功能"
- # 这里可以添加具体的功能测试命令,例如检查某个文件是否存在或执行某个命令
- # 示例:检查是否安装了特定的 LaTeX 宏包文件
- if [ -f /usr/share/texlive/texmf-dist/tex/latex/hitszbeamer/hitszbeamer.cls ]; then
- LOG_INFO "检测到 hitszbeamer.cls 文件,功能正常"
- else
- LOG_ERROR "未找到 hitszbeamer.cls 文件,功能异常"
- exit 1
- fi
-
- # 清理环境:如果之前未安装,则卸载软件包
- if [ $need_cleanup -eq 1 ]; then
- LOG_INFO "清理环境:卸载 texlive-hitszbeamer 软件包"
- dnf remove -y texlive-hitszbeamer
- CHECK_RESULT $? 0 0 "卸载 texlive-hitszbeamer 软件包失败"
- LOG_INFO "texlive-hitszbeamer 软件包卸载成功"
- else
- LOG_INFO "保持 texlive-hitszbeamer 软件包安装状态"
- fi
-
- LOG_INFO "测试脚本执行完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/texlive-split-y/texlive-hitszbeamer/test_texlive-hitszbeamer_function_logo_usage.sh b/testcases/function_test/pkg_test/texlive-split-y/texlive-hitszbeamer/test_texlive-hitszbeamer_function_logo_usage.sh
deleted file mode 100644
index 504525bcf80..00000000000
--- a/testcases/function_test/pkg_test/texlive-split-y/texlive-hitszbeamer/test_texlive-hitszbeamer_function_logo_usage.sh
+++ /dev/null
@@ -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-25
-# @License : Mulan PSL v2
-# @Desc : Test logo inclusion functionality in hitszbeamer
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "测试用例:Test logo inclusion functionality in hitszbeamer"
- LOG_INFO "步骤1:检查texlive-hitszbeamer软件包是否已在yum源中"
- dnf list available texlive-hitszbeamer &>/dev/null
- if [ $? -ne 0 ]; then
- LOG_ERROR "texlive-hitszbeamer软件包在yum源中不存在"
- exit 255
- fi
-
- LOG_INFO "步骤2:检查当前环境是否已安装texlive-hitszbeamer"
- rpm -q texlive-hitszbeamer &>/dev/null
- if [ $? -eq 0 ]; then
- LOG_INFO "texlive-hitszbeamer已安装,脚本结束将保持安装状态"
- INSTALLED=1
- else
- LOG_INFO "texlive-hitszbeamer未安装,将进行安装"
- INSTALLED=0
- fi
-
- if [ $INSTALLED -eq 0 ]; then
- LOG_INFO "步骤3:安装texlive-hitszbeamer软件包"
- dnf install -y texlive-hitszbeamer
- CHECK_RESULT $? 0 0 "安装texlive-hitszbeamer失败"
- fi
-
- LOG_INFO "步骤4:测试logo包含功能,检查是否支持logo参数"
- pdflatex --help | grep -q "\-\-logo"
- if [ $? -ne 0 ]; then
- LOG_ERROR "pdflatex命令不支持logo参数"
- exit 255
- fi
-
- LOG_INFO "步骤5:创建一个简单的测试LaTeX文档以验证logo功能"
- cat > test_logo.tex << "EOF"
- \documentclass{hitszbeamer}
- \logo{\includegraphics[height=0.5cm]{example-image}}
- \begin{document}
- \begin{frame}
- \frametitle{Test Frame}
- This is a test frame with logo.
- \end{frame}
- \end{document}
- EOF
-
- LOG_INFO "步骤6:使用pdflatex编译测试文档,并指定logo参数"
- pdflatex --logo test_logo.tex
- CHECK_RESULT $? 0 0 "pdflatex编译失败,logo功能可能存在问题"
-
- LOG_INFO "步骤7:检查生成的PDF文件是否存在"
- if [ -f test_logo.pdf ]; then
- LOG_INFO "PDF文件生成成功,logo功能正常"
- else
- LOG_ERROR "PDF文件未生成,logo功能可能存在问题"
- exit 1
- fi
-
- LOG_INFO "步骤8:清理生成的临时文件"
- rm -f test_logo.aux test_logo.log test_logo.nav test_logo.out test_logo.snm test_logo.toc test_logo.pdf test_logo.tex
-
- if [ $INSTALLED -eq 0 ]; then
- LOG_INFO "步骤9:卸载texlive-hitszbeamer软件包"
- dnf remove -y texlive-hitszbeamer
- CHECK_RESULT $? 0 0 "卸载texlive-hitszbeamer失败"
- fi
-
- LOG_INFO "测试完成,环境已恢复"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/texlive-split-y/texlive-hitszbeamer/test_texlive-hitszbeamer_function_theme_options.sh b/testcases/function_test/pkg_test/texlive-split-y/texlive-hitszbeamer/test_texlive-hitszbeamer_function_theme_options.sh
deleted file mode 100644
index 544f7f0b07f..00000000000
--- a/testcases/function_test/pkg_test/texlive-split-y/texlive-hitszbeamer/test_texlive-hitszbeamer_function_theme_options.sh
+++ /dev/null
@@ -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-02-25
-# @License : Mulan PSL v2
-# @Desc : Test applying different theme options in hitszbeamer
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试:测试hitszbeamer主题选项的应用"
- LOG_INFO "步骤1: 检查环境是否已安装hitszbeamer"
- if dnf list installed | grep -q "hitszbeamer"; then
- LOG_INFO "hitszbeamer已安装,测试后保持安装状态"
- INSTALLED=true
- else
- LOG_INFO "hitszbeamer未安装,将在测试中安装"
- INSTALLED=false
- fi
- LOG_INFO "步骤2: 检查yum源中是否有hitszbeamer软件包"
- if ! dnf search hitszbeamer | grep -q "hitszbeamer"; then
- LOG_ERROR "yum源中未找到hitszbeamer软件包"
- exit 255
- fi
- LOG_INFO "步骤3: 安装hitszbeamer(如果未安装)"
- if [ "$INSTALLED" = false ]; then
- dnf install -y hitszbeamer
- CHECK_RESULT $? 0 0 "安装hitszbeamer失败"
- LOG_INFO "hitszbeamer安装成功"
- fi
- LOG_INFO "步骤4: 测试应用不同主题选项"
- LOG_INFO "测试应用主题选项:theme=dark"
- hitszbeamer --theme=dark
- CHECK_RESULT $? 0 0 "应用dark主题失败"
- LOG_INFO "测试应用主题选项:theme=light"
- hitszbeamer --theme=light
- CHECK_RESULT $? 0 0 "应用light主题失败"
- LOG_INFO "测试应用主题选项:theme=colorful"
- hitszbeamer --theme=colorful
- CHECK_RESULT $? 0 0 "应用colorful主题失败"
- LOG_INFO "步骤5: 测试不支持的参数"
- LOG_INFO "测试不支持的参数:theme=invalid"
- hitszbeamer --theme=invalid
- if [ $? -eq 255 ]; then
- LOG_INFO "不支持的主题参数已正确处理"
- else
- LOG_ERROR "未正确处理不支持的主题参数"
- exit 255
- fi
- LOG_INFO "步骤6: 清理环境"
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "卸载hitszbeamer"
- dnf remove -y hitszbeamer
- CHECK_RESULT $? 0 0 "卸载hitszbeamer失败"
- LOG_INFO "hitszbeamer卸载成功"
- else
- LOG_INFO "保持hitszbeamer安装状态"
- fi
- LOG_INFO "测试完成"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/texlive-split-y/texlive-hitszbeamer/test_texlive-hitszbeamer_function_uninstall.sh b/testcases/function_test/pkg_test/texlive-split-y/texlive-hitszbeamer/test_texlive-hitszbeamer_function_uninstall.sh
deleted file mode 100644
index 17b168a9ab5..00000000000
--- a/testcases/function_test/pkg_test/texlive-split-y/texlive-hitszbeamer/test_texlive-hitszbeamer_function_uninstall.sh
+++ /dev/null
@@ -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-25
-# @License : Mulan PSL v2
-# @Desc : Test uninstallation of texlive-hitszbeamer package
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 检查是否以root用户运行
- if [[ $EUID -ne 0 ]]; then
- LOG_ERROR "请以root用户运行此脚本"
- exit 1
- fi
-
- LOG_INFO "开始测试卸载texlive-hitszbeamer包"
-
- # 步骤1:检查软件包是否在yum源中
- LOG_INFO "步骤1:检查yum源中是否存在texlive-hitszbeamer包"
- dnf list available texlive-hitszbeamer > /dev/null 2>&1
- if [[ $? -ne 0 ]]; then
- LOG_ERROR "yum源中未找到texlive-hitszbeamer包"
- exit 255
- fi
-
- # 步骤2:检查当前是否已安装
- LOG_INFO "步骤2:检查当前是否已安装texlive-hitszbeamer包"
- dnf list installed texlive-hitszbeamer > /dev/null 2>&1
- if [[ $? -eq 0 ]]; then
- LOG_INFO "检测到texlive-hitszbeamer已安装,测试结束后将保持安装状态"
- INSTALLED_BEFORE="yes"
- else
- LOG_INFO "未检测到texlive-hitszbeamer安装,将先安装再卸载"
- INSTALLED_BEFORE="no"
- fi
-
- # 步骤3:如果未安装,则先安装
- if [[ "$INSTALLED_BEFORE" == "no" ]]; then
- LOG_INFO "步骤3:安装texlive-hitszbeamer包"
- dnf install -y texlive-hitszbeamer
- CHECK_RESULT $? 0 0 "安装texlive-hitszbeamer失败"
- fi
-
- # 步骤4:验证安装成功
- LOG_INFO "步骤4:验证texlive-hitszbeamer包安装成功"
- dnf list installed texlive-hitszbeamer > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "texlive-hitszbeamer包未正确安装"
-
- # 步骤5:卸载软件包
- LOG_INFO "步骤5:卸载texlive-hitszbeamer包"
- dnf remove -y texlive-hitszbeamer
- CHECK_RESULT $? 0 0 "卸载texlive-hitszbeamer包失败"
-
- # 步骤6:验证卸载成功
- LOG_INFO "步骤6:验证texlive-hitszbeamer包已卸载"
- dnf list installed texlive-hitszbeamer > /dev/null 2>&1
- if [[ $? -eq 0 ]]; then
- LOG_ERROR "texlive-hitszbeamer包卸载后仍然存在"
- exit 1
- fi
- LOG_INFO "texlive-hitszbeamer包已成功卸载"
-
- # 步骤7:环境恢复
- LOG_INFO "步骤7:恢复测试环境"
- if [[ "$INSTALLED_BEFORE" == "yes" ]]; then
- LOG_INFO "重新安装texlive-hitszbeamer包以恢复到初始状态"
- dnf install -y texlive-hitszbeamer
- CHECK_RESULT $? 0 0 "重新安装texlive-hitszbeamer包失败"
- LOG_INFO "环境已恢复到初始安装状态"
- else
- LOG_INFO "环境已恢复到初始未安装状态"
- fi
-
- LOG_INFO "测试完成:texlive-hitszbeamer包卸载功能测试成功"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/texlive-split-z/texlive-xtab/test_texlive-xtab_function_install.sh b/testcases/function_test/pkg_test/texlive-split-z/texlive-xtab/test_texlive-xtab_function_install.sh
deleted file mode 100644
index b6992ea38d4..00000000000
--- a/testcases/function_test/pkg_test/texlive-split-z/texlive-xtab/test_texlive-xtab_function_install.sh
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/bash
-
-# Copyright (c) 2024 ISCAS .ALL rights reserved.
-# This program is licensed under Mulan PSL v2.
-# You can use it according to the terms and conditions of the Mulan PSL v2.
-# http://license.coscl.org.cn/MulanPSL2
-# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
-# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
-# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
-# See the Mulan PSL v2 for more details.
-
-# #############################################
-# @Author : honghua
-# @Contact : honghua@iscas.ac.cn
-# @Date : 2025-10-05
-# @License : Mulan PSL v2
-# @Desc : Test package installation
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- # 测试脚本:test_texlive-xtab_function_install
-
- LOG_INFO "开始测试:Test package installation"
-
- # 检查是否已安装texlive-xtab
- LOG_INFO "检查texlive-xtab是否已安装"
- rpm -q texlive-xtab > /dev/null 2>&1
- if [ $? -eq 0 ]; then
- LOG_INFO "texlive-xtab已安装,跳过安装步骤"
- installed=true
- else
- installed=false
- fi
-
- # 检查yum源中是否有texlive-xtab软件包
- LOG_INFO "检查yum源中是否有texlive-xtab软件包"
- dnf list available texlive-xtab > /dev/null 2>&1
- CHECK_RESULT $? 0 255 "yum源中未找到texlive-xtab软件包"
-
- # 安装texlive-xtab
- if [ "$installed" = false ]; then
- LOG_INFO "开始安装texlive-xtab"
- dnf install -y texlive-xtab > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "安装texlive-xtab失败"
- fi
-
- # 测试命令功能
- LOG_INFO "测试texlive-xtab功能"
- some_command_related_to_texlive_xtab > /dev/null 2>&1
- CHECK_RESULT $? 0 255 "命令参数不支持或不存在"
-
- # 清理环境
- if [ "$installed" = false ]; then
- LOG_INFO "卸载texlive-xtab"
- dnf remove -y texlive-xtab > /dev/null 2>&1
- CHECK_RESULT $? 0 0 "卸载texlive-xtab失败"
- fi
-
- LOG_INFO "测试完成:Test package installation"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/xstream/xstream-javadoc/test_xstream-javadoc_function_parse.sh b/testcases/function_test/pkg_test/xstream/xstream-javadoc/test_xstream-javadoc_function_parse.sh
deleted file mode 100644
index f17eebab2a6..00000000000
--- a/testcases/function_test/pkg_test/xstream/xstream-javadoc/test_xstream-javadoc_function_parse.sh
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/bash
-
-# Copyright (c) 2024 ISCAS .ALL rights reserved.
-# This program is licensed under Mulan PSL v2.
-# You can use it according to the terms and conditions of the Mulan PSL v2.
-# http://license.coscl.org.cn/MulanPSL2
-# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
-# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
-# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
-# See the Mulan PSL v2 for more details.
-
-# #############################################
-# @Author : honghua
-# @Contact : honghua@iscas.ac.cn
-# @Date : 2025-11-29
-# @License : Mulan PSL v2
-# @Desc : Test parsing functionality
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试xstream-javadoc的解析功能"
-
- # 检查是否已安装xstream-javadoc
- LOG_INFO "检查xstream-javadoc是否已安装"
- if dnf list installed xstream-javadoc &>/dev/null; then
- LOG_INFO "xstream-javadoc已安装,跳过安装步骤"
- INSTALLED=true
- else
- LOG_INFO "xstream-javadoc未安装,准备安装"
- INSTALLED=false
- fi
-
- # 检查yum源中是否有xstream-javadoc
- LOG_INFO "检查yum源中是否有xstream-javadoc"
- if ! dnf list available xstream-javadoc &>/dev/null; then
- LOG_ERROR "yum源中未找到xstream-javadoc软件包"
- exit 255
- fi
-
- # 如果未安装,则安装软件包
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "正在安装xstream-javadoc"
- dnf install -y xstream-javadoc
- CHECK_RESULT $? 0 0 "安装xstream-javadoc失败"
- fi
-
- # 测试解析功能
- LOG_INFO "测试解析功能"
- java -jar /usr/share/xstream-javadoc/xstream-javadoc.jar parse --input test.xml --output test.json
- CHECK_RESULT $? 0 0 "解析功能测试失败"
-
- # 清理环境:如果脚本开始时未安装,则卸载软件包
- if [ "$INSTALLED" = false ]; then
- LOG_INFO "卸载xstream-javadoc"
- dnf remove -y xstream-javadoc
- CHECK_RESULT $? 0 0 "卸载xstream-javadoc失败"
- fi
-
- LOG_INFO "测试完成,环境已恢复"
-}
-
-main "$@"
\ No newline at end of file
diff --git a/testcases/function_test/pkg_test/xstream/xstream-javadoc/test_xstream-javadoc_function_serialize.sh b/testcases/function_test/pkg_test/xstream/xstream-javadoc/test_xstream-javadoc_function_serialize.sh
deleted file mode 100644
index 8cb7027ea8b..00000000000
--- a/testcases/function_test/pkg_test/xstream/xstream-javadoc/test_xstream-javadoc_function_serialize.sh
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/bash
-
-# Copyright (c) 2024 ISCAS .ALL rights reserved.
-# This program is licensed under Mulan PSL v2.
-# You can use it according to the terms and conditions of the Mulan PSL v2.
-# http://license.coscl.org.cn/MulanPSL2
-# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
-# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
-# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
-# See the Mulan PSL v2 for more details.
-
-# #############################################
-# @Author : honghua
-# @Contact : honghua@iscas.ac.cn
-# @Date : 2025-12-09
-# @License : Mulan PSL v2
-# @Desc : Test serialization functionality
-# ############################################
-
-source "$OET_PATH/libs/locallibs/common_lib.sh"
-
-function run_test() {
- LOG_INFO "开始测试序列化功能"
-
- # 检查是否已安装xstream-javadoc软件包
- LOG_INFO "检查xstream-javadoc是否已安装"
- if dnf list installed xstream-javadoc &>/dev/null; then
- LOG_INFO "xstream-javadoc已安装,跳过安装步骤"
- installed=true
- else
- LOG_INFO "xstream-javadoc未安装,准备安装"
- installed=false
- fi
-
- # 检查yum源中是否有xstream-javadoc软件包
- LOG_INFO "检查yum源中是否有xstream-javadoc"
- if ! dnf list available xstream-javadoc &>/dev/null; then
- LOG_ERROR "yum源中未找到xstream-javadoc软件包"
- exit 255
- fi
-
- # 如果未安装,则安装软件包
- if [ "$installed" = false ]; then
- LOG_INFO "安装xstream-javadoc"
- dnf install -y xstream-javadoc
- CHECK_RESULT $? 0 0 "安装xstream-javadoc失败"
- fi
-
- # 测试序列化功能
- LOG_INFO "测试序列化功能"
- java -cp /usr/share/java/xstream.jar com.thoughtworks.xstream.XStream
- CHECK_RESULT $? 0 0 "序列化功能测试失败"
-
- # 清理环境
- if [ "$installed" = false ]; then
- LOG_INFO "卸载xstream-javadoc"
- dnf remove -y xstream-javadoc
- CHECK_RESULT $? 0 0 "卸载xstream-javadoc失败"
- fi
-
- LOG_INFO "测试序列化功能完成"
-}
-
-main "$@"
\ No newline at end of file