]> code.ossystems Code Review - openembedded-core.git/commitdiff
ptest-runner: Add ptest-runner_2.0 recipe.
authorAníbal Limón <anibal.limon@linux.intel.com>
Mon, 25 Jan 2016 23:29:37 +0000 (17:29 -0600)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 29 Jan 2016 18:14:52 +0000 (18:14 +0000)
The ptest-runner 2.0 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-runner 2.0 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]

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-support/ptest-runner/files/ptest-runner [deleted file]
meta/recipes-support/ptest-runner/ptest-runner_1.0.bb [deleted file]
meta/recipes-support/ptest-runner/ptest-runner_2.0.bb [new file with mode: 0644]

diff --git a/meta/recipes-support/ptest-runner/files/ptest-runner b/meta/recipes-support/ptest-runner/files/ptest-runner
deleted file mode 100755 (executable)
index 204cbdf..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/bin/sh
-
-determine_ptests_to_run()
-{
-    for libdir in /usr/lib*
-    do
-       [ ! -d "$libdir" ] && continue
-
-       for x in `ls -d $libdir/*/ptest 2>/dev/null`
-       do
-           [ ! -f $x/run-ptest ] && continue
-            [ -h `dirname $x` ] && continue
-
-           #found a ptest in the system
-           PTEST_FOUND=$(basename $(dirname $x))
-
-           # when no pkg-names were specified, by default run each one
-           if [[ -z $@ ]]; then
-               printf " $x"
-           else
-               #check if this ptest has been asked for and add it
-               if [[ $@ =~ $PTEST_FOUND ]]; then
-                       printf " $x"
-               fi
-           fi
-       done
-    done
-}
-
-run_ptests()
-{
-    ANYFAILED=no
-
-    #the paths were sanity-checked in determine_ptests_to_run()
-    for ptst_path in $PTESTS_TO_RUN
-    do
-        date "+%Y-%m-%dT%H:%M"
-        echo "BEGIN: $ptst_path"
-        cd "$ptst_path"
-        ./run-ptest || ANYFAILED=yes
-        echo "END: $ptest_path"
-        date "+%Y-%m-%dT%H:%M"
-    done
-}
-
-echo "START: $0"
-PTESTS_TO_RUN=$(determine_ptests_to_run $@)
-run_ptests
-echo "STOP: $0"
-
-if [ "$ANYFAILED" = "yes"  ]; then
-    exit 1
-fi
-exit 0
diff --git a/meta/recipes-support/ptest-runner/ptest-runner_1.0.bb b/meta/recipes-support/ptest-runner/ptest-runner_1.0.bb
deleted file mode 100644 (file)
index bc1b0a4..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-SUMMARY = "A simple shell script to run all installed ptests"
-DESCRIPTION = "The ptest-runner package installs a ptest-runner \
-shell script which loops through all installed ptest test suites and \
-runs them in sequence."
-HOMEPAGE = "https://wiki.yoctoproject.org/wiki/Ptest"
-SRC_URI += "file://ptest-runner"
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
-                    file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-
-INHIBIT_DEFAULT_DEPS = "1"
-
-S = "${WORKDIR}"
-
-do_install () {
-    mkdir -p ${D}${bindir}
-    install -m 0755 ${WORKDIR}/ptest-runner ${D}${bindir}
-}
-
-do_patch[noexec] = "1"
-do_configure[noexec] = "1"
-do_compile[noexec] = "1"
-do_build[noexec] = "1"
diff --git a/meta/recipes-support/ptest-runner/ptest-runner_2.0.bb b/meta/recipes-support/ptest-runner/ptest-runner_2.0.bb
new file mode 100644 (file)
index 0000000..221cf6c
--- /dev/null
@@ -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"
+
+SRCREV = "8bfdf946e784f4d5757bebee1fbc4b4a3d7a95c4"
+PV = "2.0+git${SRCPV}"
+
+SRC_URI = "git://github.com/alimon/ptest-runner2.git;protocol=https"
+S = "${WORKDIR}/git"
+
+FILES_${PN} = "${bindir}/ptest-runner"
+
+do_compile () {
+       oe_runmake
+}
+
+do_install () {
+       install -D -m 0755 ${WORKDIR}/git/ptest-runner ${D}${bindir}/ptest-runner
+}