Skip to contentSkip to conversation

new PTEST_RUN_SCRIPT_PATH

PATCH New Ian Ray 1 participant 2 messages Sep 18, 2015

lore
Share & tools
lore

Ian Ray

author
#0 lore raw

cover new PTEST_RUN_SCRIPT_PATH

New "weak" assigned PTEST_RUN_SCRIPT_PATH to allow recipes to override the default location of the run-ptest script.

This is useful if the package ships its own run-ptest script.

Ian Ray (1):
ptest: user-specified run-ptest script location

 meta/classes/ptest.bbclass | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
Signature · 1 line
1.8.3.1
author
#1 lore raw

PATCH 1/1 ptest: user-specified run-ptest script location

Provides a new variable, PTEST_RUN_SCRIPT_PATH, which points to a directory where the run-ptest script is located. This location defaults to the work directory but may be overridden within a recipe if a package ships its own run-ptest script.

---
 meta/classes/ptest.bbclass | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
meta/classes/ptest.bbclass +3 -2
index b5f470f..7d9d0cc 100644
@@ -3,6 +3,7 @@ DESCRIPTION_${PN}-ptest ?= "${DESCRIPTION}  \
 This package contains a test directory ${PTEST_PATH} for package test purposes."
 
 PTEST_PATH ?= "${libdir}/${PN}/ptest"
+PTEST_RUN_SCRIPT_PATH ??= "${WORKDIR}"
 FILES_${PN}-ptest = "${PTEST_PATH}"
 SECTION_${PN}-ptest = "devel"
 ALLOW_EMPTY_${PN}-ptest = "1"
@@ -37,8 +38,8 @@ do_install_ptest() {
 }
 
 do_install_ptest_base() {
-    if [ -f ${WORKDIR}/run-ptest ]; then
-        install -D ${WORKDIR}/run-ptest ${D}${PTEST_PATH}/run-ptest
+    if [ -f ${PTEST_RUN_SCRIPT_PATH}/run-ptest ]; then
+        install -D ${PTEST_RUN_SCRIPT_PATH}/run-ptest ${D}${PTEST_PATH}/run-ptest
         if grep -q install-ptest: Makefile; then
             oe_runmake DESTDIR=${D}${PTEST_PATH} install-ptest
         fi
Signature · 1 line
1.8.3.1