mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
added first version of automated test script
git-svn-id: https://zerberus.eonerc.rwth-aachen.de:8443/svn/s2ss/trunk@275 8ec27952-4edc-4aab-86aa-e87bb2611832
This commit is contained in:
parent
ce5ddb4e52
commit
5e6e21d451
1 changed files with 72 additions and 0 deletions
72
contrib/tests.sh
Executable file
72
contrib/tests.sh
Executable file
|
@ -0,0 +1,72 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Configuration
|
||||
|
||||
HOST=$(hostname -s)
|
||||
|
||||
#LOCAL_IP=10.10.12.2
|
||||
LOCAL_IP=127.0.0.1
|
||||
LOCAL_PORT=12001
|
||||
|
||||
#REMOTE_IP=10.10.12.3
|
||||
REMOTE_IP=127.0.0.1
|
||||
REMOTE_PORT=12002
|
||||
|
||||
#LOCAL_DIR=/s2ss/server/
|
||||
#REMOTE_DIR=/s2ss/server/
|
||||
LOCAL_DIR=/home/stv0g/workspace/rwth/acs/s2ss/server
|
||||
REMOTE_DIR=$LOCAL_DIR
|
||||
######################### End of Configuration ################################
|
||||
# There's no need to change something below this line
|
||||
|
||||
SSH="ssh -T $REMOTE_IP"
|
||||
|
||||
TEST_CONFIG="
|
||||
affinity = 0x02; # Mask of cores the server should run on
|
||||
priority = 50; # Scheduler priority for the server
|
||||
debug = 10; # The level of verbosity for debug messages
|
||||
stats = 3; # The interval in seconds fo path statistics
|
||||
|
||||
nodes = {
|
||||
remote = {
|
||||
type = \"udp\";
|
||||
local = \"$LOCAL_IP:$LOCAL_PORT\";
|
||||
remote = \"$REMOTE_IP:$REMOTE_PORT\";
|
||||
}
|
||||
};
|
||||
"
|
||||
|
||||
|
||||
REMOTE_CONFIG="
|
||||
affinity = 0x02; # Mask of cores the server should run on
|
||||
priority = 50; # Scheduler priority for the server
|
||||
debug = 0; # The level of verbosity for debug messages
|
||||
stats = 0; # The interval in seconds fo path statistics
|
||||
|
||||
nodes = {
|
||||
remote = {
|
||||
type = \"udp\";
|
||||
local = \"$REMOTE_IP:$REMOTE_PORT\";
|
||||
remote = \"$LOCAL_IP:$LOCAL_PORT\";
|
||||
},
|
||||
};
|
||||
|
||||
paths = ({
|
||||
in = \"remote\";
|
||||
out = \"remote\";
|
||||
});
|
||||
"
|
||||
|
||||
# Start remote server
|
||||
$SSH -n "echo '$REMOTE_CONFIG' | sudo $REMOTE_DIR/server -" &
|
||||
REMOTE_PID=$!
|
||||
echo "Started remote server with pid: $REMOTE_PID"
|
||||
|
||||
# Start tests
|
||||
echo "$TEST_CONFIG" | $LOCAL_DIR/test - rtt -f 3 -c 100000 3>> test_output
|
||||
|
||||
# Stop remote server
|
||||
$SSH sudo kill $REMOTE_PID
|
||||
echo "Stopped remote server with pid: $REMOTE_PID"
|
Loading…
Add table
Reference in a new issue