ptest-runner2 C implementation
cover ptest-runner2 C implementation
This is the changes that adds new ptest-runner2 C implementation a detail description exists in the recipe adding.
You can review the ptest-runner2 code on [1], i wrote unit tests for all the code using check framework also i used mtrace for found possible memory leaks.
Finally i tested the new runner on qemux86, qemuarm, qemumips, qemuppc using core-image-minimal and qemux86/poky-tiny/core-image-minimal.
[YOCTO #8021]
[1] https://github.com/alimon/ptest-runner2
The following changes since commit 92cc02fe517bad0af4e493fda3331738cbcc9a26:
linux-yocto: Update Genericx86* BSPs to 4.1.15 (2016-01-14 15:18:46 +0000)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib alimon/ptest-runner2
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=alimon/ptest-runner2
Aníbal Limón (3):
ptest-runner2: Add new ptest-runner2 recipe.
ptests: Update references to new ptest-runner2. Update dev-manual to point to the new ptest-runner2.
.../dev-manual/dev-manual-common-tasks.xml | 4 ++-- meta/classes/ptest.bbclass | 2 +- meta/lib/oeqa/runtime/_ptest.py | 4 ++-- .../ptest-runner2/ptest-runner2_0.1.bb | 24 ++++++++++++++++++++++ 4 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 meta/recipes-support/ptest-runner2/ptest-runner2_0.1.bb
Signature · 1 line
2.1.4
PATCH 1/3 ptest-runner2: Add new ptest-runner2 recipe.
The ptest-runner2 is C written program for run ptests of Yocto/Openembedded, is fully compatible with previous version of ptest-runner that was a shell script that runs ptests sequencially.
The mainly reason for the new ptest-runner in C is because is designed for run in tiny systems also the old shell script version have problems when certain ptest hang it becomes blocked indefinitely.
Now the ptest-runner2 support the next features:
- Specify the directory for search ptests.
- List available ptests.
- Specify the timeout for avoid blocking indefinetly.
- Only run certain ptests.
Proposed features:
- Adds support for per ptest output file.
- Adds support for run ptests in parallel (review possible colisions in ptests).
[YOCTO #8021]
--- .../ptest-runner2/ptest-runner2_0.1.bb | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 meta/recipes-support/ptest-runner2/ptest-runner2_0.1.bb
meta/recipes-support/ptest-runner2/ptest-runner2_0.1.bb new file +24 -0
@@ -0,0 +1,24 @@ +SUMMARY = "A C program to run all installed ptests" +DESCRIPTION = "The ptest-runner2 package installs a ptest-runner \ +program which loops through all installed ptest test suites and \ +runs them in sequence." +HOMEPAGE = "https://github.com/alimon/ptest-runner2" + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe" + +SRC_URI = "git://github.com/alimon/ptest-runner2.git;protocol=https;tag=v0.1" +PV = "0.1+git${SRCPV}" +S = "${WORKDIR}/git" + +FILES_${PN} = "${bindir}/ptest-runner" + +RCONFLICTS_${PN} = "ptest-runner" + +do_compile () { + oe_runmake +} + +do_install () { + install -D -m 0755 ${WORKDIR}/git/ptest-runner ${D}${bindir}/ptest-runner +}
Signature · 1 line
2.1.4
PATCH 2/3 ptests: Update references to new ptest-runner2.
In reply to Aníbal Limónclasses/ptest.bbclass: Now recommends ptest-runner2 instead of
ptest-runner.oeqa/runtime/_ptest.py: Now validate if ptest-runner2 is installed.
--- meta/classes/ptest.bbclass | 2 +- meta/lib/oeqa/runtime/_ptest.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
meta/classes/ptest.bbclass +1 -1
@@ -12,7 +12,7 @@ PTEST_ENABLED_class-nativesdk = "" PTEST_ENABLED_class-cross-canadian = "" RDEPENDS_${PN}-ptest_class-native = "" RDEPENDS_${PN}-ptest_class-nativesdk = "" -RRECOMMENDS_${PN}-ptest += "ptest-runner" +RRECOMMENDS_${PN}-ptest += "ptest-runner2" PACKAGES =+ "${@bb.utils.contains('PTEST_ENABLED', '1', '${PN}-ptest', '', d)}"
meta/lib/oeqa/runtime/_ptest.py +2 -2
@@ -105,10 +105,10 @@ class PtestRunnerTest(oeRuntimeTest): def test_ptestrunner(self): self.add_smart_channel() (runnerstatus, result) = self.target.run('which ptest-runner', 0) - cond = oeRuntimeTest.hasPackage("ptest-runner") and oeRuntimeTest.hasFeature("ptest") and oeRuntimeTest.hasPackage("-ptest") and (runnerstatus != 0) + cond = oeRuntimeTest.hasPackage("ptest-runner2") and oeRuntimeTest.hasFeature("ptest") and oeRuntimeTest.hasPackage("-ptest") and (runnerstatus != 0) if cond: self.install_packages(self.install_complementary("*-ptest")) - self.install_packages(['ptest-runner']) + self.install_packages(['ptest-runner2']) (runnerstatus, result) = self.target.run('/usr/bin/ptest-runner > /tmp/ptest.log 2>&1', 0) #exit code is !=0 even if ptest-runner executes because some ptest tests fail.
Signature · 1 line
2.1.4
PATCH 3/3 Update dev-manual to point to the new ptest-runner2.
In reply to Aníbal Limón--- documentation/dev-manual/dev-manual-common-tasks.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
documentation/dev-manual/dev-manual-common-tasks.xml +2 -2
@@ -7488,8 +7488,8 @@ <title>Running ptest</title> <para> - The <filename>ptest-runner</filename> package installs a - shell script that loops through all installed ptest test + The <filename>ptest-runner2</filename> package installs a + program that loops through all installed ptest test suites and runs them in sequence. Consequently, you might want to add this package to your image.
Signature · 1 line
2.1.4
Re: [PATCH 3/3] Update dev-manual to point to the new ptest-runner2.
Anibal,
Patch applied and committed to yocto-docs repo master. See
http://git.yoctoproject.org/cgit/cgit.cgi/yocto-docs/commit/?id=221d7c6125f5fc02b9ce7bcf177fb382f421ff9f
for the commit and
http://www.yoctoproject.org/docs/2.1/dev-manual/dev-manual.html#running-ptest
for the published 2.1 section.
Thanks,
Scott
Quoted 33 lines · Aníbal Limón
Signed-off-by Aníbal Limón <[email protected]>--- documentation/dev-manual/dev-manual-common-tasks.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)documentation/dev-manual/dev-manual-common-tasks.xml +0
-1@@ -7488,8 +7488,8 @@ <title>Running ptest</title> <para> - The <filename>ptest-runner</filename> packageinstalls a
- shell script that loops through all installed ptest
test
+ The <filename>ptest-runner2</filename> package
installs a
+ program that loops through all installed ptest test
suites and runs them in sequence. Consequently, you might want to add this package to your image.
--
2.1.4--
_______________________________________________
poky mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/poky
ping...
Quoted 34 lines · Aníbal Limón
This is the changes that adds new ptest-runner2 C implementation a detail description exists in the recipe adding.
You can review the ptest-runner2 code on [1], i wrote unit tests for all the code using check framework also i used mtrace for found possible memory leaks.
Finally i tested the new runner on qemux86, qemuarm, qemumips, qemuppc using core-image-minimal and qemux86/poky-tiny/core-image-minimal.
[YOCTO #8021]
[1] https://github.com/alimon/ptest-runner2
The following changes since commit
92cc02fe517bad0af4e493fda3331738cbcc9a26:linux-yocto: Update Genericx86* BSPs to 4.1.15 (2016-01-14 15:18:46 +0000)
are available in the git repository at:
git://git.yoctoproject.org/poky-contribalimon/ptest-runner2
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=alimon/ptest-runner2Aníbal Limón (3):
ptest-runner2: Add new ptest-runner2 recipe.
ptests: Update references to new ptest-runner2. Update dev-manual to point to the new ptest-runner2..../dev-manual/dev-manual-common-tasks.xml | 4 ++-- meta/classes/ptest.bbclass | 2 +- meta/lib/oeqa/runtime/_ptest.py | 4 ++-- .../ptest-runner2/ptest-runner2_0.1.bb | 24 ++++++++++++++++++++++ 4 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 meta/recipes-support/ptest-runner2/ptest-runner2_0.1.bb