[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cmake
Subject:    Re: [CMake] many false positives in ctest error/warning reporting
From:       Matthias Kretz <kretz () kde ! org>
Date:       2011-05-23 11:56:49
Message-ID: 201105231356.49557.kretz () kde ! org
[Download RAW message or body]

Hi,

On Saturday 21 May 2011 12:38:58 Alexander Neundorf wrote:
> On Thursday 19 May 2011, Matthias Kretz wrote:
> > On Tuesday 10 May 2011 21:47:41 Alexander Neundorf wrote:
> > > Are you using cmake >= 2.8 ?
> > > If so, there the switch CTEST_USE_LAUNCHERS. If this is set in your
> > > ctest- script, the output parsing works better.
> > 
> > After I set CTEST_USE_LAUNCHERS (I didn't change anything else at the
> > same time), all warnings and errors are suppressed. I.e. the dashboard
> > sees 0 warnings and 0 errors on every build now. Which is clearly wrong.
> 
> No idea, I never had such problems myself.
> Can you post the ctest script and the ctest settings file you are using ?

I attached the four files, which are the most relevant (You can browse the 
whole repo at http://code.compeng.uni-frankfurt.de/projects/vc/repository). I 
start nightly runs with
% ./Test_vc.sh Nightly

The shell script gathers meta information and exports it via env vars to the 
test.cmake script.

(One day I'd like to get rid of the wrapping shell script and do it all in the 
test.cmake script.)

Regards,
	Matthias

-- 
________________________________________________________
Matthias Kretz (Germany)                            <><
http://kretzfamily.de/

["test.cmake" (application/octet-stream)]
["Test_vc.sh" (application/octet-stream)]

#!/bin/bash


function print_example(){
echo "##################################################################"
echo "# To set the required parameters for the source and the build    #"
echo "# directory for ctest, put the export commands below to a        #"
echo "# separate file which is read during execution and which is      #"
echo "# defined on the command line.                                   #"
echo "# Set all parameters according to your needs.                    #"
echo "# LINUX_FLAVOUR should be set to the distribution you are using  #"
echo "# eg Debian, SuSe etc.                                           #"
echo "# This information is only needed to get some information about  #"
echo "# systems which show problems                                    #"
echo "# For example                                                    #"
echo "#!/bin/bash                                                      #"
echo "#export LINUX_FLAVOUR=Etch32                                     #"
echo "#export VC_BUILDDIR=<path_to_your_build_directory>               #"
echo "#export VC_SOURCEDIR=<path_to_source_directory_of_vc>            #"
echo "##################################################################"
}

if [ "$#" -lt "1" ]; then
  echo "Usage: $0 <Experimental|Nightly|Continuous> [config]"
  echo ""
  echo "The first parameter is the ctest model:"
  echo "Possible arguments are Nightly, Continuous, or Experimental."
  echo ""
  echo "The second parameter is optional. You may specify a file"
  echo "containg the information about the setup at the client"
  echo "installation (see example below)."
  echo ""
  print_example
  exit 1
fi

# test if a ctest model is either Experimantal or Nightly
if [ "$1" == "Experimental" -o "$1" == "Nightly" -o "$1" == "Continuous" ]; then
  echo ""
else
  echo "-- Error -- The CTest model \"$1\" is not supported."
  echo "-- Error -- Possible arguments are Nightly, Continuous, or Experimental."
  exit 1
fi  

# test if the input file exists and execute it
test -f "$2" && source "$2"

test -z "$VC_SOURCEDIR" && VC_SOURCEDIR="`dirname $0`"
cd "$VC_SOURCEDIR"
export VC_SOURCEDIR="$PWD" # making sure VC_SOURCEDIR is an absolute path

# set the ctest model to command line parameter
export ctest_model=$1

# test for architecture
arch=$(uname -s | tr '[A-Z]' '[a-z]')
chip=$(uname -m | tr '[A-Z]' '[a-z]')

# extract information about the system and the machine and set
# environment variables used by ctest
SYSTEM=$arch-$chip
if test -z "$CXX" ; then
  COMPILER="`g++ --version 2>&1|head -n1`"
else
  COMPILER="`"$CXX" --version 2>&1|head -n1`"
fi
branch=`cat .git/HEAD|cut -d/ -f3`

LABEL1="$branch $arch $chip $COMPILER $CXXFLAGS"
if test "$arch" = "linux"; then
  test -z "$LINUX_FLAVOUR" && LINUX_FLAVOUR=`lsb_release -d|cut -f2`
  if test -n "$LINUX_FLAVOUR"; then
    LABEL1="$branch $LINUX_FLAVOUR $chip $COMPILER $CXXFLAGS"
  fi
fi
export LABEL=$(echo $LABEL1 | sed -e 's#/#_#g')

# get the number of processors
# and information about the host
if [ "$arch" = "linux" ];
then
  export number_of_processors=$(cat /proc/cpuinfo | grep processor | wc -l)
  export SITE=$(hostname -s 2>/dev/null || hostname)
elif [ "$arch" = "darwin" ];
then
  export number_of_processors=$(sysctl -n hw.ncpu)
  export SITE=$(hostname -s)
fi

echo "************************"
date
echo "LABEL: $LABEL"
echo "SITE:  $SITE"
echo "Model: ${ctest_model}"
echo "Nr. of processes: " $number_of_processors
echo "************************"

test -z "$VC_BUILDDIR" && export VC_BUILDDIR="$VC_SOURCEDIR/build-${ctest_model}-${LABEL//[\[\] ()]/_}"
test -d "$VC_BUILDDIR" || mkdir -p "$VC_BUILDDIR"

ctest --debug -S test.cmake -V 2>&1 | tee "${VC_BUILDDIR}_ctest-debug.log"

["CTestCustom.cmake" (application/octet-stream)]
["CTestConfig.cmake" (application/octet-stream)]

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic