From f5817145486df18f92072212117a713cec1e4219 Mon Sep 17 00:00:00 2001 From: Yaroslav Brustinov Date: Sun, 30 Oct 2016 16:10:59 +0200 Subject: add ifdef guard to .h file remove UUID from TUI STF Python API: show newlines instead of "\n\n\n" in Exception message STF Python API: remove "During handling of the above exception, another exception occurred:" in Python3.3+ dpdk_nic_bind.py: ensure needed PATH exists for lspci etc. t-rex-64: remove "stty: standard input: Inappropriate ioctl for device" t-rex-64: remove "cat: write error: Broken pipe" Signed-off-by: Yaroslav Brustinov --- scripts/t-rex-64 | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'scripts/t-rex-64') diff --git a/scripts/t-rex-64 b/scripts/t-rex-64 index 4d0d7813..d2388cfd 100755 --- a/scripts/t-rex-64 +++ b/scripts/t-rex-64 @@ -24,9 +24,16 @@ done <<< "$($PYTHON dpdk_setup_ports.py --dump-pci-description)" cd $(dirname $0) export LD_LIBRARY_PATH=$PWD -saveterm="$(stty -g)" + +if [ -t 0 ] && [ -t 1 ]; then + export is_tty=true + saveterm="$(stty -g)" +else + export is_tty=false +fi + # if we have a new core run optimized trex -if cat /proc/cpuinfo | grep -q avx ; then +if grep -q avx /proc/cpuinfo ; then ./_$(basename $0) $INPUT_ARGS RESULT=$? if [ $RESULT -eq 132 ]; then @@ -40,7 +47,10 @@ else ./_t-rex-64-o $INPUT_ARGS RESULT=$? fi -stty $saveterm + +if $is_tty; then + stty $saveterm +fi if [ $RESULT -ne 0 ]; then exit $RESULT -- cgit 1.2.3-korg