testing: Copy comments to test log

This commit is contained in:
Tobias Brunner
2022-04-14 18:42:01 +02:00
parent b67f7fb861
commit 994d9d37d4
+16 -3
View File
@@ -406,7 +406,11 @@ do
echo -e "\nPRE-TEST\n" >> $CONSOLE_LOG 2>&1 echo -e "\nPRE-TEST\n" >> $CONSOLE_LOG 2>&1
eval `awk -F "::" '{ eval `awk -F "::" '{
if ($1 !~ /^#.*/ && $2 != "") if ($0 ~ /^#.*/)
{
printf("echo \"%s\"; ", $0);
}
else if ($2 != "")
{ {
printf("echo \"$(print_time)%s# %s\"; ", $1, $2) printf("echo \"$(print_time)%s# %s\"; ", $1, $2)
printf("ssh \044SSHCONF root@\044ipv4_%s \"%s\"; ", $1, $2) printf("ssh \044SSHCONF root@\044ipv4_%s \"%s\"; ", $1, $2)
@@ -443,7 +447,12 @@ do
command=$2 command=$2
pattern=$3 pattern=$3
hit=$4 hit=$4
if (host ~ /^#.*/ || command == "") if ($0 ~ /^#.*/)
{
printf("echo \"%s\"; ", $0);
next
}
else if (command == "")
{ {
next next
} }
@@ -766,7 +775,11 @@ do
echo -e "\nPOST-TEST\n" >> $CONSOLE_LOG 2>&1 echo -e "\nPOST-TEST\n" >> $CONSOLE_LOG 2>&1
eval `awk -F "::" '{ eval `awk -F "::" '{
if ($1 !~ /^#.*/ && $2 != "") if ($0 ~ /^#.*/)
{
printf("echo \"%s\"; ", $0);
}
else if ($2 != "")
{ {
printf("echo \"$(print_time)%s# %s\"; ", $1, $2) printf("echo \"$(print_time)%s# %s\"; ", $1, $2)
printf("ssh \044SSHCONF root@\044ipv4_%s \"%s\"; ", $1, $2) printf("ssh \044SSHCONF root@\044ipv4_%s \"%s\"; ", $1, $2)