diff --git a/tests/all.sh b/tests/all.sh index 3add940..616427b 100644 --- a/tests/all.sh +++ b/tests/all.sh @@ -85,14 +85,14 @@ setupPool() { copyPool "$POOL_FILE" "$POOL_NAME" "$POOL_SOCKET" "ondemand" done - PHP_SERIAL_ID=$(find /etc/php/ -maxdepth 1 -mindepth 1 -type d | sort | grep -n -F "7.3" | cut -d : -f 1) + PHP_SERIAL_ID=$(find /etc/php/ -maxdepth 1 -mindepth 1 -type d | sort | grep -n -F "$PHP_VERSION" | cut -d : -f 1) #Create TCP port based pools #Division on 1 is required to convert from float to integer START_PORT=$(echo "($MIN_PORT + $PHP_SERIAL_ID * $MAX_PORTS_COUNT + 1)/1" | bc) for ((c = 1; c <= MAX_PORTS; c++)); do POOL_NAME="port$c" POOL_PORT=$(echo "($START_PORT + $c)/1" | bc) - PORT_IS_BUSY=$(sudo lsof -i:$POOL_PORT) + PORT_IS_BUSY=$(sudo lsof -i:"$POOL_PORT") assertNull "Port $POOL_PORT is busy" "$PORT_IS_BUSY" copyPool "$POOL_FILE" "$POOL_NAME" "$POOL_PORT" "static" done @@ -101,7 +101,7 @@ setupPool() { POOL_NAME="localhost" POOL_PORT=$(echo "($MIN_PORT + $PHP_SERIAL_ID * $MAX_PORTS_COUNT)/1" | bc) POOL_SOCKET="127.0.0.1:$POOL_PORT" - PORT_IS_BUSY=$(sudo lsof -i:$POOL_PORT) + PORT_IS_BUSY=$(sudo lsof -i:"$POOL_PORT") assertNull "Port $POOL_PORT is busy" "$PORT_IS_BUSY" copyPool "$POOL_FILE" "$POOL_NAME" "$POOL_SOCKET" "static"