[oe] Writing a test program for libserial

Elvis Dowson elvis.dowson at mac.com
Sat Jun 20 20:27:27 UTC 2009


Hi,
	What is the best way to write a test program recipe for libserial.  
I've taken the read_port.cpp file, and would like to package it as a  
separate recipe for testing purposes. Not that I'm going to submit  
this test recipe, its just for me to learn how to write a test recipe  
that uses an existing library.


DESCRIPTION = "Read serial port test program for libserial"
SECTION = "bin"
LICENSE = "GPL"
HOMEPAGE = ""
DEPENDS = "libserial"

#LDFLAGS_append += "-llibserial"
#CFLAGS_append  += "-I${STAGING_INCDIR}"

SRC_URI = "file://* "

S = "${WORKDIR}/${PN}-${PV}"

do_compile () {
    ${CC} ${CFLAGS} ${LDFLAGS} -o libserial-test-read-port read_port.cpp
}

do_install () {
    install -d ${D}${bindir}/
    install -m 0755 ${S}/libserial-test-read-port ${D}${bindir}
}

FILES_${PN} = "${bindir}/libserial-test-read-port"

When I try to build the recipe, I get the following error:

ERROR: function do_compile failed
ERROR: log data follows (/tool/overo-oe/tmp/work/armv7a-angstrom-linux- 
gnueabi/libserial-test-read-port-1.6.0rc1-1.0-r0/temp/log.do_compile. 
31500)
| arm-angstrom-linux-gnueabi-gcc: read_port.cpp: No such file or  
directory


Where should I put my test program sources ? and how should I include  
it in the SRC_URI field? Currently it is in the same level as the test  
program recipe file.


Best regards,

Elvis




More information about the Openembedded-devel mailing list