From 8e57a58dd632bef9b8534371709df25e080cb35f Mon Sep 17 00:00:00 2001
From: Cedric Roux <cedric.roux@eurecom.fr>
Date: Fri, 19 May 2017 17:00:36 +0200
Subject: [PATCH] fix run_enb_ue_virt_noS1 and run_enb_ue_virt_s1
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Problems reported by Jorge Muñoz Castañer <jorgem@gti.uvigo.es>.

- use Rel14 binaries (those are produced by default)
- let -x option work to have graphical output
- fix VCD missing 'echo'
---
 cmake_targets/tools/run_enb_ue_virt_noS1 | 11 ++++++++---
 cmake_targets/tools/run_enb_ue_virt_s1   | 11 ++++++++---
 2 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/cmake_targets/tools/run_enb_ue_virt_noS1 b/cmake_targets/tools/run_enb_ue_virt_noS1
index a0f23ecb01..a5139d4b44 100755
--- a/cmake_targets/tools/run_enb_ue_virt_noS1
+++ b/cmake_targets/tools/run_enb_ue_virt_noS1
@@ -150,7 +150,7 @@ function main()
 #      -u | --num-ue )
 	    
       -V | --vcd)
-        "setting gtk-wave output"
+        echo "setting gtk-wave output"
         exe_arguments="$exe_arguments -V /tmp/oai_gtk_wave.vcd"
         shift ;
         ;;
@@ -164,6 +164,11 @@ function main()
 	exe_arguments="$exe_arguments -n $2"
         shift 2;
 	;; 
+      -x | --xforms)
+        echo "running with xforms"
+        exe_arguments="$exe_arguments --xforms"
+        shift 1;
+        ;;
       *)   
         echo "Unknown option $1"
         help
@@ -212,11 +217,11 @@ function main()
   fi
   
   if [ $run_gdb -eq 0 ]; then 
-    exec $SUDO $OPENAIR_DIR/targets/bin/oaisim_nos1.Rel10 $exe_arguments | tee /tmp/enb_ue_nos1.log.txt
+    exec $SUDO $OPENAIR_DIR/targets/bin/oaisim_nos1.Rel14 $exe_arguments | tee /tmp/enb_ue_nos1.log.txt
   else
     touch      ~/.gdb_enb_ue_nos1
     chmod 777  ~/.gdb_enb_ue_nos1
-    echo "file $OPENAIR_DIR/targets/bin/oaisim_nos1.Rel10" > ~/.gdb_enb_ue_nos1
+    echo "file $OPENAIR_DIR/targets/bin/oaisim_nos1.Rel14" > ~/.gdb_enb_ue_nos1
     echo "set args $exe_arguments" >> ~/.gdb_enb_ue_nos1
     echo "run"                        >> ~/.gdb_enb_ue_nos1
     cat ~/.gdb_enb_ue_nos1
diff --git a/cmake_targets/tools/run_enb_ue_virt_s1 b/cmake_targets/tools/run_enb_ue_virt_s1
index ff65946803..8e717f393a 100755
--- a/cmake_targets/tools/run_enb_ue_virt_s1
+++ b/cmake_targets/tools/run_enb_ue_virt_s1
@@ -174,7 +174,7 @@ function main()
         ;;      
 
       -V | --vcd)
-        "setting gtk-wave output"
+        echo "setting gtk-wave output"
         exe_arguments="$exe_arguments -V /tmp/oai_gtk_wave.vcd"
         shift ;
         ;;
@@ -183,6 +183,11 @@ function main()
         exe_arguments="$exe_arguments -P wireshark"
         shift 2;
         ;;
+      -x | --xforms)
+        echo "running with xforms"
+        exe_arguments="$exe_arguments --xforms"
+        shift 1;
+        ;;
       *)   
         echo "Unknown option $1"
         help
@@ -258,11 +263,11 @@ function main()
   fi
    
   if [ $run_gdb -eq 0 ]; then 
-    exec $OPENAIR_DIR/targets/bin/oaisim.Rel10 $exe_arguments | tee /tmp/enb_ue_s1.log.txt
+    exec $OPENAIR_DIR/targets/bin/oaisim.Rel14 $exe_arguments | tee /tmp/enb_ue_s1.log.txt
   else
     touch      ~/.gdb_enb_ue_s1
     chmod 777  ~/.gdb_enb_ue_s1
-    echo "file $OPENAIR_DIR/targets/bin/oaisim.Rel10" > ~/.gdb_enb_ue_s1
+    echo "file $OPENAIR_DIR/targets/bin/oaisim.Rel14" > ~/.gdb_enb_ue_s1
     echo "set args $exe_arguments" >> ~/.gdb_enb_ue_s1
     echo "run"                        >> ~/.gdb_enb_ue_s1
     cat ~/.gdb_enb_ue_s1
-- 
GitLab