diff options
author | Gurucharan Shetty <gshetty@nicira.com> | 2014-05-27 07:55:31 -0700 |
---|---|---|
committer | Gurucharan Shetty <gshetty@nicira.com> | 2014-06-24 09:44:55 -0700 |
commit | 784acd821b8f4e4be12e91d4d80b15880c297a7d (patch) | |
tree | 68b691bd86b11109ccccfa2595dde5c46639f208 /tests/library.at | |
parent | 64559798f85900cbacd6abd76accc5d17a206bef (diff) | |
download | openvswitch-784acd821b8f4e4be12e91d4d80b15880c297a7d.tar.gz |
test-util: Changes for 'assert' test on Windows.
There is no 'kill -l' type functionality available on Windows.
So instead of looking for the string 'ABRT', check for the exit
code in both platforms. On msys (unit test environment), it is 9
and on Linux, it is 134 (SIGABRT + 128).
On Windows, stderr is fully buffered if connected to a pipe.
Make it _IONBF so that an abort does not miss log contents.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'tests/library.at')
-rw-r--r-- | tests/library.at | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/library.at b/tests/library.at index a94ee5c4e..a5dfd82ba 100644 --- a/tests/library.at +++ b/tests/library.at @@ -175,9 +175,14 @@ AT_CLEANUP AT_SETUP([ovs_assert]) OVS_LOGDIR=`pwd`; export OVS_LOGDIR -AT_CHECK([ovstest test-util -voff -vfile:info '-vPATTERN:file:%c|%p|%m' --log-file assert || kill -l $?], - [0], [ABRT -], [stderr]) +if test "$IS_WIN32" = "yes"; then + exit_status=9 +else + # SIGABRT + 128 + exit_status=134 +fi +AT_CHECK([ovstest test-util -voff -vfile:info '-vPATTERN:file:%c|%p|%m' --log-file assert], + [$exit_status], [], [stderr]) AT_CHECK([sed 's/\(opened log file\) .*/\1/ s/|[[^|]]*: /|/' test-util.log], [0], [dnl |