~ce-orange-squad/charms/precise/jenkins-launchpad/trunk

« back to all changes in this revision

Viewing changes to templates/generic-mediumtests.xml

  • Committer: Aaron Bentley
  • Date: 2013-09-26 20:45:12 UTC
  • Revision ID: aaron@canonical.com-20130926204512-1qvov8cxq128fbi2
Initial commit with confidential info removed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version='1.0' encoding='UTF-8'?>
 
2
<project>
 
3
  <actions/>
 
4
  <description></description>
 
5
  <keepDependencies>false</keepDependencies>
 
6
  <properties>
 
7
    <hudson.queueSorter.PrioritySorterJobProperty>
 
8
      <priority>100</priority>
 
9
    </hudson.queueSorter.PrioritySorterJobProperty>
 
10
    <hudson.model.ParametersDefinitionProperty>
 
11
      <parameterDefinitions>
 
12
        <hudson.model.StringParameterDefinition>
 
13
          <name>landing_candidate</name>
 
14
          <description>The candidate branch to build and test</description>
 
15
          <defaultValue></defaultValue>
 
16
        </hudson.model.StringParameterDefinition>
 
17
        <hudson.model.StringParameterDefinition>
 
18
          <name>test_suite</name>
 
19
          <description>The name for the test suite (e.g. camera_app).</description>
 
20
          <defaultValue></defaultValue>
 
21
        </hudson.model.StringParameterDefinition>
 
22
        <hudson.model.StringParameterDefinition>
 
23
          <name>hooks</name>
 
24
          <description>Additional hooks for the build</description>
 
25
          <defaultValue>D08add_ppa-qt5-proper D09add_ppa-ubuntu-sdk-team-ppa</defaultValue>
 
26
        </hudson.model.StringParameterDefinition>
 
27
        <hudson.model.StringParameterDefinition>
 
28
          <name>target_branch</name>
 
29
          <description>The target branch to merge into</description>
 
30
          <defaultValue></defaultValue>
 
31
        </hudson.model.StringParameterDefinition>
 
32
      </parameterDefinitions>
 
33
    </hudson.model.ParametersDefinitionProperty>
 
34
  </properties>
 
35
  <scm class="hudson.scm.NullSCM"/>
 
36
  <assignedNode>mediumtests-slave</assignedNode>
 
37
  <canRoam>false</canRoam>
 
38
  <disabled>false</disabled>
 
39
  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
 
40
  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
 
41
  <triggers class="vector"/>
 
42
  <concurrentBuild>true</concurrentBuild>
 
43
  <builders>
 
44
    <com.ubuntu.builder.PBuilderPlugin>
 
45
      <hooks>$hooks A20bump_version_autopilot</hooks>
 
46
      <mainBranch>$landing_candidate</mainBranch>
 
47
      <packagingBranch></packagingBranch>
 
48
      <targetBranch>$target_branch</targetBranch>
 
49
      <extraHookDir></extraHookDir>
 
50
      <parallelJobs>2</parallelJobs>
 
51
      <distroArch>saucy-amd64</distroArch>
 
52
    </com.ubuntu.builder.PBuilderPlugin>
 
53
    <hudson.tasks.Shell>
 
54
      <command>#!/bin/bash
 
55
set -x 
 
56
 
 
57
 
 
58
export REPOLIST=/etc/apt/sources.list.d/00localrepo.list
 
59
 
 
60
sudo sh -c &quot;echo \&quot;deb file://`pwd`/work/output/ ./\&quot; &gt; $REPOLIST&quot;
 
61
cd work/output
 
62
dpkg-scanpackages . /dev/null | gzip -9c &gt; Packages.gz
 
63
cd -
 
64
 
 
65
sudo apt-get update
 
66
# (mmrazik) there seems to be a bug in rsyslog and during update &quot;rsyslog restart&quot; command just hands
 
67
sudo apt-mark hold rsyslog
 
68
sudo apt-get -y upgrade
 
69
 
 
70
package_list=&quot;&quot;
 
71
for i in `ls work/output/*.deb`; do
 
72
  package_name=`dpkg -I $i | grep Package | cut -d &quot; &quot; -f 3`
 
73
  apt-cache policy $package_name
 
74
  package_list=&quot;$package_list $package_name&quot;
 
75
done
 
76
sudo apt-get -y --force-yes install $package_list
 
77
 
 
78
 
 
79
#sudo apt-get -y --force-yes install bzr python-autopilot recordmydesktop libunity-core-6.0-5
 
80
 
 
81
 
 
82
 
 
83
sudo service lightdm stop
 
84
sleep 2
 
85
start_x
 
86
 
 
87
export DISPLAY=:0
 
88
# Workaround for autopilot crashing when parsing debug output
 
89
export LANG=C
 
90
sudo chmod 666 /dev/autopilot-uinput
 
91
 
 
92
### same workaround as for autopilot tests... first qt app run somehow hangs...
 
93
export LIBGL_DEBUG=verbose
 
94
 
 
95
cat &gt; /tmp/main.qml &lt;&lt;EOF
 
96
import QtQuick 2.0
 
97
Rectangle {
 
98
  width: 500
 
99
  height: 500
 
100
  color: &quot;red&quot;
 
101
}
 
102
EOF
 
103
 
 
104
qmlscene /tmp/main.qml &amp;
 
105
 
 
106
sleep 2
 
107
killall qmlscene
 
108
 
 
109
autopilot run -o /tmp/test_results.xml -f xml -r -rd /tmp/ $test_suite || true
 
110
 
 
111
mv /tmp/test_results.xml .
 
112
mv /tmp/*.ogv . || touch no_videos.ogv # In case no tests fail, there are no recorded videos
 
113
 
 
114
 
 
115
 
 
116
####################################### cleanup #########################################
 
117
sudo rm -f &quot;$REPOLIST&quot;
 
118
sudo apt-get purge -y --force-yes $package_list
 
119
sudo apt-get autoremove -y --force-yes
 
120
for pid in `pidof X`; do 
 
121
  kill -9 $pid
 
122
done 
 
123
sudo rm /tmp/.X*-lock || true
 
124
sudo rm -rf /tmp/rMD-session-* || true
 
125
sudo rm -rf /tmp/tmp* || true
 
126
sudo rm /tmp/*.sci || true
 
127
</command>
 
128
    </hudson.tasks.Shell>
 
129
  </builders>
 
130
  <publishers>
 
131
    <hudson.tasks.ArtifactArchiver>
 
132
      <artifacts>*.ogv, *.xml</artifacts>
 
133
      <latestOnly>false</latestOnly>
 
134
    </hudson.tasks.ArtifactArchiver>
 
135
    <hudson.tasks.junit.JUnitResultArchiver>
 
136
      <testResults>test_results.xml</testResults>
 
137
      <keepLongStdio>false</keepLongStdio>
 
138
      <testDataPublishers/>
 
139
    </hudson.tasks.junit.JUnitResultArchiver>
 
140
  </publishers>
 
141
  <buildWrappers/>
 
142
</project>