[GRASS-SVN] r73997 - grass/trunk/testsuite/examples

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jan 22 01:27:39 PST 2019


Author: neteler
Date: 2019-01-22 01:27:39 -0800 (Tue, 22 Jan 2019)
New Revision: 73997

Modified:
   grass/trunk/testsuite/examples/test_framework_GRASS_GIS_with_NC.conf
   grass/trunk/testsuite/examples/test_framework_GRASS_GIS_with_NC.sh
Log:
test_framework_GRASS_GIS_with_NC.sh: autodetect ARCH; customizable FREECPU

Modified: grass/trunk/testsuite/examples/test_framework_GRASS_GIS_with_NC.conf
===================================================================
--- grass/trunk/testsuite/examples/test_framework_GRASS_GIS_with_NC.conf	2019-01-22 09:11:26 UTC (rev 73996)
+++ grass/trunk/testsuite/examples/test_framework_GRASS_GIS_with_NC.conf	2019-01-22 09:27:39 UTC (rev 73997)
@@ -1,7 +1,5 @@
 ### CONFIGURATION
 #
-# computer architecture:
-ARCH=x86_64-pc-linux-gnu
 # name of binary:
 GRASSBIN=grass77
 # source code directory as full path:
@@ -9,6 +7,9 @@
 # temporary grassdata directory
 GRASSDATA="$HOME/grassdata/tests-grassdata"
 
+# leave 1 or more CPU free for other usage than testing
+FREECPU=1
+
 # Python binary to be used (python|python3)
 PYTHON=python
 

Modified: grass/trunk/testsuite/examples/test_framework_GRASS_GIS_with_NC.sh
===================================================================
--- grass/trunk/testsuite/examples/test_framework_GRASS_GIS_with_NC.sh	2019-01-22 09:11:26 UTC (rev 73996)
+++ grass/trunk/testsuite/examples/test_framework_GRASS_GIS_with_NC.sh	2019-01-22 09:27:39 UTC (rev 73997)
@@ -65,6 +65,9 @@
 
 set -e  # fail fast
 
+# computer architecture:
+ARCH=`${GRASSBIN} --config arch`
+
 # here we suppose default compilation settings of GRASS GIS and no make install
 GRASSBIN="$GRASSSRC/bin.${ARCH}/${GRASSBIN}"
 GRASSDIST="$GRASSSRC/dist.${ARCH}"
@@ -79,8 +82,11 @@
 
 # get number of processors of current machine
 MYNPROC=`getconf _NPROCESSORS_ONLN`
-# leave one PROC free for other tasks
-GCCTHREADS=`expr $MYNPROC - 1`
+# leave some free for other tasks
+GCCTHREADS=`expr $MYNPROC - $FREECPU`
+if [ $GCCTHREADS -lt 1 ] ; then
+   GCCTHREADS=1
+fi
 
 # contains last executed command stdout and stderr
 # here were rely on reports being absolute



More information about the grass-commit mailing list