#!/bin/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 '
{
    gsub(/\x1B\[[0-9;]*m/, "")
    if ($NF == "PASS" || $NF == "FAIL" || $NF == "SKIP") {
        printf "%s: %s\n", $NF, $0
    } else {
        print
    }
}' | awk '{
    if ($NF == "PASS" || $NF == "FAIL" || $NF == "SKIP") {
        $NF = ""
        print $0
    } else {
        print
    }
}' | awk '{gsub(/:/,"",$NF)}1'
