quality of life changes

Kill the php server after AB tests are done
Add script runners to composer for ease of use
This commit is contained in:
Chris Boden 2019-12-11 10:18:08 -05:00
parent cb8b04beba
commit 91af8a76d5
2 changed files with 10 additions and 0 deletions

View File

@ -27,5 +27,13 @@
"require-dev": { "require-dev": {
"phpunit/phpunit": "4.8.*", "phpunit/phpunit": "4.8.*",
"react/socket": "^1.3" "react/socket": "^1.3"
},
"scripts": {
"abtests": "sh tests/ab/run_ab_tests.sh",
"phpunit": "phpunit --colors=always",
"test": [
"@abtests",
"@phpunit"
]
} }
} }

View File

@ -9,3 +9,5 @@ sleep 2
php startServer.php & php startServer.php &
sleep 3 sleep 3
wstest -m fuzzingclient -s fuzzingclient.json wstest -m fuzzingclient -s fuzzingclient.json
sleep 1
kill $(ps aux | grep 'php startServer.php' | awk '{print $2}' | head -n 1)