test/details.sh
author J. Ali Harlow <ali@juiblex.co.uk>
Fri Oct 17 09:57:19 2014 +0100 (2014-10-17)
changeset 456 bae5adee8c8c
parent 394 afe520f454bd
child 475 008c75a5e08d
permissions -rwxr-xr-x
Add facility to specify razor command when running tests.

This makes it easy to run under eg., valgrind as:

./details "libtool --mode=execute valgrind --leak-check=yes ../src/razor"
ali@394
     1
#!/bin/sh
ali@456
     2
if [ $# -gt 0 ]; then
ali@456
     3
    razor="$1"
ali@456
     4
else
ali@456
     5
    razor=../src/razor
ali@456
     6
fi
ali@394
     7
export RAZOR_ROOT=`mktemp -dt` || exit 1
ali@456
     8
$razor init || exit 1
ali@394
     9
export YUM_URL="file://localhost/`pwd`"
ali@456
    10
$razor import-yum || exit 1
ali@456
    11
$razor install zsh2 || exit 1
ali@456
    12
$razor info zsh2 > details.out || exit 1
ali@394
    13
diff -u $srcdir/details.ref details.out || exit 1
ali@394
    14
rm -rf "$RAZOR_ROOT"