Merge lp:~cjohnston/charm-helpers/check-test-deps into lp:charm-helpers

Proposed by Chris Johnston
Status: Merged
Merged at revision: 241
Proposed branch: lp:~cjohnston/charm-helpers/check-test-deps
Merge into: lp:charm-helpers
Diff against target: 25 lines (+8/-1)
2 files modified
README.test (+1/-1)
tarmac_tests.sh (+7/-0)
To merge this branch: bzr merge lp:~cjohnston/charm-helpers/check-test-deps
Reviewer Review Type Date Requested Status
Jorge Niedbalski (community) Approve
Review via email: mp+239074@code.launchpad.net

Commit message

Update tarmac_tests.sh to check for required packages prior to running tests

Description of the change

When running the tests without having all the required test deps, the tests fail miserably.. Lets add the ability for tarmac_tests.sh to check for the deps and fail early if there is a missing dep.

To post a comment you must log in.
Revision history for this message
Jorge Niedbalski (niedbalski) wrote :

LGTM +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'README.test'
2--- README.test 2014-10-16 13:59:04 +0000
3+++ README.test 2014-10-21 14:45:08 +0000
4@@ -2,4 +2,4 @@
5 -----------------------------------
6 sudo apt-get install python-flake8 python-shelltoolbox python-tempita \
7 python-nose python-mock python-testtools python-jinja2 python-coverage \
8-python-netifaces python-netaddr python-pip zip
9+python-git python-netifaces python-netaddr python-pip zip
10
11=== modified file 'tarmac_tests.sh'
12--- tarmac_tests.sh 2013-05-11 20:05:13 +0000
13+++ tarmac_tests.sh 2014-10-21 14:45:08 +0000
14@@ -3,4 +3,11 @@
15
16 set -e
17
18+pkgs='python-flake8 python-shelltoolbox python-tempita python-nose python-mock python-testtools python-jinja2 python-coverage python-git python-netifaces python-netaddr python-pip zip'
19+if ! dpkg -s $pkgs 2>/dev/null >/dev/null ; then
20+ echo "Required packages are missing. Please ensure that the missing packages are installed."
21+ echo "Run: sudo apt-get install $pkgs"
22+ exit 1
23+fi
24+
25 make build

Subscribers

People subscribed via source and target branches