Created
February 24, 2014 10:56
-
-
Save krisleech/9185616 to your computer and use it in GitHub Desktop.
Get list of cukes failing in one branch but not another using output from CI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# manual steps | |
# Download raw output of master cuke to master-cuke-ci.raw as plain text | |
# Download raw output of another cuke branch to branch-cuke-js.raw as plain text | |
set -e | |
MASTER_RAW_FILE=master-cukes-ci.raw | |
BRANCH_RAW_FILE=branch-cukes-ci.raw | |
MASTER_FAILS_FILE=master-cukes-ci.fails | |
BRANCH_FAILS_FILE=branch-cukes-ci.fails | |
RESULTS_FILE=fails-in-branch-not-in-master | |
if [ ! -f "./${MASTER_RAW_FILE}" ]; then | |
echo "Download raw output of master cuke to ${MASTER_RAW_FILE} as plain text" | |
exit 0 | |
fi | |
if [ ! -f "./${BRANCH_RAW_FILE}" ]; then | |
echo "Download raw output of branch cuke to ${BRANCH_RAW_FILE} as plain text" | |
exit 0 | |
fi | |
awk '/Failing Scenarios/' RS= $MASTER_RAW_FILE | sed '/Failing Scenarios:/d' > $MASTER_FAILS_FILE | |
awk '/Failing Scenarios/' RS= $BRANCH_RAW_FILE | sed '/Failing Scenarios:/d' > $BRANCH_FAILS_FILE | |
# 1=left, 2= right, 3=both | |
comm -23 $BRANCH_FAILS_FILE $MASTER_FAILS_FILE > $RESULTS_FILE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment