All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH v2] recipes-devtools: New ltp-ddt_1.0.0 recipe
@ 2015-03-11  3:19 Dmytriyenko, Denys
  2015-03-11 12:08 ` Carlos Hernandez
  0 siblings, 1 reply; 3+ messages in thread
From: Dmytriyenko, Denys @ 2015-03-11  3:19 UTC (permalink / raw)
  To: Hernandez, Carlos; +Cc: meta-arago@arago-project.org

[-- Attachment #1: Type: text/plain, Size: 3717 bytes --]

Thanks. Mostly good, but I'd like to fix couple more minor things - I'll send a fixed version tomorrow. If you haven't sent it to meta-oe yet, please wait.

--
Denys

On Mar 10, 2015 4:49 PM, "Hernandez, Carlos" <ceh@ti.com> wrote:
Latest ltp release was recently merge to ltp-ddt and there is a new
way to configure and compile ltp-ddt.

Signed-off-by: Carlos Hernandez <ceh@ti.com>
---
 .../recipes-devtools/ltp-ddt/ltp-ddt_1.0.0.bb      | 84 ++++++++++++++++++++++
 1 file changed, 84 insertions(+)
 create mode 100644 meta-arago-distro/recipes-devtools/ltp-ddt/ltp-ddt_1.0.0.bb

diff --git a/meta-arago-distro/recipes-devtools/ltp-ddt/ltp-ddt_1.0.0.bb b/meta-arago-distro/recipes-devtools/ltp-ddt/ltp-ddt_1.0.0.bb
new file mode 100644
index 0000000..db66ed4
--- /dev/null
+++ b/meta-arago-distro/recipes-devtools/ltp-ddt/ltp-ddt_1.0.0.bb
@@ -0,0 +1,84 @@
+SUMMARY = "Embedded Linux Device Driver Tests based on Linux Test Project"
+HOMEPAGE = "http://arago-project.org/git/projects/test-automation/ltp-ddt.git"
+SECTION = "console/utils"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
+
+PROVIDES += "ltp"
+DEPENDS += "zip-native virtual/kernel alsa-lib"
+RDEPENDS_${PN} += "linaro-pm-qa-utils serialcheck"
+
+inherit autotools module-base kernel-module-split
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+SRCREV = "eef6281052f36f6fe41059eadcf3b4a94f0d85ea"
+BRANCH ?= "master"
+PR = "r1-arago10+gitr${SRCPV}"
+
+SRC_URI = "git://arago-project.org/git/projects/test-automation/ltp-ddt.git;branch=${BRANCH} \
+          "
+
+S = "${WORKDIR}/git"
+
+LTPROOT = "/opt/ltp"
+
+EXTRA_OEMAKE_append = " \
+    prefix=${LTPROOT} \
+    CROSS_COMPILE=${HOST_PREFIX} \
+    SKIP_IDCHECK=1 \
+    KERNEL_INC=${STAGING_KERNEL_DIR} \
+    KERNEL_USR_INC=${STAGING_INCDIR} \
+    ALSA_INCPATH=${STAGING_INCDIR} \
+    ALSA_LIBPATH=${STAGING_LIBDIR} \
+    PLATFORM=${MACHINE} \
+    RANLIB=${RANLIB} \
+    KERNEL_PATH=${STAGING_KERNEL_DIR} \
+"
+
+TARGET_CC_ARCH += "${LDFLAGS}"
+
+FILES_${PN}-dbg += " \
+    ${LTPROOT}/.debug \
+    ${LTPROOT}/bin/.debug \
+    ${LTPROOT}/runtest/.debug \
+    ${LTPROOT}/testcases/bin/.debug \
+    ${LTPROOT}/testcases/bin/*/bin/.debug \
+    ${LTPROOT}/testcases/bin/*/test/.debug \
+    ${LTPROOT}/testcases/bin/ddt/.debug \
+    ${LTPROOT}/testcases/bin/ddt/*/bin/.debug \
+    ${LTPROOT}/testcases/bin/ddt/*/test/.debug \
+    ${LTPROOT}/testcases/realtime/*/*/.debug \
+"
+
+FILES_${PN}-staticdev += "${LTPROOT}/lib"
+FILES_${PN} += "${LTPROOT}/*"
+
+KERNEL_MODULES_META_PACKAGE = "${PN}"
+
+kmoddir = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/ddt"
+
+# ltp doesn't regenerate ffsb-6.0-rc2 configure and hardcode configure call.
+# we explicitly force regeneration of that directory and pass configure options.
+do_configure_append() {
+    (cd utils/ffsb-6.0-rc2; autoreconf -fvi; ./configure ${CONFIGUREOPTS})
+}
+
+
+do_compile_append () {
+    unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+    oe_runmake KERNEL_CC="${KERNEL_CC}" DESTDIR=${D} modules
+}
+
+do_install() {
+    oe_runmake DESTDIR=${D} install
+    install -d ${D}${datadir}
+    install -d ${D}${kmoddir}
+    mv ${D}${LTPROOT}/testcases/bin/ddt/*.ko ${D}${kmoddir}
+}
+
+
+# do_make_scripts should be a separate task for the lock to work
+addtask make_scripts before do_compile
+do_make_scripts[lockfiles] = "${TMPDIR}/kernel-scripts.lock"
+do_make_scripts[deptask] = "do_populate_sysroot"
--
1.9.1

_______________________________________________
meta-arago mailing list
meta-arago@arago-project.org
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago

[-- Attachment #2: Type: text/html, Size: 5962 bytes --]

^ permalink raw reply related	[flat|nested] 3+ messages in thread
* Re: [PATCH] recipes-devtools: New ltp-ddt_1.0.0 recipe
@ 2015-03-10 16:19 Denys Dmytriyenko
  2015-03-10 20:48 ` [PATCH v2] " Carlos Hernandez
  0 siblings, 1 reply; 3+ messages in thread
From: Denys Dmytriyenko @ 2015-03-10 16:19 UTC (permalink / raw)
  To: Carlos Hernandez; +Cc: meta-arago

On Tue, Mar 10, 2015 at 09:13:33AM -0400, Carlos Hernandez wrote:
> Latest ltp release was recently merge to ltp-ddt and there is a new
> way to configure and compile ltp-ddt.

Thanks, Carlos! Few comments inline.


> Signed-off-by: Carlos Hernandez <ceh@ti.com>
> ---
>  ...ite-Make-sure-to-include-generated-header.patch | 33 ++++++++
>  .../recipes-devtools/ltp-ddt/ltp-ddt_1.0.0.bb      | 87 ++++++++++++++++++++++
>  2 files changed, 120 insertions(+)
>  create mode 100644 meta-arago-distro/recipes-devtools/ltp-ddt/ltp-ddt/0001-wdt_test_suite-Make-sure-to-include-generated-header.patch
>  create mode 100644 meta-arago-distro/recipes-devtools/ltp-ddt/ltp-ddt_1.0.0.bb
> 
> diff --git a/meta-arago-distro/recipes-devtools/ltp-ddt/ltp-ddt/0001-wdt_test_suite-Make-sure-to-include-generated-header.patch b/meta-arago-distro/recipes-devtools/ltp-ddt/ltp-ddt/0001-wdt_test_suite-Make-sure-to-include-generated-header.patch

First of all, this should probably go to meta-arago-extras, if not even to 
meta-ti... Although, if the plan is to upstream it to meta-openembedded, then 
meta-arago-extras should be fine as temp location.


> new file mode 100644
> index 0000000..31df16d
> --- /dev/null
> +++ b/meta-arago-distro/recipes-devtools/ltp-ddt/ltp-ddt/0001-wdt_test_suite-Make-sure-to-include-generated-header.patch
> @@ -0,0 +1,33 @@
> +From 4a8f24892514cd5e4d11b9105c843db49eea921b Mon Sep 17 00:00:00 2001
> +From: Khem Raj <raj.khem@gmail.com>
> +Date: Wed, 19 Feb 2014 19:41:33 -0800
> +Subject: [PATCH] wdt_test_suite: Make sure to include generated headers
> +
> +This makes sure that its using the generated headers
> +and not the raw headers from kernel, generated headers
> +are built for the given machine already when kernel is
> +built and are available in configured/compiled kernel tree
> +already

Have you looked into merging this patch back to ltp-ddt Makefile? Will it 
break your regular outside of OE builds?


> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
> +---
> + testcases/ddt/wdt_test_suite/Makefile | 4 ++--
> + 1 file changed, 2 insertions(+), 2 deletions(-)
> +
> +diff --git a/testcases/ddt/wdt_test_suite/Makefile b/testcases/ddt/wdt_test_suite/Makefile
> +index 90a6a90..22a1cfd 100644
> +--- a/testcases/ddt/wdt_test_suite/Makefile
> ++++ b/testcases/ddt/wdt_test_suite/Makefile
> +@@ -20,8 +20,8 @@ INCLUDES        = -I $(KERNEL_INC) -I src/interface/common -I ../utils/user
> + INCLUDES        = -I src/parser \
> +                   -I src/interface/common \
> +                   -I ../utils/user \
> +-                  -I $(KERNEL_INC)/include \
> +-                  -I $(KERNEL_INC)/arch/arm/include
> ++                  -I $(KERNEL_INC)/include/generated \
> ++                  -I $(KERNEL_INC)/arch/arm/include/generated \
> +
> +#List of source files- Update this on adding a new C file
> + SOURCES := \
> +--
> +1.9.0
> diff --git a/meta-arago-distro/recipes-devtools/ltp-ddt/ltp-ddt_1.0.0.bb b/meta-arago-distro/recipes-devtools/ltp-ddt/ltp-ddt_1.0.0.bb
> new file mode 100644
> index 0000000..c321242
> --- /dev/null
> +++ b/meta-arago-distro/recipes-devtools/ltp-ddt/ltp-ddt_1.0.0.bb
> @@ -0,0 +1,87 @@
> +SUMMARY = "Embedded Linux Device Driver Tests based on Linux Test Project"
> +HOMEPAGE = "http://arago-project.org/git/projects/test-automation/ltp-ddt.git"
> +SECTION = "console/utils"
> +LICENSE = "GPLv2"
> +LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
> +PR = "r1"
> +
> +PROVIDES += "ltp"
> +DEPENDS += "zip-native virtual/kernel alsa-lib"
> +
> +inherit autotools module-base kernel-module-split
> +
> +PACKAGE_ARCH = "${MACHINE_ARCH}"
> +
> +SRCREV = "ltp-ddt_1.0.0"

It's not recommended to use git tags in SRCREV, as those would need to be 
resolved on every parsing, which is rather expensive and requires network 
connection at parsing time, even if you don't want to build (i.e. bitbake -g 
or -e mode). Please use the actual commid id hash for SRCREV - we've stoped 
using tags in recipes some time ago.


> +BRANCH ?= "master"
> +
> +SRC_URI = "git://arago-project.org/git/projects/test-automation/ltp-ddt.git;branch=${BRANCH} \
> +           file://0001-wdt_test_suite-Make-sure-to-include-generated-header.patch \
> +          "
> +
> +S = "${WORKDIR}/git"
> +
> +LTPROOT = "/opt/ltp"
> +
> +EXTRA_OEMAKE_append = " \
> +    prefix=${LTPROOT} \
> +    CROSS_COMPILE=${HOST_PREFIX} \
> +    SKIP_IDCHECK=1 \
> +    KERNEL_INC=${STAGING_KERNEL_DIR} \
> +    KERNEL_USR_INC=${STAGING_INCDIR} \
> +    ALSA_INCPATH=${STAGING_INCDIR} \
> +    ALSA_LIBPATH=${STAGING_LIBDIR} \
> +    PLATFORM=${MACHINE} \
> +    RANLIB=${RANLIB} \
> +"
> +
> +TARGET_CC_ARCH += "${LDFLAGS}"
> +
> +FILES_${PN}-dbg += " \
> +    ${LTPROOT}/.debug \
> +    ${LTPROOT}/bin/.debug \
> +    ${LTPROOT}/runtest/.debug \
> +    ${LTPROOT}/testcases/bin/.debug \
> +    ${LTPROOT}/testcases/bin/*/bin/.debug \
> +    ${LTPROOT}/testcases/bin/*/test/.debug \
> +    ${LTPROOT}/testcases/bin/ddt/.debug \
> +    ${LTPROOT}/testcases/bin/ddt/*/bin/.debug \
> +    ${LTPROOT}/testcases/bin/ddt/*/test/.debug \
> +    ${LTPROOT}/testcases/realtime/*/*/.debug \
> +"
> +
> +FILES_${PN}-staticdev += "${LTPROOT}/lib"
> +FILES_${PN} += "${LTPROOT}/*"
> +
> +# ltp doesn't regenerate ffsb-6.0-rc2 configure and hardcode configure call.
> +# we explicitly force regeneration of that directory and pass configure options.
> +do_configure_append() {
> +    (cd utils/ffsb-6.0-rc2; autoreconf -fvi; ./configure ${CONFIGUREOPTS})
> +}
> +
> +kmoddir = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/ddt"
> +
> +do_compile_append () {
> +    unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
> +    oe_runmake KERNEL_CC="${KERNEL_CC}" DESTDIR=${D} modules
> +}
> +
> +do_install() {
> +    oe_runmake DESTDIR=${D} install
> +    install -d ${D}${datadir}
> +    install -d ${D}${kmoddir}
> +    mv ${D}${LTPROOT}/testcases/bin/ddt/*.ko ${D}${kmoddir}
> +}
> +
> +PR_append = "-arago10+gitr${SRCPV}"

And this will go into meta-arago-distro/.../*.bbappend, unless you want the 
+gitr${SRCPV} portion to go in the main recipe, in which case should probably 
be merged with the above PR assignment at the top.


> +RDEPENDS_${PN} += "linaro-pm-qa-utils serialcheck"
> +
> +EXTRA_OEMAKE += "KERNEL_PATH="${STAGING_KERNEL_DIR}""

Can you combine this EXTRA_OEMAKE with the one above in the recipe? I 
understand this recipe combined the original bb and our arago bbappend, but 
this is a good time to clean it up.


> +KERNEL_MODULES_META_PACKAGE = "${PN}"

BTW, would be better to move the above variables (RDEPENDS, 
KERNEL_MODULES_META_PACKAGE, etc.) above the do_compile and do_install 
functions for better readability.


> +# do_make_scripts should be a separate task for the lock to work
> +addtask make_scripts before do_compile
> +do_make_scripts[lockfiles] = "${TMPDIR}/kernel-scripts.lock"
> +do_make_scripts[deptask] = "do_populate_sysroot"
> -- 
> 1.9.1
> 
> _______________________________________________
> meta-arago mailing list
> meta-arago@arago-project.org
> http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-03-11 12:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-11  3:19 [PATCH v2] recipes-devtools: New ltp-ddt_1.0.0 recipe Dmytriyenko, Denys
2015-03-11 12:08 ` Carlos Hernandez
  -- strict thread matches above, loose matches on Subject: below --
2015-03-10 16:19 [PATCH] " Denys Dmytriyenko
2015-03-10 20:48 ` [PATCH v2] " Carlos Hernandez

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.