diff options
Diffstat (limited to 'meta')
| -rwxr-xr-x | meta/recipes-support/ptest-runner/files/ptest-runner | 54 | ||||
| -rw-r--r-- | meta/recipes-support/ptest-runner/ptest-runner_1.0.bb | 24 | ||||
| -rw-r--r-- | meta/recipes-support/ptest-runner/ptest-runner_2.0.bb | 24 |
3 files changed, 24 insertions, 78 deletions
diff --git a/meta/recipes-support/ptest-runner/files/ptest-runner b/meta/recipes-support/ptest-runner/files/ptest-runner deleted file mode 100755 index 204cbdfc76..0000000000 --- a/meta/recipes-support/ptest-runner/files/ptest-runner +++ /dev/null | |||
| @@ -1,54 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | determine_ptests_to_run() | ||
| 4 | { | ||
| 5 | for libdir in /usr/lib* | ||
| 6 | do | ||
| 7 | [ ! -d "$libdir" ] && continue | ||
| 8 | |||
| 9 | for x in `ls -d $libdir/*/ptest 2>/dev/null` | ||
| 10 | do | ||
| 11 | [ ! -f $x/run-ptest ] && continue | ||
| 12 | [ -h `dirname $x` ] && continue | ||
| 13 | |||
| 14 | #found a ptest in the system | ||
| 15 | PTEST_FOUND=$(basename $(dirname $x)) | ||
| 16 | |||
| 17 | # when no pkg-names were specified, by default run each one | ||
| 18 | if [[ -z $@ ]]; then | ||
| 19 | printf " $x" | ||
| 20 | else | ||
| 21 | #check if this ptest has been asked for and add it | ||
| 22 | if [[ $@ =~ $PTEST_FOUND ]]; then | ||
| 23 | printf " $x" | ||
| 24 | fi | ||
| 25 | fi | ||
| 26 | done | ||
| 27 | done | ||
| 28 | } | ||
| 29 | |||
| 30 | run_ptests() | ||
| 31 | { | ||
| 32 | ANYFAILED=no | ||
| 33 | |||
| 34 | #the paths were sanity-checked in determine_ptests_to_run() | ||
| 35 | for ptst_path in $PTESTS_TO_RUN | ||
| 36 | do | ||
| 37 | date "+%Y-%m-%dT%H:%M" | ||
| 38 | echo "BEGIN: $ptst_path" | ||
| 39 | cd "$ptst_path" | ||
| 40 | ./run-ptest || ANYFAILED=yes | ||
| 41 | echo "END: $ptest_path" | ||
| 42 | date "+%Y-%m-%dT%H:%M" | ||
| 43 | done | ||
| 44 | } | ||
| 45 | |||
| 46 | echo "START: $0" | ||
| 47 | PTESTS_TO_RUN=$(determine_ptests_to_run $@) | ||
| 48 | run_ptests | ||
| 49 | echo "STOP: $0" | ||
| 50 | |||
| 51 | if [ "$ANYFAILED" = "yes" ]; then | ||
| 52 | exit 1 | ||
| 53 | fi | ||
| 54 | 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 index bc1b0a4d46..0000000000 --- a/meta/recipes-support/ptest-runner/ptest-runner_1.0.bb +++ /dev/null | |||
| @@ -1,24 +0,0 @@ | |||
| 1 | SUMMARY = "A simple shell script to run all installed ptests" | ||
| 2 | DESCRIPTION = "The ptest-runner package installs a ptest-runner \ | ||
| 3 | shell script which loops through all installed ptest test suites and \ | ||
| 4 | runs them in sequence." | ||
| 5 | HOMEPAGE = "https://wiki.yoctoproject.org/wiki/Ptest" | ||
| 6 | SRC_URI += "file://ptest-runner" | ||
| 7 | |||
| 8 | LICENSE = "MIT" | ||
| 9 | LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \ | ||
| 10 | file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | ||
| 11 | |||
| 12 | INHIBIT_DEFAULT_DEPS = "1" | ||
| 13 | |||
| 14 | S = "${WORKDIR}" | ||
| 15 | |||
| 16 | do_install () { | ||
| 17 | mkdir -p ${D}${bindir} | ||
| 18 | install -m 0755 ${WORKDIR}/ptest-runner ${D}${bindir} | ||
| 19 | } | ||
| 20 | |||
| 21 | do_patch[noexec] = "1" | ||
| 22 | do_configure[noexec] = "1" | ||
| 23 | do_compile[noexec] = "1" | ||
| 24 | 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 index 0000000000..221cf6c287 --- /dev/null +++ b/meta/recipes-support/ptest-runner/ptest-runner_2.0.bb | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | SUMMARY = "A C program to run all installed ptests" | ||
| 2 | DESCRIPTION = "The ptest-runner2 package installs a ptest-runner \ | ||
| 3 | program which loops through all installed ptest test suites and \ | ||
| 4 | runs them in sequence." | ||
| 5 | HOMEPAGE = "https://github.com/alimon/ptest-runner2" | ||
| 6 | |||
| 7 | LICENSE = "GPLv2" | ||
| 8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe" | ||
| 9 | |||
| 10 | SRCREV = "8bfdf946e784f4d5757bebee1fbc4b4a3d7a95c4" | ||
| 11 | PV = "2.0+git${SRCPV}" | ||
| 12 | |||
| 13 | SRC_URI = "git://github.com/alimon/ptest-runner2.git;protocol=https" | ||
| 14 | S = "${WORKDIR}/git" | ||
| 15 | |||
| 16 | FILES_${PN} = "${bindir}/ptest-runner" | ||
| 17 | |||
| 18 | do_compile () { | ||
| 19 | oe_runmake | ||
| 20 | } | ||
| 21 | |||
| 22 | do_install () { | ||
| 23 | install -D -m 0755 ${WORKDIR}/git/ptest-runner ${D}${bindir}/ptest-runner | ||
| 24 | } | ||
