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
=== modified file 'lava_test_shell/lava-test-runner-ubuntu'
--- lava_test_shell/lava-test-runner-ubuntu 2013-01-28 08:51:59 +0000
+++ lava_test_shell/lava-test-runner-ubuntu 2013-03-25 16:51:22 +0000
@@ -5,6 +5,12 @@
5RESULTSDIR="/lava/results"5RESULTSDIR="/lava/results"
6BINDIR="/lava/bin"6BINDIR="/lava/bin"
77
8detect_distro() {
9 test -x /usr/bin/dpkg-query && echo "debian_based" && return
10
11 echo "unknown"
12}
13
8hwcontext()14hwcontext()
9{15{
10 mkdir -p ${RESULTSDIR}/hwcontext16 mkdir -p ${RESULTSDIR}/hwcontext
@@ -15,7 +21,17 @@
15 [ -f ${meminfo} ] || cat /proc/meminfo > ${meminfo}21 [ -f ${meminfo} ] || cat /proc/meminfo > ${meminfo}
16}22}
1723
18swcontext()24unknown_swcontext() {
25 mkdir -p ${RESULTSDIR}/swcontext
26 build=${RESULTSDIR}/swcontext/build.txt
27 pkgs=${RESULTSDIR}/swcontext/pkgs.txt
28
29 # we don't know about the software context
30 echo 'Unsupported distro: cannot determine build version' > "$build"
31 echo 'Unsupported distro: cannot obtain list of installed packages' > "$pkgs"
32}
33
34debian_based_swcontext()
19{35{
20 mkdir -p ${RESULTSDIR}/swcontext36 mkdir -p ${RESULTSDIR}/swcontext
21 build=${RESULTSDIR}/swcontext/build.txt37 build=${RESULTSDIR}/swcontext/build.txt
@@ -27,6 +43,10 @@
27 [ -f ${pkgs} ] || dpkg-query -W -f '${status} ${package} : ${version}\n' | sed -n 's/^install ok installed/package:/p' > ${pkgs}43 [ -f ${pkgs} ] || dpkg-query -W -f '${status} ${package} : ${version}\n' | sed -n 's/^install ok installed/package:/p' > ${pkgs}
28}44}
2945
46swcontext() {
47 distro=$(detect_distro)
48 ${distro}_swcontext
49}
3050
31cleanup()51cleanup()
32{52{

Subscribers

People subscribed via source and target branches