Merge lp:~sinzui/juju-ci-tools/unit-test-install-deps into lp:juju-ci-tools

Proposed by Curtis Hovey on 2016-01-21
Status: Merged
Merged at revision: 1230
Proposed branch: lp:~sinzui/juju-ci-tools/unit-test-install-deps
Merge into: lp:juju-ci-tools
Diff against target: 38 lines (+13/-1)
1 file modified
run-unit-tests (+13/-1)
To merge this branch: bzr merge lp:~sinzui/juju-ci-tools/unit-test-install-deps
Reviewer Review Type Date Requested Status
Aaron Bentley (community) 2016-01-21 Approve on 2016-01-21
Review via email: mp+283450@code.launchpad.net

Description of the Change

Install alternate deps for unit tests.

This branch adds a option to pass alternate deps. They are installed instead of calling 'make install-dependancies'. This allows us to test dependency changes without tampering with the Makefile. This specifically allows us to test the backported go1.5 packages, and the new Mongo packages. This might also allow us to test on arm64.

To post a comment you must log in.
Aaron Bentley (abentley) wrote :

Thanks.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'run-unit-tests'
2--- run-unit-tests 2015-11-13 16:47:48 +0000
3+++ run-unit-tests 2016-01-21 14:20:51 +0000
4@@ -12,6 +12,7 @@
5 ROBUST="false"
6 REVISION_BUILD=${revision_build:-}
7 USE_PPA=""
8+INSTALL_DEPS=""
9 USE_TMPFS="false"
10 GOTESTCMD="go test"
11 LOG_FILE_PATH="/usr/share/distro-info/ubuntu.csv"
12@@ -49,6 +50,10 @@
13 exit 1
14 fi
15 ;;
16+ --install-deps)
17+ shift
18+ INSTALL_DEPS=$1
19+ ;;
20 --use-tmpfs)
21 USE_TMPFS="true"
22 ;;
23@@ -158,7 +163,14 @@
24 sudo apt-get update
25 sudo apt-get upgrade -y
26 sudo apt-get install -y make python-software-properties distro-info-data
27-make install-dependencies
28+if [[ "$INSTALL_DEPS" == "" ]]; then
29+ echo "Installing default deps."
30+ make install-dependencies
31+else
32+ echo "Installing deps from command line."
33+ sudo apt-get install -y $INSTALL_DEPS
34+fi
35+
36 # TODO(gz): Remove bzr whoami?
37 bzr whoami 'J. Random Hacker <jrandom@example.org>'
38 go version || gccgo -v

Subscribers

People subscribed via source and target branches