]> code.ossystems Code Review - openembedded-core.git/commitdiff
eglibc-testing: Clean the test before running them
authorKhem Raj <raj.khem@gmail.com>
Fri, 16 Dec 2011 22:33:35 +0000 (14:33 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 19 Dec 2011 09:26:06 +0000 (09:26 +0000)
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

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/eglibc/eglibc-testing.inc

index fb632ba26d8fd073a2af6646dfb392752a1c5295..2cd7c6ab14920d9590e730f8fc01d688ac6d1dfb 100644 (file)
@@ -32,16 +32,50 @@ do_compile_append () {
        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
+
+       # point to real sysroot not the toolchain bootstrap sysroot
+       sed -i -e "s/\-tcbootstrap//g" ${B}/${HOST_PREFIX}testeglibc
+
+       # use the final cross-gcc to test since some tests need libstdc++
+       sed -i -e "s/^PATH=.*\.gcc-cross-intermediate\:/PATH=/g" ${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"
+       echo "Please specify the target machine and remote user in form of user@target"
        exit 1;
 fi
+ssh \$target ls \$PWD\ >& /dev/null
+if [ "x\$?" != "x0" ]
+then
+       echo "Failed connecting to \$target it could be because of:"
+       echo "1. You dont have passwordless ssh setup to access \$target"
+       echo "2. NFS share on \$target is not mounted or if mounted then not matching the build tree layout."
+       echo "   The tree should be accessible at same location on build host and target"
+       echo "   You can add nfs-server to IMAGE_FEATURES to get the nfs client on target"
+       echo "3. nfs server on build host is not running."
+       echo "   Please make sure that you have 'no_root_squash' added in /etc/exports if you want"
+       echo "   to test as root user on target (usually its recommended to create a non"
+       echo "   root user."
+       echo "   As a sanity check make sure that target can read/write to the eglibc build tree"
+       echo "   Please refer to ${S}/EGLIBC.cross-testing for further instructions on setup"
+       exit 1
+fi
+       echo "# we test using cross compiler from real sysroot therefore override the" > ${B}/configparms
+       echo "# definitions that come from ${B}/config.make" >> ${B}/configparms
+
+       echo "CC = ${CC}" >> ${B}/configparms
+       echo "CXX = ${CXX}" >> ${B}/configparms
+       sed -i -e "s/\-tcbootstrap//g" ${B}/configparms
+
 wrapper="${S}/scripts/cross-test-ssh.sh \$target"
 localedef="${STAGING_BINDIR_NATIVE}/cross-localedef --little-endian --uint32-align=4"
+make tests-clean
 make cross-localedef="\$localedef" cross-test-wrapper="\$wrapper" -k check
+rm -rf ${B}/configparms
 STOP
+
+       chmod +x ${B}/${HOST_PREFIX}testeglibc
 }