<commit_before>#!/bin/bash

# wrapper for selenium tests meant to increase the robustness of the Travis build.
# if the selenium tests fail on the first run, runs them again to make sure it
# wasn't just a random failure.

set +e

nosetests .
FIRST_RUN_STATUS=$?

if [[ $FIRST_RUN_STATUS -ne 0 ]]; then
    echo
    echo ============= FIRST SELENIUM RUN FAILED, RETRYING TO MAKE SURE ===============
    echo
    nosetests .
    SECOND_RUN_STATUS=$?
    if [[ $SECOND_RUN_STATUS -ne 0 ]]; then
        echo ============= SELENIUM TEST FAILED ON SECOND RUN ==============
        exit $SECOND_RUN_STATUS
    fi
else
    echo ============= SELENIUM TEST PASSED ON FIRST RUN ===============
    exit 0
fi

echo ============= SELENIUM TEST PASSED ON SECOND RUN ==============<commit_msg>add --stop option to selenium travis wrapper test run to make it fail faster<commit_after>#!/bin/bash

# wrapper for selenium tests meant to increase the robustness of the Travis build.
# if the selenium tests fail on the first run, runs them again to make sure it
# wasn't just a random failure.

set +e

nosetests --stop .
FIRST_RUN_STATUS=$?

if [[ $FIRST_RUN_STATUS -ne 0 ]]; then
    echo
    echo ============= FIRST SELENIUM RUN FAILED, RETRYING TO MAKE SURE ===============
    echo
    nosetests --stop .
    SECOND_RUN_STATUS=$?
    if [[ $SECOND_RUN_STATUS -ne 0 ]]; then
        echo ============= SELENIUM TEST FAILED ON SECOND RUN ==============
        exit $SECOND_RUN_STATUS
    fi
else
    echo ============= SELENIUM TEST PASSED ON FIRST RUN ===============
    exit 0
fi

echo ============= SELENIUM TEST PASSED ON SECOND RUN ==============
{'fraction_non_alphanumeric': 0.18502738892270237, 'fraction_numerical': 0.0036518563603164943, 'mean_word_length': 3.5164835164835164, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6424486', 'n_tokens_mistral': 546, 'n_tokens_neox': 495, 'n_words': 195}