Skip to content

Commit

Permalink
Add a script to sanity check out of repo builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
dak180 committed Nov 18, 2016
1 parent 8b81a26 commit 3377d73
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
5 changes: 5 additions & 0 deletions NEWS
@@ -1,5 +1,10 @@
autorevision history

1.17 @ 2016-11-18:
Fix out of repo operation.
Bring back the irc channel.
Add a script to sanity check out of repo operation.

1.16 @ 2016-11-15:
Try to eliminate stray error output.
Allow the VCS_EXTRA symbol to be renamed.
Expand Down
33 changes: 33 additions & 0 deletions test.sh
@@ -0,0 +1,33 @@
#!/bin/bash

# This test script makes a number of assumptions about its enviroment
# and therfore is not meant to be portable or even to be run from
# outside Autorevision's repository.

# Prep
set -e
make tarball

# Configure
testPath="$(cd "$(dirname "$0")"; pwd -P)"
vers="$(./autorevision -fo ./autorevision.cache -s VCS_TAG | sed -e 's:v/::')"
tdir="autorevision-${vers}"
tarball="${tdir}.tgz"
tmpdir="$(mktemp -dqt autorevision)"


# Copy the tarball to a temp directory
cp -a "${tarball}" "${tmpdir}"

cd "${tmpdir}"

# Decompress
tar -xf "${tarball}"

cd "${tdir}"

# Poke it to see it does anything
make clean

# Compare the results
cmp -s "autorevision.cache" "${testPath}/autorevision.cache"

0 comments on commit 3377d73

Please sign in to comment.