Skip to content

Commit 3377d73

Browse files
committed
Add a script to sanity check out of repo builds.
1 parent 8b81a26 commit 3377d73

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

NEWS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
autorevision history
22

3+
1.17 @ 2016-11-18:
4+
Fix out of repo operation.
5+
Bring back the irc channel.
6+
Add a script to sanity check out of repo operation.
7+
38
1.16 @ 2016-11-15:
49
Try to eliminate stray error output.
510
Allow the VCS_EXTRA symbol to be renamed.

test.sh

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/bash
2+
3+
# This test script makes a number of assumptions about its enviroment
4+
# and therfore is not meant to be portable or even to be run from
5+
# outside Autorevision's repository.
6+
7+
# Prep
8+
set -e
9+
make tarball
10+
11+
# Configure
12+
testPath="$(cd "$(dirname "$0")"; pwd -P)"
13+
vers="$(./autorevision -fo ./autorevision.cache -s VCS_TAG | sed -e 's:v/::')"
14+
tdir="autorevision-${vers}"
15+
tarball="${tdir}.tgz"
16+
tmpdir="$(mktemp -dqt autorevision)"
17+
18+
19+
# Copy the tarball to a temp directory
20+
cp -a "${tarball}" "${tmpdir}"
21+
22+
cd "${tmpdir}"
23+
24+
# Decompress
25+
tar -xf "${tarball}"
26+
27+
cd "${tdir}"
28+
29+
# Poke it to see it does anything
30+
make clean
31+
32+
# Compare the results
33+
cmp -s "autorevision.cache" "${testPath}/autorevision.cache"

0 commit comments

Comments
 (0)