Merge lp:~cjohnston/uci-engine/pkg-chk into lp:uci-engine

Proposed by Chris Johnston
Status: Merged
Approved by: Andy Doan
Approved revision: 426
Merged at revision: 438
Proposed branch: lp:~cjohnston/uci-engine/pkg-chk
Merge into: lp:uci-engine
Diff against target: 24 lines (+9/-1)
1 file modified
tarmac.sh (+9/-1)
To merge this branch: bzr merge lp:~cjohnston/uci-engine/pkg-chk
Reviewer Review Type Date Requested Status
Andy Doan (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Chris Johnston (community) Needs Resubmitting
Review via email: mp+215499@code.launchpad.net

Commit message

Add a test to tarmac.sh to ensure that the packages required to run the test suite are installed.

Description of the change

When setting up the new tarmac instance I ran into an issue where I forgot a package to install in order to run the tests. The test suite ran for a bit and then had an error. This just makes it error earlier on and with a nice output telling you what you need to do.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:425
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/500/
Executed test runs:

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/500/rebuild

review: Needs Fixing (continuous-integration)
lp:~cjohnston/uci-engine/pkg-chk updated
425. By Chris Johnston

Add a check to tarmac to see if the packages required for running the test suite are installed

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:425
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/501/
Executed test runs:

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/501/rebuild

review: Approve (continuous-integration)
Revision history for this message
Andy Doan (doanac) wrote :

On 04/11/2014 03:40 PM, Chris Johnston wrote:
> +pkgs='python-pip python-virtualenv python-setuptools python-dev make'
> +MISSING=0
> +dpkg -s $pkgs 2>/dev/null >/dev/null || MISSING=1
> +if [ $MISSING -eq 1 ] ; then

You can make this more compact with:

  pkgs='python-pip python-virtualenv python-setuptools python-dev make'
  if ! dpkg -s $pkgs 2>/dev/null >/dev/null ; then

lp:~cjohnston/uci-engine/pkg-chk updated
426. By Chris Johnston

Smaller is better

Revision history for this message
Chris Johnston (cjohnston) wrote :

Fixed in revno 426

review: Needs Resubmitting
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:426
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/502/
Executed test runs:

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/502/rebuild

review: Approve (continuous-integration)
Revision history for this message
Andy Doan (doanac) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tarmac.sh'
2--- tarmac.sh 2014-03-26 15:35:02 +0000
3+++ tarmac.sh 2014-04-11 21:46:12 +0000
4@@ -14,11 +14,19 @@
5 # You should have received a copy of the GNU Affero General Public License
6 # along with this program. If not, see <http://www.gnu.org/licenses/>.
7
8-# REQUIRES: python-pip python-virtualenv python-setuptools python-dev
9+# REQUIRES: python-pip python-virtualenv python-setuptools python-dev make
10
11 export CI_DEPS_BRANCH="lp:~canonical-ci-engineering/uci-engine/deps"
12
13 set -e
14+
15+pkgs='python-pip python-virtualenv python-setuptools python-dev make'
16+if ! dpkg -s $pkgs 2>/dev/null >/dev/null ; then
17+ echo "Required packages are missing. Please ensure that the missing packages are installed."
18+ echo "Run: sudo apt-get install $pkgs"
19+ exit 1
20+fi
21+
22 if [ -z $1 ] ; then
23 # Create a temporary venv
24 venv=$(mktemp -d)

Subscribers

People subscribed via source and target branches