Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Example:
- $ br --profile seleniumfirefox --suite classic --tags '~@javascript&&@mod_forum' --name 'Edit forum post'
- Command: vendor/bin/behat --config /Users/stronk7/Sites/moodle_data_gitintegration/master/postgres_behat/behatrun/behat/behat.yml --profile seleniumfirefox --suite classic --tags '~@javascript&&@mod_forum' --name 'Edit forum post'
- Moodle 3.7dev+ (Build: 20190418), 3339cbf26a23f638efe50f485f76ff793d41e807
- Php: 7.3.3, pgsql: 9.6.12, OS: Darwin 18.5.0 x86_64
- Server OS "Darwin", Browser: "firefox"
- Started at 23-04-2019, 23:28
- ..............
- 1 escenario (1 pasaron)
- 14 pasos (14 pasaron)
- 0m5.84s (64.39Mb)
- Script:
- $ cat br
- #!/bin/bash
- # Don't stop on error
- set +e
- # Move to base directory
- pushd "$(git rev-parse --show-toplevel)" > /dev/null
- # Calculate path to config.yml file
- pathtoconfig=$(php -r 'define("CLI_SCRIPT", true);
- include "config.php";
- include("lib/behat/classes/behat_command.php");
- echo behat_command::get_behat_dir();')/behat.yml
- # Add quotes back to show the complete command
- forcequoted="[[:space:]]|[&,]"
- quoted=
- for i in "$@"
- do
- if [[ ${i} =~ ${forcequoted} ]]; then
- i=\'${i}\'
- fi
- quoted="${quoted} ${i}"
- done
- # Run behat passing all params straight to it
- echo
- echo "Command: vendor/bin/behat --config ${pathtoconfig} ${quoted}"
- echo
- vendor/bin/behat --config "${pathtoconfig}" "$@"
- # Move back to original directory
- popd > /dev/null
Advertisement
Add Comment
Please, Sign In to add comment