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
13
README.md
13
README.md
@ -36,6 +36,16 @@ make -j unit
|
||||
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
|
||||
To test the module with a Valkey, you can load the module using any of the following ways:
|
||||
|
||||
@ -83,4 +93,5 @@ JSON.STRAPPEND
|
||||
JSON.STRLEN
|
||||
JSON.TOGGLE
|
||||
JSON.TYPE
|
||||
```
|
||||
```
|
||||
|
||||
|
@ -8,12 +8,18 @@ pkill -9 -f "valkey-server.*:" || true
|
||||
pkill -9 -f Valgrind || 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
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
cd "${DIR}"
|
||||
|
||||
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
|
||||
export TEST_PATTERN="-k ${TEST_PATTERN}"
|
||||
@ -31,4 +37,5 @@ if [[ $1 == "test" ]] ; then
|
||||
else
|
||||
echo "Unknown target: $1"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user