mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-10-28 17:32:35 +00:00
gui-automation: Allow updating DUT with new info
Will help us track DUT software builds and such.
This commit is contained in:
@@ -28,6 +28,24 @@ MY_TMPDIR=${MY_TMPDIR:-/tmp}
|
||||
STABILITY_DURATION=${STABILITY_DURATION:-600}
|
||||
TEST_RIG_ID=${TEST_RIG_ID:-Unspecified}
|
||||
|
||||
# DUT configuration
|
||||
DUT_FLAGS=${DUT_FLAGS:-NA}
|
||||
DUT_FLAGS_MASK=${DUT_FLAGS_MASK:-NA}
|
||||
DUT_SW_VER=${DUT_SW_VER:-NA}
|
||||
DUT_HW_VER=${DUT_HW_VER:-NA}
|
||||
DUT_MODEL=${DUT_MODEL:-NA}
|
||||
DUT_SERIAL=${DUT_SERIAL:-NA}
|
||||
DUT_SSID1=${DUT_SSID1:-NA}
|
||||
DUT_SSID2=${DUT_SSID2:-NA}
|
||||
DUT_SSID3=${DUT_SSID3:-NA}
|
||||
DUT_PASSWD1=${DUT_PASSWD1:-NA}
|
||||
DUT_PASSWD2=${DUT_PASSWD2:-NA}
|
||||
DUT_PASSWD3=${DUT_PASSWD3:-NA}
|
||||
DUT_BSSID1=${DUT_BSSID1:-NA}
|
||||
DUT_BSSID2=${DUT_BSSID2:-NA}
|
||||
DUT_BSSID3=${DUT_BSSID3:-NA}
|
||||
|
||||
|
||||
# Tests to run
|
||||
DEFAULT_ENABLE=${DEFAULT_ENABLE:-1}
|
||||
DO_DPT_PKT_SZ=${DO_DPT_PKT_SZ:-$DEFAULT_ENABLE}
|
||||
@@ -51,6 +69,11 @@ DPT_CFG=ben
|
||||
SCENARIO=64sta
|
||||
RPT_TMPDIR=${MY_TMPDIR}/lf_reports
|
||||
|
||||
# Query DUT from the scenario
|
||||
DUT=`grep DUT: $SCENARIO_CFG_FILE |head -1|grep -o "DUT: .*"|cut -f2 -d ' '`
|
||||
|
||||
echo "Found DUT: $DUT from scenario $SCENARIO_CFG_FILE"
|
||||
|
||||
mkdir -p $RSLTS_DIR
|
||||
|
||||
set -x
|
||||
@@ -66,8 +89,16 @@ set -x
|
||||
# Load Dataplane config file
|
||||
../lf_testmod.pl --mgr $LFMANAGER --action set --test_name dataplane-test-latest-$DPT_CFG --file $DPT_CFG_FILE
|
||||
|
||||
# Set DUT info if configured.
|
||||
if [ "_$DUT" != "_" ]
|
||||
then
|
||||
../lf_portmod.pl --manager $LFMANAGER \
|
||||
--cli_cmd "add_dut $DUT $DUT_FLAGS NA '$DUT_SW_VER' '$DUT_HW_VER' '$DUT_MODEL' '$DUT_SERIAL' NA NA NA '$DUT_SSID1' '$DUT_PASSWD1' '$DUT_SSID2' '$DUT_PASSWD2' '$DUT_SSID3' '$DUT_PASSWD3' NA NA $DUT_FLAGS_MASK NA NA NA $DUT_BSSID1 $DUT_BSSID2 $DUT_BSSID3"
|
||||
fi
|
||||
|
||||
# Make sure GUI is synced up with the server
|
||||
../lf_gui_cmd.pl --manager $GMANAGER --port $GMPORT --cmd "cli show_text_blob"
|
||||
../lf_gui_cmd.pl --manager $GMANAGER --port $GMPORT --cmd "cli show_dut"
|
||||
|
||||
# Pause to let GUI finish getting data from the server
|
||||
sleep 10
|
||||
@@ -81,12 +112,14 @@ then
|
||||
rm -fr $RPT_TMPDIR/*
|
||||
fi
|
||||
|
||||
|
||||
# Do dataplane pkt size test
|
||||
echo "Checking if we should run Dataplane packet size test."
|
||||
if [ "_$DO_DPT_PKT_SZ" == "_1" ]
|
||||
then
|
||||
../lf_gui_cmd.pl --manager $GMANAGER --port $GMPORT --ttype "Dataplane" --tname dpt-ben --tconfig $DPT_CFG \
|
||||
--modifier_key "Test Rig ID:" --modifier_val "$TEST_RIG_ID" \
|
||||
--modifier_key "DUT_NAME" --modifier_val "$DUT" \
|
||||
--modifier_key "Show Low-Level Graphs" --modifier_val true \
|
||||
--rpt_dest $RPT_TMPDIR > $MY_TMPDIR/basic_regression_log.txt 2>&1
|
||||
mv $RPT_TMPDIR/* $RSLTS_DIR/dataplane_pkt_sz
|
||||
@@ -99,6 +132,7 @@ if [ "_$DO_WCT_DL" == "_1" ]
|
||||
then
|
||||
../lf_gui_cmd.pl --manager $GMANAGER --port $GMPORT --ttype "WiFi Capacity" --tname wct-ben --tconfig $WCT_CFG \
|
||||
--modifier_key "Test Rig ID:" --modifier_val "$TEST_RIG_ID" \
|
||||
--modifier_key "DUT_NAME" --modifier_val "$DUT" \
|
||||
--modifier_key "RATE_DL" --modifier_val "1Gbps" \
|
||||
--modifier_key "RATE_UL" --modifier_val "0" \
|
||||
--rpt_dest $RPT_TMPDIR > $MY_TMPDIR/basic_regression_log.txt 2>&1
|
||||
@@ -111,6 +145,7 @@ if [ "_$DO_WCT_UL" == "_1" ]
|
||||
then
|
||||
../lf_gui_cmd.pl --manager $GMANAGER --port $GMPORT --ttype "WiFi Capacity" --tname wct-ben --tconfig $WCT_CFG \
|
||||
--modifier_key "Test Rig ID:" --modifier_val "$TEST_RIG_ID" \
|
||||
--modifier_key "DUT_NAME" --modifier_val "$DUT" \
|
||||
--modifier_key "RATE_UL" --modifier_val "1Gbps" \
|
||||
--modifier_key "RATE_DL" --modifier_val "0" \
|
||||
--rpt_dest $RPT_TMPDIR > $MY_TMPDIR/basic_regression_log.txt 2>&1
|
||||
@@ -123,6 +158,7 @@ if [ "_$DO_WCT_BI" == "_1" ]
|
||||
then
|
||||
../lf_gui_cmd.pl --manager $GMANAGER --port $GMPORT --ttype "WiFi Capacity" --tname wct-ben --tconfig $WCT_CFG \
|
||||
--modifier_key "Test Rig ID:" --modifier_val "$TEST_RIG_ID" \
|
||||
--modifier_key "DUT_NAME" --modifier_val "$DUT" \
|
||||
--modifier_key "RATE_UL" --modifier_val "1Gbps" \
|
||||
--modifier_key "RATE_DL" --modifier_val "1Gbps" \
|
||||
--modifier_key "Protocol:" --modifier_val "TCP-IPv4" \
|
||||
@@ -137,6 +173,8 @@ echo "Checking if we should run Short-AP Basic CX test."
|
||||
if [ "_$DO_SHORT_AP_BASIC_CX" == "_1" ]
|
||||
then
|
||||
../lf_gui_cmd.pl --manager $GMANAGER --port $GMPORT --ttype "AP-Auto" --tname ap-auto-ben --tconfig $AP_AUTO_CFG \
|
||||
--modifier_key "Test Rig ID:" --modifier_val "$TEST_RIG_ID" \
|
||||
--modifier_key "DUT_NAME" --modifier_val "$DUT" \
|
||||
--rpt_dest $RPT_TMPDIR > $MY_TMPDIR/basic_regression_log.txt 2>&1
|
||||
mv $RPT_TMPDIR/* $RSLTS_DIR/ap_auto_basic_cx
|
||||
mv $MY_TMPDIR/basic_regression_log.txt $RSLTS_DIR/ap_auto_basic_cx/test_automation.txt
|
||||
@@ -148,6 +186,8 @@ echo "Checking if we should run Short-AP Throughput test."
|
||||
if [ "_$DO_SHORT_AP_TPUT" == "_1" ]
|
||||
then
|
||||
../lf_gui_cmd.pl --manager $GMANAGER --port $GMPORT --ttype "AP-Auto" --tname ap-auto-ben --tconfig $AP_AUTO_CFG \
|
||||
--modifier_key "Test Rig ID:" --modifier_val "$TEST_RIG_ID" \
|
||||
--modifier_key "DUT_NAME" --modifier_val "$DUT" \
|
||||
--modifier_key "Basic Client Connectivity" --modifier_val false \
|
||||
--modifier_key "Throughput vs Pkt Size" --modifier_val true \
|
||||
--modifier_key "Dual Band Performance" --modifier_val true \
|
||||
@@ -162,6 +202,8 @@ echo "Checking if we should run Short-AP Stability Reset test."
|
||||
if [ "_$DO_SHORT_AP_STABILITY_RESET" == "_1" ]
|
||||
then
|
||||
../lf_gui_cmd.pl --manager $GMANAGER --port $GMPORT --ttype "AP-Auto" --tname ap-auto-ben --tconfig $AP_AUTO_CFG \
|
||||
--modifier_key "Test Rig ID:" --modifier_val "$TEST_RIG_ID" \
|
||||
--modifier_key "DUT_NAME" --modifier_val "$DUT" \
|
||||
--modifier_key "Basic Client Connectivity" --modifier_val false \
|
||||
--modifier_key "Stability" --modifier_val true \
|
||||
--modifier_key "Stability Duration:" --modifier_val $STABILITY_DURATION \
|
||||
@@ -175,6 +217,8 @@ echo "Checking if we should run Short-AP Stability Radio Reset test."
|
||||
if [ "_$DO_SHORT_AP_STABILITY_RADIO_RESET" == "_1" ]
|
||||
then
|
||||
../lf_gui_cmd.pl --manager $GMANAGER --port $GMPORT --ttype "AP-Auto" --tname ap-auto-ben --tconfig $AP_AUTO_CFG \
|
||||
--modifier_key "Test Rig ID:" --modifier_val "$TEST_RIG_ID" \
|
||||
--modifier_key "DUT_NAME" --modifier_val "$DUT" \
|
||||
--modifier_key "Basic Client Connectivity" --modifier_val false \
|
||||
--modifier_key "Stability" --modifier_val true \
|
||||
--modifier_key "Stability Duration:" --modifier_val $STABILITY_DURATION \
|
||||
@@ -189,6 +233,8 @@ echo "Checking if we should run Short-AP Stability No-Reset test."
|
||||
if [ "_$DO_SHORT_AP_STABILITY_NO_RESET" == "_1" ]
|
||||
then
|
||||
../lf_gui_cmd.pl --manager $GMANAGER --port $GMPORT --ttype "AP-Auto" --tname ap-auto-ben --tconfig $AP_AUTO_CFG \
|
||||
--modifier_key "Test Rig ID:" --modifier_val "$TEST_RIG_ID" \
|
||||
--modifier_key "DUT_NAME" --modifier_val "$DUT" \
|
||||
--modifier_key "Basic Client Connectivity" --modifier_val false \
|
||||
--modifier_key "Stability" --modifier_val true \
|
||||
--modifier_key "Stability Duration:" --modifier_val $STABILITY_DURATION \
|
||||
|
||||
@@ -19,6 +19,7 @@ $| = 1;
|
||||
# use lib prepends to @INC, so put lower priority first
|
||||
# This is before run-time, so cannot condition this with normal 'if' logic.
|
||||
use lib '/home/lanforge/scripts';
|
||||
use lib "../";
|
||||
use lib "./";
|
||||
|
||||
use LANforge::Endpoint;
|
||||
|
||||
@@ -34,6 +34,7 @@ my $cwd = getcwd();
|
||||
# use lib prepends to @INC, so put lower priority first
|
||||
# This is before run-time, so cannot condition this with normal 'if' logic.
|
||||
use lib '/home/lanforge/scripts';
|
||||
use lib "../";
|
||||
use lib "./";
|
||||
|
||||
use LANforge::Endpoint;
|
||||
|
||||
Reference in New Issue
Block a user