Skip to contentSkip to conversation

ltp-ddt: New recipe to build ltp-ddt test tool.

PATCH NAK Carlos Hernandez 3 participants 3 messages Apr 26, 2011 – Apr 27, 2011

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ltp-ddt: New recipe to build ltp-ddt test tool.

ltp-ddt is an open source test application for embedded linux devices. It is based on the linux test project (ltp) but it has a smaller footprint and it focus mainly on driver and system performance.
Design Highlights:
* Based on LTP http://ltp.sourceforge.net/
* Test cases are suitable for embedded devices w/ a limited shell.
* Support dynamic selection/filtering of test cases based on platform.
* Support test parameters overrides based on platform.

Changed in version 2:
* Install package under /opt instead of under /usr to comply with FHS per Denys' recommendation.

---
 recipes/ltp-ddt/ltp-ddt_0.0.1.bb |   54 ++++++++++++++++++++++++++++++++++++++
 1 files changed, 54 insertions(+), 0 deletions(-)
 create mode 100644 recipes/ltp-ddt/ltp-ddt_0.0.1.bb
recipes/ltp-ddt/ltp-ddt_0.0.1.bb new file +54 -0
new file mode 100644
index 0000000..2f8a1f2
@@ -0,0 +1,54 @@
+DESCRIPTION = "Embedded Linux Device Driver Tests based on Linux Test Project"
+HOMEPAGE = "http://arago-project.org/git/projects/?p=test-automation/ltp-ddt.git;a=summary"
+LICENSE = "GPL"
+SECTION = "console/utils"
+DEPENDS += "zip-native virtual/kernel"
+PR = "r0"
+
+inherit autotools
+
+BRANCH ?= "master"
+TAG ?= "ltp-ddt_${PV}"
+
+SRC_URI = "\
+git://arago-project.org/git/projects/test-automation/ltp-ddt.git;protocol=git;\
+branch=${BRANCH};\
+tag=${TAG}\
+"
+S = "${WORKDIR}/git"
+
+EXTRA_OEMAKE_append = "prefix=/opt/ltp CROSS_COMPILE=${HOST_PREFIX} SKIP_IDCHECK=1 KERNEL_INC=${STAGING_KERNEL_DIR}/include"
+
+FILES_${PN}-dbg += "\
+ /opt/ltp/.debug \
+ /opt/ltp/bin/.debug \
+ /opt/ltp/runtest/.debug \
+ /opt/ltp/testcases/bin/.debug \
+ /opt/ltp/testcases/bin/*/bin/.debug \
+ /opt/ltp/testcases/bin/*/test/.debug \
+ /opt/ltp/testcases/bin/ddt/.debug \
+ /opt/ltp/testcases/bin/ddt/*/bin/.debug \
+ /opt/ltp/testcases/bin/ddt/*/test/.debug \
+"
+
+FILES_${PN} += "\
+ /opt/ltp/* \
+ /opt/ltp/bin/* \
+ /opt/ltp/runtest/* \
+ /opt/ltp/testcases/bin/* \
+ /opt/ltp/testcases/bin/*/bin/* \
+ /opt/ltp/testscripts/* \
+"
+
+do_configure(){
+        cp ${S}/include/config.h.default ${S}/include/config.h
+	cp ${S}/include/mk/config.mk.default ${S}/include/mk/config.mk
+	cp ${S}/include/mk/features.mk.default ${S}/include/mk/features.mk
+	echo "${TAG}" > ${S}/ChangeLog
+}
+
+do_install(){
+        oe_runmake DESTDIR=${D} install
+}
+
+
Signature · 1 line
1.7.0.4
#1 lore raw

Dear Carlos,

Am Dienstag, den 26.04.2011, 17:23 -0400 schrieb Carlos Hernandez:

I would prefer the following for a commit summary.

ltp-ddt: add version 0.0.1 of ltp-ddt test tool

Quoted 3 lines

ltp-ddt is an open source test application for embedded linux devices. It is based on the linux test project (ltp) but it has a smaller footprint and it focus mainly on driver and system performance.

1. s/it focus/its focus is/
2. You could capitalize Linux and LTP.

Quoted 3 lines

Design Highlights:
* Based on LTP http://ltp.sourceforge.net/
* Test cases are suitable for embedded devices w/ a limited shell.

LTP depends on Bash?

Quoted 2 lines

* Support dynamic selection/filtering of test cases based on platform.
* Support test parameters overrides based on platform.

Support of …

Quoted 1 line

The email address differs from the From line, which will be used for the Author field.

Please add to the commit message what distribution and machine you tested this recipe with.

Quoted 3 lines

Changed in version 2:
* Install package under /opt instead of under /usr to comply with FHS per Denys' recommendation.

Please update the commit message if it is important (in this case it is not in my opinion) and separate the “patch iteration changelog” using ---. This way it is not put into the actual commit message using git am.

Quoted 11 lines
---
 recipes/ltp-ddt/ltp-ddt_0.0.1.bb |   54 ++++++++++++++++++++++++++++++++++++++
 1 files changed, 54 insertions(+), 0 deletions(-)
 create mode 100644 recipes/ltp-ddt/ltp-ddt_0.0.1.bb
recipes/ltp-ddt/ltp-ddt_0.0.1.bb new file +0 -0
new file mode 100644
index 0000000..2f8a1f2

recipes/ltp-ddt/ltp-ddt_0.0.1.bb line 4

Quoted 4 lines
recipes/ltp-ddt/ltp-ddt_0.0.1.bb new file +4 -0
@@ -0,0 +1,54 @@
+DESCRIPTION = "Embedded Linux Device Driver Tests based on Linux Test Project"
+HOMEPAGE = "http://arago-project.org/git/projects/?p=test-automation/ltp-ddt.git;a=summary"
+LICENSE = "GPL"
+SECTION = "console/utils"

SECTION should be before LICENSE according to the style guide [1].

recipes/ltp-ddt/ltp-ddt_0.0.1.bb line 5

Quoted 1 line
recipes/ltp-ddt/ltp-ddt_0.0.1.bb new file +1 -0
+DEPENDS += "zip-native virtual/kernel"

Maybe you could sort this lexicographically.

Quoted 5 lines
recipes/ltp-ddt/ltp-ddt_0.0.1.bb new file +5 -0
+PR = "r0"
+
+inherit autotools
+
+BRANCH ?= "master"

recipes/ltp-ddt/ltp-ddt_0.0.1.bb line 20

Quoted 10 lines
recipes/ltp-ddt/ltp-ddt_0.0.1.bb new file +10 -0
+TAG ?= "ltp-ddt_${PV}"
+
+SRC_URI = "\
+git://arago-project.org/git/projects/test-automation/ltp-ddt.git;protocol=git;\
+branch=${BRANCH};\
+tag=${TAG}\
+"
+S = "${WORKDIR}/git"
+
+EXTRA_OEMAKE_append = "prefix=/opt/ltp CROSS_COMPILE=${HOST_PREFIX} SKIP_IDCHECK=1 KERNEL_INC=${STAGING_KERNEL_DIR}/include"

Is a space after " needed when using append?

Quoted 10 lines
recipes/ltp-ddt/ltp-ddt_0.0.1.bb new file +10 -0
+FILES_${PN}-dbg += "\
+ /opt/ltp/.debug \
+ /opt/ltp/bin/.debug \
+ /opt/ltp/runtest/.debug \
+ /opt/ltp/testcases/bin/.debug \
+ /opt/ltp/testcases/bin/*/bin/.debug \
+ /opt/ltp/testcases/bin/*/test/.debug \
+ /opt/ltp/testcases/bin/ddt/.debug \
+ /opt/ltp/testcases/bin/ddt/*/bin/.debug \
+ /opt/ltp/testcases/bin/ddt/*/test/.debug \

recipes/ltp-ddt/ltp-ddt_0.0.1.bb line 41

Quoted 10 lines
recipes/ltp-ddt/ltp-ddt_0.0.1.bb new file +10 -0
+"
+
+FILES_${PN} += "\
+ /opt/ltp/* \
+ /opt/ltp/bin/* \
+ /opt/ltp/runtest/* \
+ /opt/ltp/testcases/bin/* \
+ /opt/ltp/testcases/bin/*/bin/* \
+ /opt/ltp/testscripts/* \
+"

These should go after the overrides according to the style guide [1].

recipes/ltp-ddt/ltp-ddt_0.0.1.bb line 42

Quoted 2 lines
recipes/ltp-ddt/ltp-ddt_0.0.1.bb new file +2 -0
+
+do_configure(){

Please use a space in front of { as done in the example in the style guide [1].

recipes/ltp-ddt/ltp-ddt_0.0.1.bb line 45

Quoted 2 lines
recipes/ltp-ddt/ltp-ddt_0.0.1.bb new file +2 -0
+        cp ${S}/include/config.h.default ${S}/include/config.h
+	cp ${S}/include/mk/config.mk.default ${S}/include/mk/config.mk

The white space seem to be different.

recipes/ltp-ddt/ltp-ddt_0.0.1.bb line 48

Quoted 3 lines
recipes/ltp-ddt/ltp-ddt_0.0.1.bb new file +3 -0
+	cp ${S}/include/mk/features.mk.default ${S}/include/mk/features.mk
+	echo "${TAG}" > ${S}/ChangeLog
+}

That looks strange. configure will not be executed. Should this be do_configure_prepend()?

recipes/ltp-ddt/ltp-ddt_0.0.1.bb line 49

Quoted 2 lines
recipes/ltp-ddt/ltp-ddt_0.0.1.bb new file +2 -0
+
+do_install(){

See above.

recipes/ltp-ddt/ltp-ddt_0.0.1.bb line 52

Quoted 2 lines
recipes/ltp-ddt/ltp-ddt_0.0.1.bb new file +2 -0
+        oe_runmake DESTDIR=${D} install
+}

Could you put this into EXTRA_OEMAKE you defined above and get rid of the override?

recipes/ltp-ddt/ltp-ddt_0.0.1.bb line 53

Quoted 2 lines
recipes/ltp-ddt/ltp-ddt_0.0.1.bb new file +2 -0
+
+

The two empty lines are not needed.

Thanks,

Paul

[1] http://openembedded.org/index.php/Styleguide

#2 lore raw
In reply to Carlos Hernandez

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 9 lines · Carlos Hernandez

ltp-ddt is an open source test application for embedded linux devices. It is based on the linux test project (ltp) but it has a smaller footprint and it focus mainly on driver and system performance.
Design Highlights:
* Based on LTP http://ltp.sourceforge.net/
* Test cases are suitable for embedded devices w/ a limited shell.
* Support dynamic selection/filtering of test cases based on platform.
* Support test parameters overrides based on platform.

Quoted 5 lines

Changed in version 2:
* Install package under /opt instead of under /usr to comply with FHS per Denys' recommendation.

NAK, everything we install in OE is part of the system, so no /opt stuff please.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFNt7qPMkyGM64RGpERAoOBAJ9cA79Bykrb7D9OWMpoy5+u0+4fJQCbB7kh wWt3XmwVgvmGOSYj1XX84Ik=
=5W68
-----END PGP SIGNATURE-----