Skip to content
This repository has been archived by the owner on Jul 13, 2018. It is now read-only.

Commit

Permalink
Making run command work for multiple PHPT
Browse files Browse the repository at this point in the history
Run command now works if user provide a phpt filepath or a directory
with phpt files.
  • Loading branch information
brunoric authored and jpjoao committed Aug 4, 2017
1 parent 9e801a3 commit 64a3825
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/phpqa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ function parseRunArgs()
_RUN_FILE_PATH=$1
_RUN_VERSION=$2;

if [ -z "${_RUN_FILE_PATH}" ] || [ ! -f "${_RUN_FILE_PATH}" ]; then
displayHelp "You need to provide a phpt file to be tested or pass \`suite\` as first parameter to run the full test suite.";
if [ -z "${_RUN_FILE_PATH}" ] || ([ ! -f "${_RUN_FILE_PATH}" ] && [ ! -d "${_RUN_FILE_PATH}" ]); then
displayHelp "You need to provide a phpt or a directory with phpt files to be tested or pass \`suite\` as first parameter to run the full test suite.";
fi

if [ -z "${_RUN_VERSION}" ]; then
Expand Down Expand Up @@ -92,7 +92,7 @@ function fixRunPath()
function singleTest()
{
mkdir -p ${_RUN_FILE_DIR}/${_RUN_VERSION}/;
cp ${_RUN_FILE_PATH} ${_RUN_FILE_DIR}/${_RUN_VERSION}/;
cp -r ${_RUN_FILE_PATH} ${_RUN_FILE_DIR}/${_RUN_VERSION}/;
docker run --rm -i -t \
-v ${_RUN_FILE_DIR}/${_RUN_VERSION}/:/usr/src/phpt/ \
herdphp/phpqa:${_RUN_VERSION} \
Expand Down

0 comments on commit 64a3825

Please sign in to comment.