Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 47 lines (39 sloc) 1.2 KB
#!/bin/bash
#
if [ ! -d "results" ]; then
echo "Please run this in the root directory!"
exit 1
fi
if [ $# -lt 5 -o $# -gt 6 ]; then
echo "Usage: $0 [--skip-diff] ghc-relative-path left-variant left-suffix right-variant right-suffix"
exit 1
fi
if [ $# -eq 6 ]; then
if [ $1 = "--skip-diff" ]; then
echo "OK skipping the diff step as requested.."
DIFF_COMMAND="echo diffmerge-series"
else
echo "Unknown flag: $1"
exit 1
fi
shift
else
DIFF_COMMAND=diffmerge-series
fi
TEST_PATH=$1
LEFT_VARIANT=$2
LEFT_SUFFIX=$3
RIGHT_VARIANT=$4
RIGHT_SUFFIX=$5
echo "Building left hand side.."
pushd "$LEFT_VARIANT/$TEST_PATH" || (echo "Could not find left test directory" && exit 2)
ghc-nofib-dump --split core $LEFT_SUFFIX
popd
echo "Building right hand side.."
pushd "$RIGHT_VARIANT/$TEST_PATH" || (echo "Could not find right test directory" && exit 2)
ghc-nofib-dump --split core $RIGHT_SUFFIX
popd
# Need to strip nofib/ from the test path if it exists..
STORED_AT_TEST_PATH=${TEST_PATH#nofib/}
echo "Showing results.."
$DIFF_COMMAND "results/code/$LEFT_VARIANT-$LEFT_SUFFIX/$STORED_AT_TEST_PATH/" "results/code/$RIGHT_VARIANT-$RIGHT_SUFFIX/$STORED_AT_TEST_PATH/"