tests: Fixed PMD tests on Windows
authorPaul Boca <pboca@cloudbasesolutions.com>
Sun, 26 Jun 2016 12:12:23 +0000 (12:12 +0000)
committerGurucharan Shetty <guru@ovn.org>
Tue, 28 Jun 2016 15:12:46 +0000 (08:12 -0700)
CHECK_CPU_DISCOVERED check the log file now, not the stderr.
On Windows the ovs-vswitchd output is logged only in log file, not to stderr.
Tested both on Windows and Linux

Signed-off-by: Paul-Daniel Boca <pboca@cloudbasesolutions.com>
Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Signed-off-by: Gurucharan Shetty <guru@ovn.org>
tests/pmd.at

index ce22583..3216762 100644 (file)
@@ -25,8 +25,8 @@ dnl is greater or equal to 'n_cpu'. Without parameters checks that at
 dnl least one CPU discovered.
 m4_define([CHECK_CPU_DISCOVERED], [
     PATTERN="Discovered [[0-9]]* NUMA nodes and [[0-9]]* CPU cores"
-    OVS_WAIT_UNTIL([grep "$PATTERN" stderr])
-    N_CPU=$(grep "$PATTERN" stderr | sed -e 's/.* \([[0-9]]*\) CPU cores/\1/')
+    OVS_WAIT_UNTIL([grep "$PATTERN" ovs-vswitchd.log])
+    N_CPU=$(grep "$PATTERN" ovs-vswitchd.log | sed -e 's/.* \([[0-9]]*\) CPU cores/\1/')
     if [[ -z "$1" ]]
         then AT_CHECK([test "$N_CPU" -gt "0"])
         else AT_SKIP_IF([test "$N_CPU" -lt "$1"])