summaryrefslogtreecommitdiff
path: root/FS-Test/bin/freeside-test-run
blob: 853bdc9a8275307be453d36c17adc7f458b4b862 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash

set -ae

tempdir=$( mktemp -d --tmpdir freeside-test.XXXX )
# get the parent directory of bin/(this script)
testroot=$( dirname ${BASH_SOURCE[0]} )
testroot=$( cd $testroot; cd ..; pwd )

echo "Starting test mode."
$testroot/bin/freeside-test-start
echo "Saving results to $tempdir."
$testroot/bin/freeside-test-fetch -d $tempdir
echo "Exiting test mode."
$testroot/bin/freeside-test-stop || true

diffname=freeside-test.`date +%Y%m%d`.diff
echo "Writing diff to $diffname."
diff -urb "$testroot/share/output" "$tempdir" > $diffname
diffstat -C $diffname