Skip to content

Instantly share code, notes, and snippets.

@earl

earl/cmp Secret

Created February 17, 2014 01:14
Show Gist options
  • Save earl/4130ce0b7915a9df2a92 to your computer and use it in GitHub Desktop.
Save earl/4130ce0b7915a9df2a92 to your computer and use it in GitHub Desktop.
rebol-test helper scripts for Linux
#!/bin/bash
REFERENCE=$1
SUBJECT=$2
function get_log () {
awk '/log file:/ {print $NF}'
}
HERE=$(dirname $0)
$HERE/run $REFERENCE
$HERE/run $SUBJECT
REFERENCE_LOG=`$HERE/run $REFERENCE | get_log`
SUBJECT_LOG=`$HERE/run $SUBJECT | get_log`
# @@ Remove the %-neccessity (needs a fix in log-diff.r).
cd $HERE
rebol3 log-diff.r %$REFERENCE_LOG %$SUBJECT_LOG
#!/bin/bash
cd $(dirname $0)
./cmp ../make/r3{-master,}
#!/bin/bash
if [ $# != 1 ]; then
echo "Usage: $0 command" >&2
exit 64
fi
SUBJECT=$(readlink -f $(which $1))
if [ $? -ne 0 ]; then
echo "Error: test subject '$1' not found." >&2
exit 1
fi
cd $(dirname $0)
until echo "quit/now/return 1" | $SUBJECT run-recover.r; do
echo "Restarting ..."
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment