CSIT-562 HC Test: Persistence suite rework, part1
[csit.git] / resources / libraries / bash / dut_setup.sh
index 7069e5e..952b82b 100644 (file)
@@ -13,7 +13,6 @@
 # limitations under the License.
 
 function cmd {
-    echo
     echo "[Command_start_exec] '$1'"
     echo -n "[Command_outputs] "
     eval ${@}
@@ -24,7 +23,11 @@ function cmd {
 echo
 echo "[Command_desc] Starting ${0}"
 
-cmd 'dpkg -l vpp\*'
+if [ -f "/etc/redhat-release" ]; then
+    cmd 'rpm -qai vpp*'
+else
+    cmd 'dpkg -l vpp\*'
+fi
 
 cmd 'ps aux | grep vpp'
 
@@ -45,8 +48,14 @@ cmd 'sudo dmidecode | grep UUID'
 
 cmd 'lspci -Dnn'
 
-cmd 'tail -n 50 /var/log/syslog'
+if [ -f "/etc/redhat-release" ]; then
+    cmd 'tail -n 100 /var/log/messages'
+else
+    cmd 'tail -n 100 /var/log/syslog'
+fi
 
 echo "[Command_desc] Adding dpdk-input trace"
 cmd 'sudo vpp_api_test <<< "exec trace add dpdk-input 100"'
 
+echo "[Command_desc] Adding vhost-user-input trace"
+cmd 'sudo vpp_api_test <<< "exec trace add vhost-user-input 100"'
\ No newline at end of file