Use the CU-UP load tester to test the functionality of the CU-UP and its loader tester. The requirements on this load test are intentionally low, as it will be run with other unit tests in parallel, and should still pass. It uses an existing configuration file for the CU-UP. The test script runs the CU-UP, runs the load tester, stops the CU-UP, and returns the load tester return value as test result (which will be 0=success if all packets have been received).
22 lines
357 B
Bash
Executable File
22 lines
357 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# this script takes one argument, which is the path to the CU-UP configuration
|
|
if [ $# -ne 1 ]; then
|
|
echo "usage: $0 <cuup-config>"
|
|
exit 1
|
|
fi
|
|
|
|
CONFIG=$1
|
|
|
|
set -x
|
|
|
|
# current dir should be CMAKE_BINARY_DIR
|
|
./nr-cuup -O ${CONFIG} &
|
|
CUUP_PID=$!
|
|
|
|
timeout 5s ./tests/nr-cuup/nr-cuup-load-test -t 3 -d 10 -u 10
|
|
RET=$?
|
|
|
|
kill ${CUUP_PID}
|
|
exit ${RET}
|