From ac5e46ba2a497aaaff8f01d785d99f5ea1a0ec83 Mon Sep 17 00:00:00 2001 From: sc0Vu Date: Fri, 12 Jan 2018 17:56:46 +0800 Subject: [PATCH] Kill ganache process after test. --- scripts/test.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/test.sh b/scripts/test.sh index caab94b..6b63d4a 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -1,3 +1,10 @@ #!/usr/bin/env bash -ganache-cli -g 0 -l 0 > /dev/null & vendor/bin/phpunit --coverage-clover=coverage.xml \ No newline at end of file +ganache-cli -g 0 -l 0 > /dev/null & +ganachecli_pid=$! +echo "Start ganache-cli pid: $ganachecli_pid" + +vendor/bin/phpunit --coverage-clover=coverage.xml + +kill -9 $ganachecli_pid +echo "Kill ganache-cli" \ No newline at end of file