Update integration test script (#13)
Signed-off-by: Joe Hu <jowhuw@amazon.com> Co-authored-by: Joe Hu <jowhuw@amazon.com>
This commit is contained in:
parent
926b6fd6fe
commit
373a92e5d9
11
README.md
11
README.md
@ -36,6 +36,16 @@ make -j unit
|
|||||||
make -j test
|
make -j test
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### To run one integration test:
|
||||||
|
```text
|
||||||
|
TEST_PATTERN=<test-function-or-file> make -j test
|
||||||
|
```
|
||||||
|
e.g.,
|
||||||
|
```text
|
||||||
|
TEST_PATTERN=test_sanity make -j test
|
||||||
|
TEST_PATTERN=test_rdb.py make -j test
|
||||||
|
```
|
||||||
|
|
||||||
## Load the Module
|
## Load the Module
|
||||||
To test the module with a Valkey, you can load the module using any of the following ways:
|
To test the module with a Valkey, you can load the module using any of the following ways:
|
||||||
|
|
||||||
@ -84,3 +94,4 @@ JSON.STRLEN
|
|||||||
JSON.TOGGLE
|
JSON.TOGGLE
|
||||||
JSON.TYPE
|
JSON.TYPE
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -8,12 +8,18 @@ pkill -9 -f "valkey-server.*:" || true
|
|||||||
pkill -9 -f Valgrind || true
|
pkill -9 -f Valgrind || true
|
||||||
pkill -9 -f "valkey-benchmark" || true
|
pkill -9 -f "valkey-benchmark" || true
|
||||||
|
|
||||||
|
# If environment variable SERVER_VERSION is not set, default to "unstable"
|
||||||
|
if [ -z "$SERVER_VERSION" ]; then
|
||||||
|
echo "WARNING: SERVER_VERSION environment variable is not set. Defaulting to \"unstable\"."
|
||||||
|
export SERVER_VERSION="unstable"
|
||||||
|
fi
|
||||||
|
|
||||||
# cd to the current directory of the script
|
# cd to the current directory of the script
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||||
cd "${DIR}"
|
cd "${DIR}"
|
||||||
|
|
||||||
export MODULE_PATH=$2/build/src/libjson.so
|
export MODULE_PATH=$2/build/src/libjson.so
|
||||||
echo "Running integration tests against Valkey version: $SERVER_VERSION"
|
echo "Running integration tests against Valkey version $SERVER_VERSION"
|
||||||
|
|
||||||
if [[ ! -z "${TEST_PATTERN}" ]] ; then
|
if [[ ! -z "${TEST_PATTERN}" ]] ; then
|
||||||
export TEST_PATTERN="-k ${TEST_PATTERN}"
|
export TEST_PATTERN="-k ${TEST_PATTERN}"
|
||||||
@ -32,3 +38,4 @@ else
|
|||||||
echo "Unknown target: $1"
|
echo "Unknown target: $1"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user