From 83fbc86016b68d6d84854af1762401c7e2eea729 Mon Sep 17 00:00:00 2001 From: Carlos Rafael Giani Date: Fri, 24 Apr 2020 09:06:03 +0200 Subject: [PATCH] libimxdmabuffer: Fix ptest Signed-off-by: Carlos Rafael Giani --- recipes-bsp/libimxdmabuffer/files/run-ptest | 10 ++++++++++ .../libimxdmabuffer/libimxdmabuffer_1.0.1.bb | 13 +++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 recipes-bsp/libimxdmabuffer/files/run-ptest diff --git a/recipes-bsp/libimxdmabuffer/files/run-ptest b/recipes-bsp/libimxdmabuffer/files/run-ptest new file mode 100644 index 00000000..09f69a8d --- /dev/null +++ b/recipes-bsp/libimxdmabuffer/files/run-ptest @@ -0,0 +1,10 @@ +#!/bin/sh + +./test-alloc >/dev/null 2>&1 + +if [ $? -eq 0 ]; then + echo "PASS: test-alloc" +else + echo "FAIL: test-alloc" +fi + diff --git a/recipes-bsp/libimxdmabuffer/libimxdmabuffer_1.0.1.bb b/recipes-bsp/libimxdmabuffer/libimxdmabuffer_1.0.1.bb index 346a3cf5..9b918f2c 100644 --- a/recipes-bsp/libimxdmabuffer/libimxdmabuffer_1.0.1.bb +++ b/recipes-bsp/libimxdmabuffer/libimxdmabuffer_1.0.1.bb @@ -9,7 +9,10 @@ PV .= "+git${SRCPV}" SRCBRANCH ?= "master" SRCREV = "d2058aa404ee1e8e8abd552c6a637787bcdcf514" -SRC_URI = "git://github.com/Freescale/libimxdmabuffer.git;branch=${SRCBRANCH}" +SRC_URI = "git://github.com/Freescale/libimxdmabuffer.git;branch=${SRCBRANCH} \ + file://run-ptest \ + " + S = "${WORKDIR}/git" @@ -33,9 +36,11 @@ PACKAGECONFIG[ipu] = "--with-ipu-allocator=yes, --with-ipu-allocat PACKAGECONFIG[g2d] = "--with-g2d-allocator=yes, --with-g2d-allocator=no,virtual/libg2d" PACKAGECONFIG[pxp] = "--with-pxp-allocator=yes, --with-pxp-allocator=no," -do_install_ptest () { - install -d ${D}${PTEST_PATH}/tests - install -m 0755 ${B}/test-alloc ${D}${PTEST_PATH}/tests +# Using do_install_ptest_base instead of do_install_ptest, since +# the default do_install_ptest_base is hardcoded to expect Makefiles. +do_install_ptest_base() { + install -D ${WORKDIR}/run-ptest ${D}${PTEST_PATH}/run-ptest + install -m 0755 ${B}/test-alloc ${D}${PTEST_PATH} } COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" -- 2.40.1