From 47ffbb4da31bbd7b167ce58d14e228608b37510a Mon Sep 17 00:00:00 2001 From: Jean-Sebastien Gelinas Date: Fri, 24 Jul 2009 12:50:43 -0400 Subject: [PATCH] tests: use most recent nitc if not supplied Signed-off-by: Jean-Sebastien Gelinas Signed-off-by: Jean Privat --- tests/tests.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/tests/tests.sh b/tests/tests.sh index 4314ea9..5b32a7d 100755 --- a/tests/tests.sh +++ b/tests/tests.sh @@ -20,9 +20,6 @@ # Set lang do default to avoid failed tests because of locale export LANG=C -# The default nitc compiler -[ -z "$NITC" ] && NITC=../bin/nitc - usage() { e=`basename "$0"` @@ -81,6 +78,19 @@ function process_result() fi } +find_nitc() +{ + recent=`ls -t ../src/nitc ../src/nitc_[0-9] ../bin/nitc ../c_src/nitc 2>/dev/null | head -1` + if [[ "x$recent" == "x" ]]; then + echo 'Could not find nitc, aborting' + exit 1 + fi + echo 'Using nitc from: '$recent + NITC=$recent +} + +# The default nitc compiler +[ -z "$NITC" ] && find_nitc verbose=false stop=false -- 1.7.9.5