1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-09 23:45:36 +00:00

Tests in subdirectories are not built by default

This commit is contained in:
Antonin Portelli 2016-08-02 12:14:28 +01:00
parent bb99ce0680
commit a7b483d67a

View File

@ -1,60 +1,47 @@
#!/bin/bash #!/usr/bin/env bash
home=`pwd` home=`pwd`
# library Make.inc
cd $home/lib cd $home/lib
HFILES=`find . -type f -name '*.h' -not -path '*/Old/*' -not -path '*/Eigen/*'` HFILES=`find . -type f -name '*.h' -not -path '*/Old/*' -not -path '*/Eigen/*'`
HFILES="$HFILES" HFILES="$HFILES"
CCFILES=`find . -type f -name '*.cc' -not -name '*ommunicator*.cc'` CCFILES=`find . -type f -name '*.cc' -not -name '*ommunicator*.cc'`
echo> Make.inc echo HFILES=$HFILES > Make.inc
echo HFILES=$HFILES >> Make.inc
echo >> Make.inc echo >> Make.inc
echo CCFILES=$CCFILES >> Make.inc echo CCFILES=$CCFILES >> Make.inc
# tests Make.inc
cd $home/tests cd $home/tests
dirs=`find . -type d ` dirs=`find . -type d `
for subdir in $dirs; do
for subdir in $dirs cd $home/tests/$subdir
do TESTS=`ls T*.cc`
TESTLIST=`echo ${TESTS} | sed s/.cc//g `
cd $home/tests/$subdir PREF=`[ $subdir = '.' ] && echo noinst || echo EXTRA`
echo "tests: ${TESTLIST}" > Make.inc
TESTS=`ls T*.cc` echo ${PREF}_PROGRAMS = ${TESTLIST} >> Make.inc
TESTLIST=`echo ${TESTS} | sed s/.cc//g ` echo >> Make.inc
for f in $TESTS; do
echo noinst_PROGRAMS = > Make.inc BNAME=`basename $f .cc`
echo noinst_PROGRAMS += ${TESTLIST} >> Make.inc echo ${BNAME}_SOURCES=$f >> Make.inc
echo >> Make.inc echo ${BNAME}_LDADD=-lGrid>> Make.inc
for f in $TESTS echo >> Make.inc
do done
BNAME=`basename $f .cc`
echo >> Make.inc
echo ${BNAME}_SOURCES=$f >> Make.inc
echo ${BNAME}_LDADD=-lGrid>> Make.inc
echo >> Make.inc
done
done done
# benchmarks Make.inc
cd $home/benchmarks cd $home/benchmarks
echo> Make.inc echo> Make.inc
TESTS=`ls B*.cc` TESTS=`ls B*.cc`
TESTLIST=`echo ${TESTS} | sed s/.cc//g ` TESTLIST=`echo ${TESTS} | sed s/.cc//g `
echo bin_PROGRAMS = ${TESTLIST} > Make.inc
echo > Make.inc
echo bin_PROGRAMS = ${TESTLIST} >> Make.inc
echo >> Make.inc
for f in $TESTS
do
BNAME=`basename $f .cc`
echo >> Make.inc
echo ${BNAME}_SOURCES=$f >> Make.inc
echo ${BNAME}_LDADD=-lGrid>> Make.inc
echo >> Make.inc echo >> Make.inc
for f in $TESTS; do
BNAME=`basename $f .cc`
echo ${BNAME}_SOURCES=$f >> Make.inc
echo ${BNAME}_LDADD=-lGrid>> Make.inc
echo >> Make.inc
done done
cd .. cd ..