Commit 6063cfe3 authored by Ryan Thompson's avatar Ryan Thompson

Merge pull request #550 from DarwinAwardWinner/scripted-testing

Add a some simple bash scripts for easily running tests
parents a83623a9 e3940b3e
#!/bin/sh
cd "$(dirname "$0")"
exec ./run-test.sh el-get-*.el 2>/dev/null
#!/bin/bash
if [ -z "$1" ]; then
echo "Usage: $0 testfile1 [testfile2 ...]"
exit 0
fi
set_default () {
eval "
if [ -z \$$1 ]; then
$1=$2
fi
"
}
set_default EL_GET_LIB_DIR "$(dirname "$(dirname "$(readlink -f "$0")")")"
set_default TMPDIR "$(dirname "$(mktemp --dry-run)")"
set_default TEST_HOME "$TMPDIR/el-get-test-home"
set_default EMACS "$(which emacs)"
run_test () {
testfile="$1"
echo "*** Running el-get test $testfile ***"
mkdir -p "$TEST_HOME"/.emacs.d
rm -rf "$TEST_HOME"/.emacs.d/el-get/
HOME="$TEST_HOME" "$EMACS" -Q -batch -L "$EL_GET_LIB_DIR" -l "$testfile"
result="$?"
if [ "$result" = 0 ]; then
echo "*** SUCCESS $testfile ***"
else
echo "*** FAILED $testfile ***"
fi
}
for t in "$@"; do
run_test "$t"
done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment