Skip to content

Instantly share code, notes, and snippets.

@DuaelFr
Last active August 29, 2015 14:22
Show Gist options
  • Save DuaelFr/dea65208328c7abaf1ad to your computer and use it in GitHub Desktop.
Save DuaelFr/dea65208328c7abaf1ad to your computer and use it in GitHub Desktop.
Script to run simpletests from command line for Drupal 8
#!/bin/bash
RAND=$(cat /dev/urandom | tr -cd 'a-f0-9' | head -c 32)
SQLITE="/mnt/ramdisk/d8test.sqlite.$RAND"
DBURL="sqlite://localhost//mnt/ramdisk/d8test.sqlite.BASE"
URL="http://d8test.sqlite"
CONC=6
if [ $1 ]; then
if [ $1 == "group" ] & [ $2 ]; then
php ./core/scripts/run-tests.sh \
--sqlite $SQLITE \
--dburl $DBURL \
--url $URL \
--concurrency $CONC \
--color \
--verbose \
"$2"
else
php ./core/scripts/run-tests.sh \
--sqlite $SQLITE \
--dburl $DBURL \
--url $URL \
--concurrency $CONC \
--color \
--verbose \
--class "$1"
fi
else
php ./core/scripts/run-tests.sh \
--sqlite $SQLITE \
--dburl $DBURL \
--url $URL \
--concurrency $CONC \
--color \
--verbose \
--all
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment