diff options
| author | Khem Raj <raj.khem@gmail.com> | 2011-12-16 14:33:35 -0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-12-19 09:29:17 +0000 |
| commit | 6082313b5547a3734a095f66eb930bd890867224 (patch) | |
| tree | 700f355f2f5e3b20245e2ee9a4ec2e9105f86940 | |
| parent | aa373931faba408faa11d9b10ca3de66d7be5ba6 (diff) | |
| download | poky-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>
| -rw-r--r-- | meta/recipes-core/eglibc/eglibc-testing.inc | 36 |
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 |
| 36 | cat >> ${B}/${HOST_PREFIX}testeglibc << STOP | 43 | cat >> ${B}/${HOST_PREFIX}testeglibc << STOP |
| 37 | target="\$1" | 44 | target="\$1" |
| 38 | if [ "x\$target" = "x" ] | 45 | if [ "x\$target" = "x" ] |
| 39 | then | 46 | then |
| 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; |
| 42 | fi | 49 | fi |
| 50 | ssh \$target ls \$PWD\ >& /dev/null | ||
| 51 | if [ "x\$?" != "x0" ] | ||
| 52 | then | ||
| 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 | ||
| 65 | fi | ||
| 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 | |||
| 43 | wrapper="${S}/scripts/cross-test-ssh.sh \$target" | 73 | wrapper="${S}/scripts/cross-test-ssh.sh \$target" |
| 44 | localedef="${STAGING_BINDIR_NATIVE}/cross-localedef --little-endian --uint32-align=4" | 74 | localedef="${STAGING_BINDIR_NATIVE}/cross-localedef --little-endian --uint32-align=4" |
| 75 | make tests-clean | ||
| 45 | make cross-localedef="\$localedef" cross-test-wrapper="\$wrapper" -k check | 76 | make cross-localedef="\$localedef" cross-test-wrapper="\$wrapper" -k check |
| 77 | rm -rf ${B}/configparms | ||
| 46 | STOP | 78 | STOP |
| 79 | |||
| 80 | chmod +x ${B}/${HOST_PREFIX}testeglibc | ||
| 47 | } | 81 | } |
