shipping transition script; requiring manual version synchronization between common...
[monkeysphere.git] / tests / basic
index 9ae9c1caaaa77237c5a5aff0947b5284572b5971..dea393fc391b6b662168775ff283577848326bcc 100755 (executable)
@@ -26,6 +26,7 @@ source "$TESTDIR"/common
 ## test has *more* requirements than plain ol' monkeysphere:
 which socat >/dev/null || { echo "You must have socat installed to run this test." ; exit 1; }
 
+
 ## FIXME: other checks?
 
 ######################################################################
@@ -123,6 +124,21 @@ export SOCKET="$TEMPDIR"/ssh-socket
 # *anything* with any running X11 session.
 export DISPLAY=monkeys
 
+## make sure that the version number matches the debian changelog
+## (don't bother if this is being run from the tests).
+
+if [ -f "$TESTDIR"/../packaging/debian/changelog ]; then
+    echo "##################################################"
+    echo "### checking version string match..."
+    repver=$(monkeysphere version)
+    debver=$(head -n1 "$TESTDIR"/../packaging/debian/changelog | sed 's/.*(\([^-]*\)-.*/\1/')
+    if [ "$repver" = "$debver" ] ; then
+       echo "Versions match!"
+    else
+       printf "reported version string (%s) does not match debian changelog (%s)\n" "$repver" "$debver"
+       exit 1
+    fi
+fi
 
 ######################################################################
 ### CONFIGURE ENVIRONMENTS