]> code.ossystems Code Review - meta-freescale.git/commitdiff
libimxdmabuffer: Fix ptest
authorCarlos Rafael Giani <crg7475@mailbox.org>
Fri, 24 Apr 2020 07:06:03 +0000 (09:06 +0200)
committerOtavio Salvador <otavio@ossystems.com.br>
Fri, 24 Apr 2020 11:13:12 +0000 (08:13 -0300)
Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
recipes-bsp/libimxdmabuffer/files/run-ptest [new file with mode: 0644]
recipes-bsp/libimxdmabuffer/libimxdmabuffer_1.0.1.bb

diff --git a/recipes-bsp/libimxdmabuffer/files/run-ptest b/recipes-bsp/libimxdmabuffer/files/run-ptest
new file mode 100644 (file)
index 0000000..09f69a8
--- /dev/null
@@ -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
+
index 346a3cf570ae66d63c0a4dd7b8df11ca875bf9c8..9b918f2cd210dacd7676b387e9c02db36298029d 100644 (file)
@@ -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)"