Loading tests/src/Behat/scripts/run_behat.sh +7 −4 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ OPTION: -p, --params_files: The comma-separated names of files defining parameters for templates. [default: $DEFAULT_PARAMS_FILES] -r, --repeat: Repeat behat run n times [default: 1] -s, --random_str: The string to replace @random in feature files. If unset, dynamically generated. -t, --templates_dir: The directory where the feature file templates exist. [default: ${FEATURES}/${TEMPLATES}] EOF Loading @@ -33,6 +34,7 @@ function main() { -o | --output_dir ) shift; preprocess_output_dir="$1" ;; -p | --params_files ) shift; preprocess_params_files="$1" ;; -r | --repeat ) shift; repeat="$1" ;; -s | --random_str) shift; random_str_opt="$1" ;; -t | --templates_dir ) shift; preprocess_templates_dir="$1" ;; * ) usage esac Loading Loading @@ -111,8 +113,8 @@ function setup() { function create_output_dir() { run_pushd "${BEHAT_FULL_PATH}" echo_count 'Creating a tmp directory' readonly OUTPUT_DIR_FROM_BEHAT_PATH=$(mktemp -d "${preprocess_output_dir:-${FEATURES}}"/tmp.XXXXXX) readonly random_str=$(echo "${OUTPUT_DIR_FROM_BEHAT_PATH}"| sed -r 's/.*tmp\.(.*)$/\1/') readonly OUTPUT_DIR_FROM_BEHAT_PATH=$(mktemp -d "${preprocess_output_dir:-${FEATURES}}"/tmp.${TIMESTAMP}.XXXXXX) readonly random_str_generated=$(echo "${OUTPUT_DIR_FROM_BEHAT_PATH}"| sed -r 's/.*\.([^\.]*)$/\1/') run_popd if [[ "${OUTPUT_DIR_FROM_BEHAT_PATH}" ]]; then Loading @@ -129,7 +131,7 @@ function before_test() { --behat_path=${behat_path} \ --params_files=${preprocess_params_files:-${DEFAULT_PARAMS_FILES}} \ --templates_dir=${preprocess_templates_dir} \ --output_dir=${OUTPUT_DIR_FROM_BEHAT_PATH} --random_str=${random_str}" --output_dir=${OUTPUT_DIR_FROM_BEHAT_PATH} --random_str=${random_str_opt:-${random_str_generated}}" run_popd } Loading Loading @@ -192,7 +194,8 @@ i=0 readonly CHROMIUM='chromium' readonly BEHAT_FULL_PATH="${CLOUD_DIR}/${behat_path:=${DEFAULT_BEHAT_PATH}}" echo "*** Starting tests ${repeat:=1} time(s) using $0 on $(date +'%Y%m%d_%H%M%S')..." readonly TIMESTAMP=$(date +'%Y%m%d_%H%M%S') echo "*** Starting tests ${repeat:=1} time(s) using $0 on ${TIMESTAMP}..." setup if [[ "${require_preprocess}" == 'false' ]]; then repeat_test "${feature_file}" Loading Loading
tests/src/Behat/scripts/run_behat.sh +7 −4 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ OPTION: -p, --params_files: The comma-separated names of files defining parameters for templates. [default: $DEFAULT_PARAMS_FILES] -r, --repeat: Repeat behat run n times [default: 1] -s, --random_str: The string to replace @random in feature files. If unset, dynamically generated. -t, --templates_dir: The directory where the feature file templates exist. [default: ${FEATURES}/${TEMPLATES}] EOF Loading @@ -33,6 +34,7 @@ function main() { -o | --output_dir ) shift; preprocess_output_dir="$1" ;; -p | --params_files ) shift; preprocess_params_files="$1" ;; -r | --repeat ) shift; repeat="$1" ;; -s | --random_str) shift; random_str_opt="$1" ;; -t | --templates_dir ) shift; preprocess_templates_dir="$1" ;; * ) usage esac Loading Loading @@ -111,8 +113,8 @@ function setup() { function create_output_dir() { run_pushd "${BEHAT_FULL_PATH}" echo_count 'Creating a tmp directory' readonly OUTPUT_DIR_FROM_BEHAT_PATH=$(mktemp -d "${preprocess_output_dir:-${FEATURES}}"/tmp.XXXXXX) readonly random_str=$(echo "${OUTPUT_DIR_FROM_BEHAT_PATH}"| sed -r 's/.*tmp\.(.*)$/\1/') readonly OUTPUT_DIR_FROM_BEHAT_PATH=$(mktemp -d "${preprocess_output_dir:-${FEATURES}}"/tmp.${TIMESTAMP}.XXXXXX) readonly random_str_generated=$(echo "${OUTPUT_DIR_FROM_BEHAT_PATH}"| sed -r 's/.*\.([^\.]*)$/\1/') run_popd if [[ "${OUTPUT_DIR_FROM_BEHAT_PATH}" ]]; then Loading @@ -129,7 +131,7 @@ function before_test() { --behat_path=${behat_path} \ --params_files=${preprocess_params_files:-${DEFAULT_PARAMS_FILES}} \ --templates_dir=${preprocess_templates_dir} \ --output_dir=${OUTPUT_DIR_FROM_BEHAT_PATH} --random_str=${random_str}" --output_dir=${OUTPUT_DIR_FROM_BEHAT_PATH} --random_str=${random_str_opt:-${random_str_generated}}" run_popd } Loading Loading @@ -192,7 +194,8 @@ i=0 readonly CHROMIUM='chromium' readonly BEHAT_FULL_PATH="${CLOUD_DIR}/${behat_path:=${DEFAULT_BEHAT_PATH}}" echo "*** Starting tests ${repeat:=1} time(s) using $0 on $(date +'%Y%m%d_%H%M%S')..." readonly TIMESTAMP=$(date +'%Y%m%d_%H%M%S') echo "*** Starting tests ${repeat:=1} time(s) using $0 on ${TIMESTAMP}..." setup if [[ "${require_preprocess}" == 'false' ]]; then repeat_test "${feature_file}" Loading