Skip to contentSkip to conversation

testimage: add task level lock

PATCH New Stefan Stanacar 1 participant 1 message Mar 1, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 testimage: add task level lock

For machines other than qemu it will not be okay to run multiple testimage tasks in parallel.

---
 meta/classes/testimage-auto.bbclass | 1 +
 meta/classes/testimage.bbclass      | 4 ++++
 2 files changed, 5 insertions(+)
meta/classes/testimage-auto.bbclass +1 -0
index a5b8f7f..860599d 100644
@@ -20,3 +20,4 @@ python do_testimage_auto() {
 }
 addtask testimage_auto before do_build after do_rootfs
 do_testimage_auto[depends] += "${TESTIMAGEDEPENDS}"
+do_testimage_auto[lockfiles] += "${TESTIMAGELOCK}"
meta/classes/testimage.bbclass +4 -0
index 48e1032..691c7f6 100644
@@ -42,12 +42,16 @@ TEST_SERVER_IP ?= ""
 TESTIMAGEDEPENDS = ""
 TESTIMAGEDEPENDS_qemuall = "qemu-native:do_populate_sysroot qemu-helper-native:do_populate_sysroot"
 
+TESTIMAGELOCK = "${TMPDIR}/testimage.lock"
+TESTIMAGELOCK_qemuall = ""
+
 python do_testimage() {
     testimage_main(d)
 }
 addtask testimage
 do_testimage[nostamp] = "1"
 do_testimage[depends] += "${TESTIMAGEDEPENDS}"
+do_testimage[lockfiles] += "${TESTIMAGELOCK}"
 
 
 def get_tests_list(d):
Signature · 1 line
1.8.5.3