diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-05-27 01:32:55 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-05-27 01:32:55 -0400 |
commit | b0b29df10764cecee365815476d83641e668b408 (patch) | |
tree | a209aabcda0c925b05f9a745679492dc35452bbf /test/runtests | |
parent | f6ccc7caa1d80c7a2fcc6486f872d54468d265dc (diff) |
Add (roundup-based) unit-test framework, tests for pkgbuild-check-nonfree
Diffstat (limited to 'test/runtests')
-rwxr-xr-x | test/runtests | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/runtests b/test/runtests new file mode 100755 index 0000000..7410032 --- /dev/null +++ b/test/runtests @@ -0,0 +1,23 @@ +#!/bin/bash + +# Set up the install to work with +destdir=$(mktemp --tmpdir -d libretools-test-destdir.XXXXXXXXXX) +make -C .. install DESTDIR=$destdir &>/dev/null || { + echo 'error creating local install, cannot run tests' + exit 1 +} +export PATH="$destdir/usr/bin:$destdir/usr/sbin:$PATH" +export LIBRETOOLS_LIBDIR="$destdir/usr/lib/libretools" + +# Set up the user profile +home=$(mktemp --tmpdir -d libretools-test-home.XXXXXXXXXX) +export XDG_CACHE_HOME="$home/.cache" +export XDG_CONFIG_HOME="$home/.config" + +# Run the tests +roundup +ret=$? + +# Clean up +rm -rf -- "$destdir" "$testhome" +exit $ret |