testsuite.at: Workaround for carriage returns on windows.
authorGurucharan Shetty <gshetty@nicira.com>
Fri, 18 Apr 2014 16:00:46 +0000 (09:00 -0700)
committerGurucharan Shetty <gshetty@nicira.com>
Tue, 22 Apr 2014 22:21:13 +0000 (15:21 -0700)
In unit tests, we compare text written in logs or stdout/stderr
to figure out the success or failure of tests. In Windows,
since new line is represented by CR+LF, autoconf tests run in
MinGW environment fail.

Asking diff to ignore trailing carriage returns is one way
to solve the problem

Suggested-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
tests/testsuite.at

index 85c50d1..264a15f 100644 (file)
@@ -47,6 +47,10 @@ if test "$IS_WIN32" = "yes"; then
         command pwd -W "$@"
     }
 
+    diff () {
+        command diff --strip-trailing-cr "$@"
+    }
+
     kill () {
         case "$1" in
             -0)