Merge lp:~terceiro/lava-dispatcher/lava-test-shell-oe into lp:lava-dispatcher

Proposed by Antonio Terceiro
Status: Merged
Approved by: Senthil Kumaran S
Approved revision: 566
Merged at revision: 566
Proposed branch: lp:~terceiro/lava-dispatcher/lava-test-shell-oe
Merge into: lp:lava-dispatcher
Diff against target: 46 lines (+21/-1)
1 file modified
lava_test_shell/lava-test-runner-ubuntu (+21/-1)
To merge this branch: bzr merge lp:~terceiro/lava-dispatcher/lava-test-shell-oe
Reviewer Review Type Date Requested Status
Senthil Kumaran S Approve
Review via email: mp+155283@code.launchpad.net

Description of the change

This branch removes unconditional calling of Ubuntu-specific commands in lava-test-runner, and makes it work with OE images.

We still have some other instances of this incorrect behavior on other parts of lava-test-shell, but this is a good start at tackling the problem.

To post a comment you must log in.
Revision history for this message
Senthil Kumaran S (stylesen) wrote :

It makes sense to do this change in lava-test-runner-ubuntu shell script as of now. But in future this must be renamed to 'lava-test-runner' since this is generic for all images other than android (this change could be done later).

+1 for this change.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lava_test_shell/lava-test-runner-ubuntu'
2--- lava_test_shell/lava-test-runner-ubuntu 2013-01-28 08:51:59 +0000
3+++ lava_test_shell/lava-test-runner-ubuntu 2013-03-25 16:51:22 +0000
4@@ -5,6 +5,12 @@
5 RESULTSDIR="/lava/results"
6 BINDIR="/lava/bin"
7
8+detect_distro() {
9+ test -x /usr/bin/dpkg-query && echo "debian_based" && return
10+
11+ echo "unknown"
12+}
13+
14 hwcontext()
15 {
16 mkdir -p ${RESULTSDIR}/hwcontext
17@@ -15,7 +21,17 @@
18 [ -f ${meminfo} ] || cat /proc/meminfo > ${meminfo}
19 }
20
21-swcontext()
22+unknown_swcontext() {
23+ mkdir -p ${RESULTSDIR}/swcontext
24+ build=${RESULTSDIR}/swcontext/build.txt
25+ pkgs=${RESULTSDIR}/swcontext/pkgs.txt
26+
27+ # we don't know about the software context
28+ echo 'Unsupported distro: cannot determine build version' > "$build"
29+ echo 'Unsupported distro: cannot obtain list of installed packages' > "$pkgs"
30+}
31+
32+debian_based_swcontext()
33 {
34 mkdir -p ${RESULTSDIR}/swcontext
35 build=${RESULTSDIR}/swcontext/build.txt
36@@ -27,6 +43,10 @@
37 [ -f ${pkgs} ] || dpkg-query -W -f '${status} ${package} : ${version}\n' | sed -n 's/^install ok installed/package:/p' > ${pkgs}
38 }
39
40+swcontext() {
41+ distro=$(detect_distro)
42+ ${distro}_swcontext
43+}
44
45 cleanup()
46 {

Subscribers

People subscribed via source and target branches