Refactor loops and improve formatting in runtest.sh for better readability
This commit is contained in:
parent
d92621d2f0
commit
434add2694
1 changed files with 30 additions and 29 deletions
|
@ -18,7 +18,10 @@ fi
|
||||||
|
|
||||||
sudo -v
|
sudo -v
|
||||||
|
|
||||||
while true; do sudo -n true; sleep 60; done 2>/dev/null &
|
while true; do
|
||||||
|
sudo -n true
|
||||||
|
sleep 60
|
||||||
|
done 2>/dev/null &
|
||||||
SUDO_KEEPALIVE_PID=$!
|
SUDO_KEEPALIVE_PID=$!
|
||||||
|
|
||||||
echo "Starting kismet..."
|
echo "Starting kismet..."
|
||||||
|
@ -108,7 +111,6 @@ while [ "$COUNTER" -lt "$NUM_TESTS" ]; do
|
||||||
COUNTER=$((COUNTER + 1))
|
COUNTER=$((COUNTER + 1))
|
||||||
echo "Executing test $COUNTER of $NUM_TESTS..."
|
echo "Executing test $COUNTER of $NUM_TESTS..."
|
||||||
|
|
||||||
|
|
||||||
for ((i = 1; i <= NUM_SAMPLES; i++)); do
|
for ((i = 1; i <= NUM_SAMPLES; i++)); do
|
||||||
echo " Gathering sample $i of $NUM_SAMPLES..."
|
echo " Gathering sample $i of $NUM_SAMPLES..."
|
||||||
START_TIME=$(date -Iseconds)
|
START_TIME=$(date -Iseconds)
|
||||||
|
@ -140,7 +142,6 @@ while [ "$COUNTER" -lt "$NUM_TESTS" ]; do
|
||||||
continue # Skip this sample
|
continue # Skip this sample
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# TX failure delta
|
# TX failure delta
|
||||||
FAILED_NOW=$(get_tx_failed)
|
FAILED_NOW=$(get_tx_failed)
|
||||||
FAILED_DELTA=$((FAILED_NOW - FAILED_START))
|
FAILED_DELTA=$((FAILED_NOW - FAILED_START))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue