source: test_all.sh@ 293afd

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
Last change on this file since 293afd was a881f5, checked in by Frederik Heber <heber@…>, 14 years ago

Merge branch 'StructureRefactoring' into stable

Conflicts:

src/Actions/AnalysisAction/PairCorrelationAction.hpp
src/Actions/AnalysisAction/SurfaceCorrelationAction.hpp

  • due to different ordering of vector, string includes
  • Property mode set to 100755
File size: 4.3 KB
RevLine 
[7e0a6d]1#!/bin/bash
2
3optimizations=("-O0"\
4 "-O1"\
5 "-O2"\
6 "-O3"\
7 "-Os");
8
9options=("" \
10 "-DLOG_OBSERVER" \
11 "-DNO_MEMDEBUG" \
12 "-DNO_CACHING" \
13 "-DNDEBUG" \
14 "-DNO_MEMDEBUG -DLOG_OBSERVER" \
15 "-DNO_CACHING -DLOG_OBSERVER" \
16 "-DNO_CACHING -DNO_MEMDEBUG" \
17 "-DNDEBUG -DNO_CACHING" \
18 "-DNO_CACHING -DNO_MEMDEBUG -DLOG_OBSERVER" \
19 );
20
21outfile="test.log";
22logfile="full.log";
[c644a5]23noprocs=1;
[7e0a6d]24docheck=0;
25docheck_mem=0;
26if [ -n "$TMPDIR" ]
27then
28 tmpdir="$TMPDIR";
29else
30 tmpdir="/tmp";
31fi
32tmppattern="MolecuilderTest";
33
34function usage(){
35 echo "usage $0 options";
36 echo "";
37 echo "This script runs a full test for molecuilder, using several compilation options";
38 echo "";
39 echo "OPTIONS:";
40 echo " -h Show this message"
41 echo " -o <outfile> Outfile to use for test results";
42 echo " -f <logfile> File to use for output from commands";
[c644a5]43 echo " -j <no_proc> Parallel compiling and tests";
[7e0a6d]44 echo " -s Short tests (no memcheck)";
45 echo " -c Only configure and compile (implies -s)";
46 echo " -O <opt-level> Only compile this optimization level";
47 echo " -t <tmpDir> Use tmpDir as temporary directory";
[c644a5]48 echo " -p <prefix> Prefix to use for directory names (standard MolecuilderTest)";
[7e0a6d]49}
50
[c644a5]51while getopts “ho:f:j:scO:t:p:” OPTION
[7e0a6d]52do
53 case $OPTION in
54 h)
55 usage;
56 exit 0;
57 ;;
58 o)
59 outfile="$OPTARG";
60 ;;
61 f)
62 logfile="$OPTARG";
63 ;;
[c644a5]64 j)
65 noprocs=("$OPTARG");
66 ;;
[7e0a6d]67 s)
68 docheck_mem=1;
69 ;;
70 c)
71 docheck=1;
72 docheck_mem=1;
73 ;;
74 O)
75 optimizations=("-O$OPTARG");
76 ;;
77 t)
78 tmpdir="$OPTARG";
79 ;;
80 p)
81 tmppattern="$OPTARG";
82 ;;
83 ?)
84 usage;
85 exit 1;
86 ;;
87 esac
88done
89
90# test if all arguments were provided
91if [[ -z "$outfile" ]] || [[ -z "$logfile" ]] || [[ -z "$tmpdir" ]] || [[ -z "$tmppattern" ]]
92then
93 usage;
94 exit 1;
95fi
96
97# turn all relative paths into absolutes
98outfile=`realpath -s $outfile`;
99logfile=`realpath -s $logfile`;
100tmpdir=`realpath -s $tmpdir`;
101
102
103BOOST_ROOT=/opt/packages/boost;
104
105function configure(){
106 echo "Configuring";
107 CXXFLAGS="$2" $1/configure --prefix=$PWD >> $logfile 2>&1;
108}
109
110function compile(){
111 echo "Making";
[c644a5]112 if [ $noprocs -gt 1 ]; then
[5fbaeb]113 make -j$noprocs all >>$logfile 2>&1;
[c644a5]114 else
[5fbaeb]115 make all >>$logfile 2>&1;
[c644a5]116 fi
[7e0a6d]117}
118
119function check(){
120 echo "Checking";
[c644a5]121 if [ $noprocs -gt 1 ]; then
122 make -j$noprocs check >> $logfile 2>&1;
123 else
124 make check >> $logfile 2>&1;
125 fi
[7e0a6d]126}
127
128function memcheck(){
129 echo "Valgrinding";
130 retval=0;
[1e1dac]131 for test in src/unittests/*
[7e0a6d]132 do
133 if [ -x "$test" ]
134 then
135 echo -n " $test: " >> $outfile;
136 valgrind -v --error-exitcode=255 $test >> $logfile 2>&1;
[04e61a]137 if [ $? ]
[7e0a6d]138 then
139 echo "OK" >> $outfile
140 else
141 echo "FAIL" >> $outfile;
142 retval=1;
143 fi
144 fi
145 done
146 return $retval
147}
148
149function test(){
150
151 echo "Testing with \"$2\"";
[e24c78]152 echo "" >> $logfile;
153 echo "" >> $logfile;
154 echo "" >> $logfile;
155 echo "Testing with \"$2\"" >> $logfile;
[7e0a6d]156
157 echo -n " Configuring: " >> $outfile;
158 if configure "$1" "$2"
159 then
160 echo "OK" >> $outfile;
161 else
162 echo "FAIL" >> $outfile;
163 return;
164 fi
165
166 echo -n " Compiling: " >> $outfile;
167 if compile
168 then
169 echo "OK" >> $outfile;
170 else
171 echo "FAIL" >> $outfile;
172 return;
173 fi
174
175 if [ $docheck ]
176 then
177 echo -n " Running testsuite: " >> $outfile;
178 if check
179 then
180 echo "OK" >> $outfile;
181 else
182 echo "FAIL" >> $outfile;
183 return;
184 fi
185 fi
186
187 if [ $docheck_mem ]
188 then
189 echo " Checking memory Errors:..." >> $outfile;
190 if memcheck
191 then
192 echo " ...OK" >> $outfile
193 else
194 echo " ...FAIL" >> $outfile
195 return
196 fi
197 fi
198}
199
200
201
202function run(){
203 echo "Testing with \"$1\":" >> $outfile;
204 testdir=`mktemp -d --tmpdir=$tmpdir $tmppattern.XXXXXXXXXX`;
205 basedir=$PWD;
206 cd $testdir;
207 test "$basedir" "$1";
208 cd $basedir;
209 rm -rf $testdir;
210 echo "" >> $outfile;
211}
212
213
214echo -n "Full compilation test for Molecuilder started on " > $outfile;
215date >> $outfile;
216echo "" > $logfile;
217
218for optimization in "${optimizations[@]}"
219do
220 for option in "${options[@]}"
221 do
222 run "$optimization $option";
223 done
224done
225
226echo -n "Full compilation test for Molecuilder on " >> $outfile
227date >> $outfile
Note: See TracBrowser for help on using the repository browser.