summaryrefslogtreecommitdiff
path: root/meta/recipes-core/eglibc/eglibc-testing.inc
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2011-12-09 11:19:35 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-12-12 21:50:10 +0000
commit9244a3b0565fd52d7973fda42a4f706b16240316 (patch)
tree5c7339e9044404c3c68fb2cb13983a1e02ec5344 /meta/recipes-core/eglibc/eglibc-testing.inc
parentc09c6e61991b30c99d68fa6c2e5639d490a65e89 (diff)
downloadopenembedded-core-9244a3b0565fd52d7973fda42a4f706b16240316.tar.gz
openembedded-core-9244a3b0565fd52d7973fda42a4f706b16240316.tar.bz2
openembedded-core-9244a3b0565fd52d7973fda42a4f706b16240316.tar.xz
openembedded-core-9244a3b0565fd52d7973fda42a4f706b16240316.zip
eglibc: Generate cross testing script during install
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>
Diffstat (limited to 'meta/recipes-core/eglibc/eglibc-testing.inc')
-rw-r--r--meta/recipes-core/eglibc/eglibc-testing.inc47
1 files changed, 47 insertions, 0 deletions
diff --git a/meta/recipes-core/eglibc/eglibc-testing.inc b/meta/recipes-core/eglibc/eglibc-testing.inc
new file mode 100644
index 000000000..fb632ba26
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-testing.inc
@@ -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
+}