osrm-backend/scripts/bisect_cucumber.sh

29 lines
781 B
Bash
Raw Normal View History

#!/usr/bin/env bash
2016-10-18 17:05:20 -04:00
set -o errexit
set -o pipefail
set -o nounset
# Automates bisecting cucumber tests in a portable way; usage:
#
# git bisect start GOODGITSHA BADGITSHA
# git bisect run /path/to/bisect_cucumber.sh
#
# XXX: store this file outside source control first, e.g. by copying it over
# to /tmp, otherwise jumping through commits will change this script, too.
BUILD_DIR=build
cmake -E remove_directory $BUILD_DIR
cmake -E make_directory $BUILD_DIR
cmake -E chdir $BUILD_DIR cmake .. -DCMAKE_BUILD_TYPE=Release
cmake -E chdir $BUILD_DIR cmake --build .
cucumber -p verify
# notes on the return codes git bisect understands:
# - exit code 0 means okay
# - exit code 125 means skip this commit and try a commit nearby
# - every other exit code means bad