X-Git-Url: https://git.strongswan.org/?p=strongswan.git;a=blobdiff_plain;f=testing%2Fdo-tests;h=354dff176871d7f1c4edb60e799702b23507690f;hp=5b477532e9ee78ec4f45f26d5be902eec8daff79;hb=9b1f4540c6ae13e9eb4dfe7b2119a193d98b9652;hpb=d9a883c337ac8bfd51a2e8650eb4b2ed0740e1c2 diff --git a/testing/do-tests b/testing/do-tests index 5b47753..354dff1 100755 --- a/testing/do-tests +++ b/testing/do-tests @@ -314,6 +314,19 @@ do printf("echo \"%s# cat /tmp/tcpdump.log | grep \047%s\047 [%s]\"; ", host, pattern, hit) printf("ssh root@\044ipv4_%s cat /tmp/tcpdump.log | grep \"%s\"; ", host, pattern) } + else if (command == "tcpdumpcount") + { + printf("if [ \044TDUP_%s == \"true\" ]; then stop_tcpdump %s; fi; \n", host, host) + printf("echo -e \"%s# [ \\\\140cat /tmp/tcpdump.log | grep \047%s\047 | tee -a /dev/stderr | wc -l\\\\140 -eq %s ] [YES]\"; ", host, pattern, hit) + printf("tcpdumpcount=\`ssh root@\044ipv4_%s cat /tmp/tcpdump.log | grep \"%s\" | tee -a /dev/stderr | wc -l\`; ", host, pattern) + printf("[ \044tcpdumpcount -eq %s ]; ", hit) + hit="YES" + } + else if (command == "cmd") + { + printf("echo \"%s# %s [%s]\"; ", host, pattern, hit) + printf("ssh root@\044ipv4_%s %s; ", host, pattern) + } else { printf("echo \"%s# %s | grep \047%s\047 [%s]\"; ", host, command, pattern, hit) @@ -363,7 +376,7 @@ do
-