source: utils/developer/createGuiChecks.sh@ 161fed

Action_Thermostats Add_AtomRandomPerturbation Add_RotateAroundBondAction Add_SelectAtomByNameAction Adding_Graph_to_ChangeBondActions Adding_MD_integration_tests Adding_StructOpt_integration_tests AutomationFragmentation_failures Candidate_v1.6.0 Candidate_v1.6.1 ChangeBugEmailaddress ChangingTestPorts ChemicalSpaceEvaluator Combining_Subpackages Debian_Package_split Debian_package_split_molecuildergui_only Disabling_MemDebug Docu_Python_wait EmpiricalPotential_contain_HomologyGraph_documentation Enable_parallel_make_install Enhance_userguide Enhanced_StructuralOptimization Enhanced_StructuralOptimization_continued Example_ManyWaysToTranslateAtom Exclude_Hydrogens_annealWithBondGraph FitPartialCharges_GlobalError Fix_ChronosMutex Fix_StatusMsg Fix_StepWorldTime_single_argument Fix_Verbose_Codepatterns ForceAnnealing_goodresults ForceAnnealing_oldresults ForceAnnealing_tocheck ForceAnnealing_with_BondGraph ForceAnnealing_with_BondGraph_continued ForceAnnealing_with_BondGraph_continued_betteresults ForceAnnealing_with_BondGraph_contraction-expansion GeometryObjects Gui_displays_atomic_force_velocity IndependentFragmentGrids_IntegrationTest JobMarket_RobustOnKillsSegFaults JobMarket_StableWorkerPool JobMarket_unresolvable_hostname_fix PartialCharges_OrthogonalSummation PythonUI_with_named_parameters QtGui_reactivate_TimeChanged_changes Recreated_GuiChecks RotateToPrincipalAxisSystem_UndoRedo StoppableMakroAction TremoloParser_IncreasedPrecision TremoloParser_MultipleTimesteps Ubuntu_1604_changes stable
Last change on this file since 161fed was b9e47e, checked in by Frederik Heber <heber@…>, 9 years ago

TESTFIX: Marked molecule translation guicheck tests as XFAIL.

  • so far, we cannot use a MakroAction as a python function except if not arguments are required. Hence, for the moment we mark it as XFAIL.
  • The problem is with the boost::python::def function. We need to fill its arguments during compile-time but that would require some weird preprocessor magic going through all Actions contained in the MakroAction's sequence.
  • Property mode set to 100755
File size: 3.3 KB
Line 
1#!/bin/bash
2
3test ! -z $1 || { echo "Usage: $0 <relative destdir>"; exit 255; }
4DIR=$1
5
6# false
7exceptions=(
8"testsuite-options-no-elements-db.at"
9"testsuite-options-invalid-commands.at"
10"testsuite-options-empty-configs.at"
11"testsuite-options-store-session-cli.at"
12"testsuite-options-store-session-python.at"
13"testsuite-options-load-session-python.at"
14"testsuite-options-dryrun.at"
15"testsuite-options-no-dryrun.at"
16"testsuite-options-dryrun-storesession.at"
17)
18
19# mark as XFAIL_IF
20failing_ones=(
21"testsuite-molecules-translation.at"
22"testsuite-molecules-translation-periodic.at"
23)
24
25# copy Makefile.am
26#cp Makefile.am $DIR
27#cp testsuite.at $DIR
28
29# go over all testsuite files
30for file in `find . -name 'testsuite*.at' | grep -v "/testsuite\.at"`; do
31 filename=`basename ${file} | sed -e "s#testsuite#session#" -e "s#\.at#.py#"`
32 basename=`basename $file`
33 dirname=`dirname $file`
34 found=0
35 for e in `seq 0 $((${#exceptions[*]}-1))`; do
36 if test "$basename" == "${exceptions[$e]}"; then
37 echo "${exceptions[$e]} is excluded."
38 found=1
39 fi
40 done
41 if test $found != 1; then
42 mkdir -p $DIR/$dirname
43 sed -e ':x; /\\$/ { N; s/\\\n//; tx }' -e "s#\(AT_CHECK(\)\[../../molecuilder \([^]]*\)\][[:space:]]*,[[:space:]]*\([0-9]*\)\(.*\)#\1[../../molecuilder --dry-run \2 --no-dry-run --store-session $filename --session-type python], 0\4\nAT_CHECK([grep -v \"Command.*DryRun\" $filename >${filename/.py/_new.py}], 0, [ignore], [ignore])\n\1[../../molecuilderguitest ${filename/.py/_new.py}], \3\4#" -e "/^AT_CHECK(\[[a-z]*grep.*stdout/d" -e "s#CommandVerbose(\".*\")#CommandVerbose(\"1\")#" $file >$DIR/$file
44 for f in `seq 0 $((${#failing_ones[*]}-1))`; do
45 if test "$basename" == "${failing_ones[$f]}"; then
46 sed -i -e "s#\(AT_KEYWORDS.*\)#\1\nAT_XFAIL_IF([/bin/true])#" $DIR/$file
47 echo "${failing_ones[$f]} is set to XFAIL."
48 fi
49 done
50 else
51 rm -f $DIR/$file
52 fi
53done
54
55# grep and remove exceptions from all top-level testsuite files
56testscripts=""
57for file in `find . -name 'testsuite*.at' | grep -v "/testsuite\.at"`; do
58 basename=`basename $file`
59 found=1
60 while test $found == 1; do
61 found=0
62 for e in `seq 0 $((${#exceptions[*]}-1))`; do
63 grep -E "m4_include.*${exceptions[$e]}" $DIR/$file &>/dev/null
64 if test $? == 0; then
65 echo "${exceptions[$e]} is removed from $DIR/$file."
66 found=1
67 # remove from file
68 mv -f $DIR/$file $DIR/${file}.bak
69 cat <$DIR/${file}.bak | grep -v -E "m4_include.*${exceptions[$e]}" >$DIR/$file
70 rm -f $DIR/${file}.bak
71 fi
72 done
73 done
74 removed=0
75 for e in `seq 0 $((${#exceptions[*]}-1))`; do
76 if test "$basename" == "${exceptions[$e]}"; then
77 removed=1
78 fi
79 done
80 if test $removed == 0; then
81 # add to TESTSCRIPTS
82 if test -z "$testscripts"; then
83 testscripts="\t\$(srcdir)/${file}"
84 else
85 testscripts="${testscripts} \\\\\n\t\$(srcdir)/${file}"
86 fi
87 fi
88done
89
90# modify TESTSCRIPTS variable in Makefile.am
91startline=`grep -n "TESTSCRIPTS =" $DIR/Makefile.am | awk -F":" '{print $1}'`
92endline=`grep -n "DISTCLEANFILES =" $DIR/Makefile.am | awk -F":" '{print $1}'`
93mv $DIR/Makefile.am $DIR/Makefile.am.bak
94head -n $startline $DIR/Makefile.am.bak >$DIR/Makefile.am
95echo -e "\t\$(srcdir)/./Testlauncher/testsuite-testlauncher-works.at \\" >>$DIR/Makefile.am
96echo -e "${testscripts}" >>$DIR/Makefile.am
97echo -e -n "\n" >>$DIR/Makefile.am
98tail -n +${endline} $DIR/Makefile.am.bak >>$DIR/Makefile.am
99rm -f $DIR/Makefile.am.bak
100
101exit 0
Note: See TracBrowser for help on using the repository browser.