aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/bash
diff options
context:
space:
mode:
Diffstat (limited to 'resources/libraries/bash')
-rw-r--r--resources/libraries/bash/dut_setup.sh71
1 files changed, 31 insertions, 40 deletions
diff --git a/resources/libraries/bash/dut_setup.sh b/resources/libraries/bash/dut_setup.sh
index c6bd0fbbe2..7069e5e608 100644
--- a/resources/libraries/bash/dut_setup.sh
+++ b/resources/libraries/bash/dut_setup.sh
@@ -12,50 +12,41 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-echo
-echo List vpp packages
-echo
-dpkg -l vpp\*
+function cmd {
+ echo
+ echo "[Command_start_exec] '$1'"
+ echo -n "[Command_outputs] "
+ eval ${@}
+ echo "[Command_done_exec] '$1'"
+ echo
+}
echo
-echo See vpp process
-echo
-ps aux | grep vpp
+echo "[Command_desc] Starting ${0}"
-echo
-echo See /etc/vpp/startup.conf
-echo
-cat /etc/vpp/startup.conf
+cmd 'dpkg -l vpp\*'
-echo
-echo Restart VPP
-echo
-sudo -S service vpp restart
+cmd 'ps aux | grep vpp'
-echo
-echo List /proc/meminfo
-echo
-cat /proc/meminfo
+cmd 'cat /etc/vpp/startup.conf'
-echo
-echo See free memory
-echo
-free -m
+cmd 'sudo -S service vpp restart'
+
+echo "[Command_desc] SLEEP for three seconds, so that VPP is up for sure"
+cmd 'sleep 3'
+
+cmd 'cat /proc/meminfo'
+
+cmd 'free -m'
+
+cmd 'ps aux | grep vpp'
+
+cmd 'sudo dmidecode | grep UUID'
+
+cmd 'lspci -Dnn'
+
+cmd 'tail -n 50 /var/log/syslog'
+
+echo "[Command_desc] Adding dpdk-input trace"
+cmd 'sudo vpp_api_test <<< "exec trace add dpdk-input 100"'
-echo
-echo See vpp process
-echo
-ps aux | grep vpp
-
-echo UUID
-sudo dmidecode | grep UUID
-
-echo Add dpdk-input trace
-sudo vpp_api_test <<< "exec trace add dpdk-input 100"
-RESULT=$?
-if [ $RESULT -ne 0 ]; then
- echo
- echo See /var/log/syslog
- sudo tail -n 200 /var/log/syslog
- exit $RESULT
-fi