-
-
Save kevinxucs/06dc189f89c182230bb1 to your computer and use it in GitHub Desktop.
HHVM Framework Test Runner
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Change to match yours | |
FRAMEWORK="vfsstream" | |
HHVM_ROOT="/p/hhvm" | |
PHP_DBG="/p/php/5.6.2/bin/php" | |
ISSUE='^org\\bovigo\\vfs\\vfsStreamWrapperFlockTestCase::canRemoveLock$' | |
usage() { | |
echo >&2 "HHVM test runner" | |
echo >&2 "Usage: hr <[r]un|[g]db|[h]phpd>" | |
} | |
DIR=$HHVM_ROOT/hphp/test/frameworks/framework_downloads/$FRAMEWORK | |
if [ ! -d $DIR ]; then | |
echo >&2 "No such directory: $DIR" | |
exit 1 | |
fi | |
cd $DIR | |
case $1 in | |
"r"|"run"|"") | |
# HHVM | |
$HHVM_ROOT/hphp/hhvm/hhvm -v Repo.Local.Mode=-- --config $HHVM_ROOT/hphp/test/frameworks/php.ini -c $HHVM_ROOT/hphp/test/frameworks/.generated.php.ini $HHVM_ROOT/hphp/test/frameworks/vendor/bin/phpunit --debug --filter $ISSUE | |
# PHP | |
php $HHVM_ROOT/hphp/test/frameworks/vendor/bin/phpunit --debug --filter \'$ISSUE\' | |
;; | |
"g"|"gdb") | |
# GDB | |
gdb --args $HHVM_ROOT/hphp/hhvm/hhvm -v Repo.Local.Mode=-- --config $HHVM_ROOT/hphp/test/frameworks/php.ini -c $HHVM_ROOT/hphp/test/frameworks/.generated.php.ini $HHVM_ROOT/hphp/test/frameworks/vendor/bin/phpunit --debug --filter $ISSUE | |
;; | |
"pg"|"phpgdb") | |
# GDB on PHP | |
gdb --args $PHP_DBG $HHVM_ROOT/hphp/test/frameworks/vendor/bin/phpunit --debug --filter \'$ISSUE\' | |
;; | |
"h"|"hphpd") | |
# HPHPD | |
$HHVM_ROOT/hphp/hhvm/hhvm --mode debug -v Repo.Local.Mode=-- --config $HHVM_ROOT/hphp/test/frameworks/php.ini -c $HHVM_ROOT/hphp/test/frameworks/.generated.php.ini $HHVM_ROOT/hphp/test/frameworks/vendor/bin/phpunit --debug --filter $ISSUE | |
;; | |
*) | |
usage | |
exit 1 | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment