Changeset 490038 for test_all.sh


Ignore:
Timestamp:
Aug 17, 2010, 5:16:34 PM (15 years ago)
Author:
Frederik Heber <heber@…>
Branches:
Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
Children:
2f6f51
Parents:
293afd
git-author:
Frederik Heber <heber@…> (08/17/10 14:14:34)
git-committer:
Frederik Heber <heber@…> (08/17/10 17:16:34)
Message:

added --with-valgrind switch to configure script.

  • if given, we use valgrind in the testsuite call and fail when valgrind reports errors or leaking memory.
  • is off by default.
  • test_all.sh:
    • CXXFLAGS needs to be stated after configure such that configure can store the set value (also in its log)
    • always compiles with -Wall
    • in case of -g3 we use --with-valgrind to enable valgrinding of testsuite
    • extended function configure() to three arguments, to allow for recognizing "-g3"
File:
1 edited

Legend:

Unmodified
Added
Removed
  • test_all.sh

    r293afd r490038  
    11#!/bin/bash
    22
    3 optimizations=("-O0"\
     3optimizations=("-g3"\
     4               "-O0"\
    45               "-O1"\
    56               "-O2"\
     
    4950}
    5051
     52function logdate()
     53{
     54  echo -e "Launched on `date`.\n\n" >> $logfile 2>&1;
     55}
     56
     57
    5158while getopts “ho:f:j:scO:t:p:” OPTION
    5259do
     
    105112function configure(){
    106113  echo "Configuring";
    107   CXXFLAGS="$2" $1/configure --prefix=$PWD >> $logfile 2>&1;
     114  $1/configure $3 --prefix=$PWD CXXFLAGS="-Wall $2" >> $logfile 2>&1;
    108115}
    109116
     
    134141    then
    135142      echo -n "    $test: " >> $outfile;
    136       valgrind -v --error-exitcode=255 $test >> $logfile 2>&1;
     143      valgrind -v --leak-check=full --leak-resolution=high --show-reachable=yes --error-exitcode=255 $test >> $logfile 2>&1;
    137144      if [ $? ]
    138145      then
     
    149156function test(){
    150157
    151   echo "Testing with \"$2\"";
     158  echo "Testing with \"$2 $3\"";
    152159  echo "" >> $logfile;
    153160  echo "" >> $logfile;
    154161  echo "" >> $logfile;
    155   echo "Testing with \"$2\"" >> $logfile;
    156 
    157   echo -n "  Configuring: " >> $outfile;
    158   if configure "$1" "$2"
     162  echo "Testing with \"$2 $3\"" >> $logfile;
     163
     164  if [ x"$2" == x"-g3" ]
     165  then
     166    valgrind="--with-valgrind"
     167  else
     168    valgrind="--without-valgrind"
     169  fi
     170  echo -n "  Configuring $valgrind: " >> $outfile;
     171  if configure "$1" "$2 $3" "$valgrind"
    159172  then
    160173    echo "OK" >> $outfile;
     
    201214
    202215function run(){
    203   echo "Testing with \"$1\":" >> $outfile;
     216  echo "Testing with \"$1 $2\":" >> $outfile;
    204217  testdir=`mktemp -d --tmpdir=$tmpdir $tmppattern.XXXXXXXXXX`;
    205218  basedir=$PWD;
    206219  cd $testdir;
    207   test "$basedir" "$1";
     220  test "$basedir" "$1" "$2";
    208221  cd $basedir;
    209222  rm -rf $testdir;
     
    220233  for option in "${options[@]}"
    221234  do
    222     run "$optimization $option";
     235    run "$optimization" "$option";
    223236  done
    224237done
Note: See TracChangeset for help on using the changeset viewer.