1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
#!/bin/sh
TEST_NAME=$1
if [ -z "$BINARY_DIR" ]; then
echo "\$BINARY_DIR environment variable is not set; cannot run test"
exit 1
fi
if [ ! -d "$BINARY_DIR" ]; then
echo "$BINARY_DIR is not a directory; cannot run test"
exit 1
fi
echo "Running $TEST_NAME - go-wrk based stress test"
echo > "$BINARY_DIR/tests/$TEST_NAME/client.log"
if [ ! -f "$BINARY_DIR/tests/$TEST_NAME/setup.sh" ]; then
echo "Test environment file $BINARY_DIR/tests/$TEST_NAME/setup.sh does not exist - cannot run test"
exit 1
fi
. "$BINARY_DIR/tests/$TEST_NAME/setup.sh"
"$WRK_BIN" -c 200 -d 10 -no-vr -T 10000 -f "$PLAYBACK_FILE"
|