Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Test -eq is for numerical values.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Thu, 27 Jun 2013 12:10:52 +0000 (14:10 +0200)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Thu, 27 Jun 2013 12:11:37 +0000 (14:11 +0200)
Use construct "Use Alternate Value" to achieve the desired effect.

teshsuite/smpi/mpich-test/coll/runtests

index 9026867..168ade1 100755 (executable)
@@ -77,11 +77,7 @@ if [ ! -x coll1 -a $makeeach = 0 -a $runtests = 1 ] ; then
     $MAKE
 fi
 
-if [ $have_selector -eq "" ] ; then 
-selector=""
-else
-selector="--cfg=smpi/coll_selector:$have_selector"
-fi
+selector=${have_selector:+--cfg=smpi/coll_selector:$have_selector}
 
 mpirun=" ${basedir}/bin/smpirun -platform ${srcdir}/../../../../examples/msg/small_platform_with_routers.xml -hostfile ${srcdir}/../../hostfile  --log=root.thres:critical  $selector "
 testfiles=""