#!/usr/bin/env bash source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../../bash/common.lib.sh" run_brand_new_behat() { local code=0 print_header "Testing (Behat - brand new, regular scenarios; ~@javascript && ~@legacy && ~@todo && ~@cli)" "Sylius" run_command "bin/behat --strict -f progress -p cached --tags=\"~@javascript && ~@legacy && ~@todo && ~@cli\"" || code=$? if [[ ${code} = 1 ]]; then run_command "bin/behat --strict -f progress -p cached --tags=\"~@javascript && ~@legacy && ~@todo && ~@cli\" --rerun" ; code=$? fi return ${code} } run_legacy_behat() { local code=0 print_header "Testing (Behat - legacy, regular scenarios; ~@javascript && @legacy && ~@todo && ~@cli)" "Sylius" run_command "bin/behat --strict -f progress -p cached --tags=\"~@javascript && @legacy && ~@todo && ~@cli\"" || code=$? if [[ ${code} = 1 ]]; then run_command "bin/behat --strict -f progress -p cached --tags=\"~@javascript && @legacy && ~@todo && ~@cli\" --rerun" ; code=$? fi return ${code} } run_behat() { local code=0 run_brand_new_behat || code=$? run_legacy_behat || code=$? return ${code} } run_behat