Check-in [8478fd8cdc]
Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | - add tests |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
8478fd8cdcff9ca303e54d238383e91c |
| User & Date: | jls@semicomplete.com 2011-09-06 01:30:39 |
Context
|
2011-09-06
| ||
| 01:39 | - add more tests - better test running check-in: ab369b83eb user: jls@semicomplete.com tags: trunk | |
| 01:30 | - add tests check-in: 8478fd8cdc user: jls@semicomplete.com tags: trunk | |
|
2011-09-04
| ||
| 19:54 | Merge pull request #101 from kwilczynski/custom_v0.3.7 Fix name of the variable. check-in: f00e3e0062 user: jls@semicomplete.com tags: trunk | |
Changes
Added test/dir-deb-with-prefix.out.
> > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ./ ./opt/ ./opt/foo/ ./opt/foo/bar/ ./opt/foo/bar/a/ ./opt/foo/bar/a/e/ ./opt/foo/bar/a/d/ ./opt/foo/bar/a/d/hello ./opt/foo/bar/a/f/ ./opt/foo/bar/a/hello ./opt/foo/bar/b/ ./opt/foo/bar/b/e/ ./opt/foo/bar/b/d/ ./opt/foo/bar/b/f/ ./opt/foo/bar/c/ ./opt/foo/bar/c/e/ ./opt/foo/bar/c/d/ ./opt/foo/bar/c/d/hello ./opt/foo/bar/c/f/ |
Added test/dir-deb-with-prefix.test.
> > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
#!/bin/sh
run() {
mkdir -p $tmpdir/{a,b,c}/{d,e,f}
touch $tmpdir/a/hello
touch $tmpdir/a/d/hello
touch $tmpdir/c/d/hello
prefix=/opt/foo/bar
fpm -s dir -t deb -n testing -a all --prefix $prefix -C $tmpdir
file=testing_1.0_all.deb
dpkg -c $file | fex '{6:}' > $output
rm $file
}
|
Added test/dir-rpm-with-prefix.out.
> > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | /opt/foo/bar /opt/foo/bar/a /opt/foo/bar/a/d /opt/foo/bar/a/d/hello /opt/foo/bar/a/e /opt/foo/bar/a/f /opt/foo/bar/a/hello /opt/foo/bar/b /opt/foo/bar/b/d /opt/foo/bar/b/e /opt/foo/bar/b/f /opt/foo/bar/c /opt/foo/bar/c/d /opt/foo/bar/c/d/hello /opt/foo/bar/c/e /opt/foo/bar/c/f |
Added test/dir-rpm-with-prefix.test.
> > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
#!/bin/sh
run() {
mkdir -p $tmpdir/{a,b,c}/{d,e,f}
touch $tmpdir/a/hello
touch $tmpdir/a/d/hello
touch $tmpdir/c/d/hello
prefix=/opt/foo/bar
fpm -s dir -t rpm -n testing -a all --prefix $prefix -C $tmpdir
rpm -qlp testing-1.0.noarch.rpm > $output
rm testing-1.0.noarch.rpm
}
|
Added test/test.sh.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
#!/bin/sh
fpm() {
../bin/fpm "$@" > $debugout 2> $debugerr
}
cleanup() {
rm -f $tmpout $debugout $debugerr
[ ! -z "$tmpdir" ] && rm -r $tmpdir
}
main() {
set -e
test="$1"
tmpdir=$(mktemp -d)
debugout=$(mktemp)
debugerr=$(mktemp)
output=$(mktemp)
expected=${1%.test}.out
echo "Loading $test"
. "./$test"
# Run the test.
run
# Compare output
diff -u $output $expected
diffstatus=$?
cleanup
if [ $diffstatus -ne 0 ] ; then
echo "Fail: $test"
echo "FPM STDOUT"
cat $debugout
echo "FPM STDERR"
cat $debugerr
return 1
else
echo "OK: $test"
return 0
fi
}
main "$@"
|