From 9e8c9da5a05ed19e8b08d023ae07c32e47d5d019 Mon Sep 17 00:00:00 2001 From: Wenlong Zhang Date: Tue, 23 Jan 2024 01:31:39 +0000 Subject: [PATCH 1/2] modify the patch path for fio --- tests/fio/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fio/install.sh b/tests/fio/install.sh index a5690e9..009bd5d 100755 --- a/tests/fio/install.sh +++ b/tests/fio/install.sh @@ -19,7 +19,7 @@ build() fi # build fio from source code - patch -p1 < 0001-add-loongarch64-support-for-fio.patch + patch -p1 < $TONE_BM_SUITE_DIR/0001-add-loongarch64-support-for-fio.patch ./configure --prefix=$TONE_BM_RUN_DIR make -- Gitee From 3a8dac017737af7596db514d1ae278140bb34019 Mon Sep 17 00:00:00 2001 From: zhiqifeiyang Date: Thu, 1 Feb 2024 16:37:35 +0800 Subject: [PATCH 2/2] Add accelerator-test --- conf/functional/accelerator-test.conf | 3 +++ tests/accelerator-test/README.md | 35 +++++++++++++++++++++++++++ tests/accelerator-test/install.sh | 10 ++++++++ tests/accelerator-test/parse.awk | 12 +++++++++ tests/accelerator-test/run.sh | 34 ++++++++++++++++++++++++++ 5 files changed, 94 insertions(+) create mode 100644 conf/functional/accelerator-test.conf create mode 100644 tests/accelerator-test/README.md create mode 100755 tests/accelerator-test/install.sh create mode 100755 tests/accelerator-test/parse.awk create mode 100755 tests/accelerator-test/run.sh diff --git a/conf/functional/accelerator-test.conf b/conf/functional/accelerator-test.conf new file mode 100644 index 0000000..da151e8 --- /dev/null +++ b/conf/functional/accelerator-test.conf @@ -0,0 +1,3 @@ +case +qatzip_test +rocksdbnew_test diff --git a/tests/accelerator-test/README.md b/tests/accelerator-test/README.md new file mode 100644 index 0000000..dfb0b8f --- /dev/null +++ b/tests/accelerator-test/README.md @@ -0,0 +1,35 @@ +#accelerator-test + +## Description +accelerator测试. + +## Homepage +[https://codeup.aliyun.com/5f4e0dfe6207a1a8b17fa7cf/kangaroo-test/accelerator-test.git] + + +## Version +master + +## Category +functional + +## Parameters + +## Results + +## Manual Run +``` +1. 在测试脚本中使用全局变量 PKG_CI_ABS_RPM_URL 来引用被测试的 RPM 包。 + 环境变量 PKG_CI_ABS_RPM_URL 会在运行测试之前被设置,它包含了被测 RPM 包的 URL,例如 + PKG_CI_ABS_RPM_URL="https://abs.openanolis.cn/download/OpenAnolis/opa-fm-10.12.1.0.6-1.0.1.an8.src.rpm,https://abs.openanolis.cn/download/OpenAnolis/opa-fm/opa-fm-10.12.1.0.6-1.0.1.an8.x86_64.rpm" + +2. 执行以下命令运行所有测试用例: + ./runtest.sh -d ./tests + +3. 执行以下命令运行指定测试用例: + ./runtest.sh -d ./tests -t example1_test.sh -t example2_test.sh + +4. 执行以下命令运行指定标签的测试用例: + ./runtest.sh -d ./tests -o tag1 + +``` diff --git a/tests/accelerator-test/install.sh b/tests/accelerator-test/install.sh new file mode 100755 index 0000000..413fdca --- /dev/null +++ b/tests/accelerator-test/install.sh @@ -0,0 +1,10 @@ + +build() +{ + clone-accelerator-test +} + +install() +{ + cp -arf accelerator-test/* $TONE_BM_RUN_DIR +} diff --git a/tests/accelerator-test/parse.awk b/tests/accelerator-test/parse.awk new file mode 100755 index 0000000..2f79575 --- /dev/null +++ b/tests/accelerator-test/parse.awk @@ -0,0 +1,12 @@ +#!/usr/bin/awk -f + +/ Pass$/ { + printf("%s Pass\n", $1) +} +/ Fail$/ { + printf("%s Fail\n", $1) +} +/ Skip$/ { + printf("%s Skip\n", $1) +} + diff --git a/tests/accelerator-test/run.sh b/tests/accelerator-test/run.sh new file mode 100755 index 0000000..5109da7 --- /dev/null +++ b/tests/accelerator-test/run.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +setup(){ + [ -n "$PKG_CI_ABS_RPM_URL" ] || { + echo "PKG_CI_ABS_RPM_URL should not be empty!" + exit + } +} + +deal_log(){ + pushd $TONE_BM_RUN_DIR/logs + for log_deal in $(ls ./ | grep "_test.log") + do + local testcase=$(echo "$log_deal" | sed 's#.log##') + sed -i "s/^/${testcase}:/" $log_deal + done + popd +} + +run() +{ + if [ "$case" != "all" ];then + local testcase="${case}.sh" + bash ./runtest.sh -d ./tests -t $testcase + elif [ "$case" == "all" ];then + bash ./runtest.sh -d ./tests + fi + deal_log +} + +parse() +{ + $TONE_BM_SUITE_DIR/parse.awk $TONE_BM_RUN_DIR/logs/*_test.log +} -- Gitee