Tests: Cleanup redundant code and use printing helper functions
[lttng-tools.git] / tests / ust / low-throughput / run
index 8beaf60a5413a4a3f3ae133bdba9f06065e772bf..219a6417e38c3e9193339e91f17b2479df79a8a5 100755 (executable)
@@ -14,6 +14,7 @@
 # You should have received a copy of the GNU Lesser General Public License
 # along with this library; if not, write to the Free Software Foundation, Inc.,
 # 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
+TEST_DESC="UST tracer - Testing low events throughput"
 
 CURDIR=$(dirname $0)/
 TESTDIR=$CURDIR/../..
@@ -23,11 +24,9 @@ EVENT_NAME="tp:slow"
 
 source $TESTDIR/utils.sh
 
-echo -e "\n-------------------------------------------"
-echo -e "UST tracer - Testing low events throughput"
-echo -e "-------------------------------------------"
+print_test_banner "$TEST_DESC"
 
-if [ ! -e "$CURDIR/$BIN_NAME" ]; then
+if [ ! -x "$CURDIR/$BIN_NAME" ]; then
        echo -e "No UST nevents binary detected. Passing."
        exit 0
 fi
@@ -92,9 +91,9 @@ done
 
 if [ $out -eq 0 ]; then
        echo -n "Trace is coherent... "
-       echo -e "\e[1;32mOK\e[0m"
+       print_ok
 else
-       echo -e "\e[1;31mFAILED\e[0m"
+       print_fail
 fi
 
 rm -rf $TRACE_PATH
This page took 0.024253 seconds and 4 git commands to generate.