-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a script to sanity check out of repo builds.
- Loading branch information
Showing
2 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |