]> code.ossystems Code Review - openembedded-core.git/commitdiff
eglibc: Generate cross testing script during install
authorKhem Raj <raj.khem@gmail.com>
Fri, 9 Dec 2011 19:19:35 +0000 (11:19 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 12 Dec 2011 21:50:10 +0000 (21:50 +0000)
EGLIBC has long had cross testing capability, so use
that there are few steps needed on setting up the target
as well as the build host. This patch tries to generate
a script with all the needed environment on build host system

To use this script one needs to setup the target as described
in the testing intructions of eglibc and then this script
can directly interface to the target and run the tests from
eglibc's build directory. To run this script

bash <script> username@testing_hostname/ip

The output can be dumped into a log file for later viewing
and checked for "Error " to see the failed tests

Removes INC_PR its not used anywhere

Signed-off-by: Khem Raj <raj.khem@gmail.com>
meta/recipes-core/eglibc/eglibc-common.inc
meta/recipes-core/eglibc/eglibc-testing.inc [new file with mode: 0644]
meta/recipes-core/eglibc/eglibc.inc
meta/recipes-core/eglibc/eglibc_2.13.bb
meta/recipes-core/eglibc/eglibc_2.14.bb

index 4fa64885fbb4b84873b16ba294fe9777da905cab..d18786ab93112a868843aa616e4442d4fa0eac2f 100644 (file)
@@ -3,7 +3,6 @@ DESCRIPTION = "Embedded GLIBC (EGLIBC) is a variant of the GNU C Library (GLIBC)
 HOMEPAGE = "http://www.eglibc.org/home"
 SECTION = "libs"
 LICENSE = "GPLv2 & LGPLv2.1"
-INC_PR = "r11"
 LIC_FILES_CHKSUM ?= "file://LICENSES;md5=07a394b26e0902b9ffdec03765209770 \
       file://COPYING;md5=393a5ca445f6965873eca0259a17f833 \
       file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
diff --git a/meta/recipes-core/eglibc/eglibc-testing.inc b/meta/recipes-core/eglibc/eglibc-testing.inc
new file mode 100644 (file)
index 0000000..fb632ba
--- /dev/null
@@ -0,0 +1,47 @@
+do_compile_append () {
+       # now generate script to drive testing
+       echo "#!/usr/bin/env sh" >${B}/${HOST_PREFIX}testeglibc
+       set >> ${B}/${HOST_PREFIX}testeglibc
+       # prune out the unneeded vars
+       sed -i -e "/^BASH/d" ${B}/${HOST_PREFIX}testeglibc
+       sed -i -e "/^USER/d" ${B}/${HOST_PREFIX}testeglibc
+       sed -i -e "/^OPT/d" ${B}/${HOST_PREFIX}testeglibc
+       sed -i -e "/^DIRSTACK/d" ${B}/${HOST_PREFIX}testeglibc
+       sed -i -e "/^EUID/d" ${B}/${HOST_PREFIX}testeglibc
+       sed -i -e "/^FUNCNAME/d" ${B}/${HOST_PREFIX}testeglibc
+       sed -i -e "/^GROUPS/d" ${B}/${HOST_PREFIX}testeglibc
+       sed -i -e "/^HOST/d" ${B}/${HOST_PREFIX}testeglibc
+       sed -i -e "/^HOME/d" ${B}/${HOST_PREFIX}testeglibc
+       sed -i -e "/^IFS/d" ${B}/${HOST_PREFIX}testeglibc
+       sed -i -e "/^LC_ALL/d" ${B}/${HOST_PREFIX}testeglibc
+       sed -i -e "/^LOGNAME/d" ${B}/${HOST_PREFIX}testeglibc
+       sed -i -e "/^MACHTYPE/d" ${B}/${HOST_PREFIX}testeglibc
+       sed -i -e "/^OSTYPE/d" ${B}/${HOST_PREFIX}testeglibc
+       sed -i -e "/^PIPE/d" ${B}/${HOST_PREFIX}testeglibc
+       sed -i -e "/^SHELL/d" ${B}/${HOST_PREFIX}testeglibc
+       sed -i -e "/^'/d" ${B}/${HOST_PREFIX}testeglibc
+       sed -i -e "/^UID/d" ${B}/${HOST_PREFIX}testeglibc
+       sed -i -e "/^TERM/d" ${B}/${HOST_PREFIX}testeglibc
+       sed -i -e "/^PATCH_GET/d" ${B}/${HOST_PREFIX}testeglibc
+       sed -i -e "/^PKG_/d" ${B}/${HOST_PREFIX}testeglibc
+       sed -i -e "/^POSIXLY_/d" ${B}/${HOST_PREFIX}testeglibc
+       sed -i -e "/^PPID/d" ${B}/${HOST_PREFIX}testeglibc
+       sed -i -e "/^PS4/d" ${B}/${HOST_PREFIX}testeglibc
+       sed -i -e "/^Q/d" ${B}/${HOST_PREFIX}testeglibc
+       sed -i -e "/^SHLVL/d" ${B}/${HOST_PREFIX}testeglibc
+       sed -i -e "/^STAGING/d" ${B}/${HOST_PREFIX}testeglibc
+       sed -i -e "/^LD_LIBRARY_PATH/d" ${B}/${HOST_PREFIX}testeglibc
+       sed -i -e "/^PSEUDO/d" ${B}/${HOST_PREFIX}testeglibc
+       # append execution part script
+cat >> ${B}/${HOST_PREFIX}testeglibc << STOP
+target="\$1"
+if [ "x\$target" = "x" ]
+then
+       echo "Please specify the target machine and remote user in for of user@target"
+       exit 1;
+fi
+wrapper="${S}/scripts/cross-test-ssh.sh \$target"
+localedef="${STAGING_BINDIR_NATIVE}/cross-localedef --little-endian --uint32-align=4"
+make cross-localedef="\$localedef" cross-test-wrapper="\$wrapper" -k check
+STOP
+}
index 272fcb6273cd147e64eceb39b64958ec75fbc569..64694a04d8b8464cec60e633166493a06a8ef5be 100644 (file)
@@ -1,5 +1,6 @@
 require eglibc-common.inc
 require eglibc-ld.inc
+require eglibc-testing.inc
 
 STAGINGCC = "gcc-cross-intermediate"
 STAGINGCC_virtclass-nativesdk = "gcc-crosssdk-intermediate"
index 955c4ec4b918ad4654f3582697f1186bc29a21fa..9d3ec85af6ef46b3b099e4dad256f944a0d8bf49 100644 (file)
@@ -3,7 +3,7 @@ require eglibc.inc
 SRCREV = "15508"
 
 DEPENDS += "gperf-native"
-PR = "r18"
+PR = "r19"
 PR_append = "+svnr${SRCPV}"
 
 EGLIBC_BRANCH="eglibc-2_13"
@@ -207,10 +207,11 @@ do_compile () {
                done
        )
        echo "Adjust ldd script"
-       [ -z "${RTLDLIST}" ] && return
-       sed -i ${B}/elf/ldd -e 's#^\(RTLDLIST=\)"\(.*\)"$#\1\2#'
-       sed -i ${B}/elf/ldd -e 's#^\(RTLDLIST=\)\(.*\)$#\1"${RTLDLIST} \2"#'
-
+       if [ -n "${RTLDLIST}" ]
+       then
+               sed -i ${B}/elf/ldd -e 's#^\(RTLDLIST=\)"\(.*\)"$#\1\2#'
+               sed -i ${B}/elf/ldd -e 's#^\(RTLDLIST=\)\(.*\)$#\1"${RTLDLIST} \2"#'
+       fi
 }
 
 require eglibc-package.inc
index fd384f4705aabc1248ffb973ccb461e0ddfe60fd..855310676626d1aa36b8b0efe8ef36713b5bf2f4 100644 (file)
@@ -3,7 +3,7 @@ require eglibc.inc
 SRCREV = "15870"
 
 DEPENDS += "gperf-native"
-PR = "r1"
+PR = "r2"
 PR_append = "+svnr${SRCPV}"
 
 EGLIBC_BRANCH="eglibc-2_14"
@@ -209,9 +209,11 @@ do_compile () {
                done
        )
        echo "Adjust ldd script"
-       [ -z "${RTLDLIST}" ] && return
-       sed -i ${B}/elf/ldd -e 's#^\(RTLDLIST=\)"\(.*\)"$#\1\2#'
-       sed -i ${B}/elf/ldd -e 's#^\(RTLDLIST=\)\(.*\)$#\1"${RTLDLIST} \2"#'
+       if [ -n "${RTLDLIST}" ]
+       then
+               sed -i ${B}/elf/ldd -e 's#^\(RTLDLIST=\)"\(.*\)"$#\1\2#'
+               sed -i ${B}/elf/ldd -e 's#^\(RTLDLIST=\)\(.*\)$#\1"${RTLDLIST} \2"#'
+       fi
 
 }