[prev in list] [next in list] [prev in thread] [next in thread] 

List:       libverto-commits
Subject:    [libverto] [tests/abi] make this test work on OpenBSD
From:       npmccallum () fedoraproject ! org (Nathaniel McCallum)
Date:       2011-07-06 18:17:44
Message-ID: 20110706181755.D94D31201BE () lists ! fedorahosted ! org
[Download RAW message or body]

commit 4a8c00ad5ab97372ab37973d1acf081d86878678
Author: Nathaniel McCallum <npmccallum at redhat.com>
Date:   Wed Jul 6 14:16:07 2011 -0400

    [tests/abi] make this test work on OpenBSD

 tests/Makefile.am |    2 +-
 tests/abi         |   11 ++++++++++-
 2 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index f8249da..bcf33c4 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -19,4 +19,4 @@ endif
 check_PROGRAMS = timeout idle child signal read write
 EXTRA_DIST     = test.h abi
 TESTS = abi $(check_PROGRAMS)
-TESTS_ENVIRONMENT = env LIBVERTO=$(top_builddir)/src/.libs/libverto.so
+TESTS_ENVIRONMENT = env LIBVERTO=$(abs_top_builddir)/src/.libs/libverto.so*
diff --git a/tests/abi b/tests/abi
index e649c98..0a93960 100755
--- a/tests/abi
+++ b/tests/abi
@@ -1,6 +1,15 @@
 #!/bin/sh -e
 
 echo "Library Path: $LIBVERTO" >&2
+echo -n "Hash: "
+if which md5sum 2>/dev/null; then
+  HASHCMD="md5sum"
+elif which md5; then
+  HASHCMD="md5"
+else
+  echo "ERROR!"
+  exit 1
+fi
 
-HASH=`nm -g $LIBVERTO | awk '/^[0-9a-fA-F]+ T / { print $NF; }' | sort -u | md5sum | cut -d' ' -f1`
+HASH=`nm -g $LIBVERTO | awk '/^[0-9a-fA-F]+ T / { print $NF; }' | sort -u | $HASHCMD | cut -d' ' -f1`
 test $HASH == 6910468a2981605ab75fd3c21150e400

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic