Skip to content

Instantly share code, notes, and snippets.

@timplunkett
Created April 11, 2023 14:14
Show Gist options
  • Save timplunkett/d5f1d98dfd5903286099132dab5e4809 to your computer and use it in GitHub Desktop.
Save timplunkett/d5f1d98dfd5903286099132dab5e4809 to your computer and use it in GitHub Desktop.
#!/bin/bash
root=$(drush st --field=root)
if [ $(basename $root) = "web" ]; then
vendor_root=$(dirname $root)
else
vendor_root=$root
fi
keep=0
for arg do
shift
case $arg in
-k) keep=1; continue;;
esac
set -- "$@" "$arg"
done
if [ $keep = 0 ]; then
for f in $root/sites/simpletest/browser_output/Drupal*; do
[ -e "$f" ] && rm $root/sites/simpletest/browser_output/Drupal*
break
done
fi
$vendor_root/vendor/bin/phpunit --printer="\\Drupal\\Tests\\Listeners\\HtmlOutputPrinter" -c $root/core $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment