hiredis: change ptest output format

This change consolidates the output format of the ptest command
into a single common format.
The format selected is the automake "simple test" format:
    "result: testname"

Signed-off-by: Zhang Peng <peng.zhang1.cn@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Zhang Peng 2024-06-17 13:02:30 +08:00 committed by Khem Raj
parent 9a9c0e6299
commit 7523f0d41c
No known key found for this signature in database
GPG Key ID: BB053355919D3314

View File

@ -1,3 +1,18 @@
#!/bin/sh
TEST_SSL=0 TEST_ASYNC=0 ./test.sh
TEST_SSL=0 TEST_ASYNC=0 ./test.sh | sed -e 's/PASSED/PASS/g' -e 's/FAILED/FAIL/g' -e 's/SKIPPED/SKIP/g' | awk '
{
if ($NF == "\033[0;32mPASS\033[0;0m" || $NF == "\033[0;31mFAIL\033[0;0m" || $NF == "\033[01;33mSKIP\033[0;0m") {
printf "%s: %s\n", $NF, $0
} else {
print
}
}'| awk '{
if ($NF == "\033[0;32mPASS\033[0;0m" || $NF == "\033[0;31mFAIL\033[0;0m" || $NF == "\033[01;33mSKIP\033[0;0m") {
$NF = ""
print $0
} else {
print
}
}' | awk '{gsub(/:/,"",$NF)}1'