summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/eglibc
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2011-12-16 14:33:35 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-12-19 09:29:17 +0000
commit6082313b5547a3734a095f66eb930bd890867224 (patch)
tree700f355f2f5e3b20245e2ee9a4ec2e9105f86940 /meta/recipes-core/eglibc
parentaa373931faba408faa11d9b10ca3de66d7be5ba6 (diff)
downloadpoky-6082313b5547a3734a095f66eb930bd890867224.tar.gz
eglibc-testing: Clean the test before running them
We make sure that we use final cross gcc to run the tests since they require proper functioning libstdc++ and libssp which are not staged in tcbootstrap sysroot We cleanup the tests before we run them so they all get run in case any of them were built and/or run during compilation Make the script executable Add more documentation to diagnose setup problems (From OE-Core rev: 9a74c25c37a3cca6e0bab4fe01aa3dd3e8d2d4dc) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/eglibc')
-rw-r--r--meta/recipes-core/eglibc/eglibc-testing.inc36
1 files changed, 35 insertions, 1 deletions
diff --git a/meta/recipes-core/eglibc/eglibc-testing.inc b/meta/recipes-core/eglibc/eglibc-testing.inc
index fb632ba26d..2cd7c6ab14 100644
--- a/meta/recipes-core/eglibc/eglibc-testing.inc
+++ b/meta/recipes-core/eglibc/eglibc-testing.inc
@@ -32,16 +32,50 @@ do_compile_append () {
32 sed -i -e "/^STAGING/d" ${B}/${HOST_PREFIX}testeglibc 32 sed -i -e "/^STAGING/d" ${B}/${HOST_PREFIX}testeglibc
33 sed -i -e "/^LD_LIBRARY_PATH/d" ${B}/${HOST_PREFIX}testeglibc 33 sed -i -e "/^LD_LIBRARY_PATH/d" ${B}/${HOST_PREFIX}testeglibc
34 sed -i -e "/^PSEUDO/d" ${B}/${HOST_PREFIX}testeglibc 34 sed -i -e "/^PSEUDO/d" ${B}/${HOST_PREFIX}testeglibc
35
36 # point to real sysroot not the toolchain bootstrap sysroot
37 sed -i -e "s/\-tcbootstrap//g" ${B}/${HOST_PREFIX}testeglibc
38
39 # use the final cross-gcc to test since some tests need libstdc++
40 sed -i -e "s/^PATH=.*\.gcc-cross-intermediate\:/PATH=/g" ${B}/${HOST_PREFIX}testeglibc
41
35 # append execution part script 42 # append execution part script
36cat >> ${B}/${HOST_PREFIX}testeglibc << STOP 43cat >> ${B}/${HOST_PREFIX}testeglibc << STOP
37target="\$1" 44target="\$1"
38if [ "x\$target" = "x" ] 45if [ "x\$target" = "x" ]
39then 46then
40 echo "Please specify the target machine and remote user in for of user@target" 47 echo "Please specify the target machine and remote user in form of user@target"
41 exit 1; 48 exit 1;
42fi 49fi
50ssh \$target ls \$PWD\ >& /dev/null
51if [ "x\$?" != "x0" ]
52then
53 echo "Failed connecting to \$target it could be because of:"
54 echo "1. You dont have passwordless ssh setup to access \$target"
55 echo "2. NFS share on \$target is not mounted or if mounted then not matching the build tree layout."
56 echo " The tree should be accessible at same location on build host and target"
57 echo " You can add nfs-server to IMAGE_FEATURES to get the nfs client on target"
58 echo "3. nfs server on build host is not running."
59 echo " Please make sure that you have 'no_root_squash' added in /etc/exports if you want"
60 echo " to test as root user on target (usually its recommended to create a non"
61 echo " root user."
62 echo " As a sanity check make sure that target can read/write to the eglibc build tree"
63 echo " Please refer to ${S}/EGLIBC.cross-testing for further instructions on setup"
64 exit 1
65fi
66 echo "# we test using cross compiler from real sysroot therefore override the" > ${B}/configparms
67 echo "# definitions that come from ${B}/config.make" >> ${B}/configparms
68
69 echo "CC = ${CC}" >> ${B}/configparms
70 echo "CXX = ${CXX}" >> ${B}/configparms
71 sed -i -e "s/\-tcbootstrap//g" ${B}/configparms
72
43wrapper="${S}/scripts/cross-test-ssh.sh \$target" 73wrapper="${S}/scripts/cross-test-ssh.sh \$target"
44localedef="${STAGING_BINDIR_NATIVE}/cross-localedef --little-endian --uint32-align=4" 74localedef="${STAGING_BINDIR_NATIVE}/cross-localedef --little-endian --uint32-align=4"
75make tests-clean
45make cross-localedef="\$localedef" cross-test-wrapper="\$wrapper" -k check 76make cross-localedef="\$localedef" cross-test-wrapper="\$wrapper" -k check
77rm -rf ${B}/configparms
46STOP 78STOP
79
80 chmod +x ${B}/${HOST_PREFIX}testeglibc
47} 81}