From 826974ab252a06a117a13989d3d5666b07c3553c Mon Sep 17 00:00:00 2001 From: Dengke Tang Date: Wed, 22 Feb 2023 11:47:44 -0800 Subject: [PATCH] change dir from run test --- composer.json | 2 +- dev-scripts/run_tests | 6 ++++++ dev-scripts/run_tests.bat | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index d631855..f7dbdd9 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,7 @@ "scripts": { "test": "./dev-scripts/run_tests", "test-extension": "@test", - "test-win": "run_tests" + "test-win": ".\\dev-scripts\\run_tests.bat" }, "license": "Apache-2.0" } diff --git a/dev-scripts/run_tests b/dev-scripts/run_tests index cd19974..848840c 100755 --- a/dev-scripts/run_tests +++ b/dev-scripts/run_tests @@ -2,6 +2,12 @@ set -ex +BASENAME=${0} +TOOLS_DIR=$(dirname ${BASENAME}) +WORK_DIR="${TOOLS_DIR}/.." + +cd "${WORK_DIR}" + launcher= if command -v catchsegv; then launcher=catchsegv diff --git a/dev-scripts/run_tests.bat b/dev-scripts/run_tests.bat index d3e0886..179589f 100644 --- a/dev-scripts/run_tests.bat +++ b/dev-scripts/run_tests.bat @@ -1,4 +1,6 @@ @echo on +cd .. + %PHP_BINARY% -c php-win.ini vendor/bin/phpunit tests --debug