summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glibc/glibc-testing.inc
diff options
context:
space:
mode:
authorNathan Rossi <nathan@nathanrossi.com>2019-12-02 05:59:23 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-12-06 14:41:28 +0000
commit4366ff922ac637b2f523cd73d9cb99b30f67a873 (patch)
treef75b1e0495446fb8c7f89daef8083e30be9fdb4d /meta/recipes-core/glibc/glibc-testing.inc
parent4e166a5a1ff212b182a4212ffb01b3a97fdfa809 (diff)
downloadpoky-4366ff922ac637b2f523cd73d9cb99b30f67a873.tar.gz
glibc-testing.inc: Remove testglibc script generation
Remove the generation of the testglibc script which could be used to run the glibc test suite with a remote target. The same functionality can now be achieved with the 'do_check' task of glibc-testsuite or with oe-selftest (for automation of execution against qemu-user/qemu-system targets). (From OE-Core rev: 6d6fb46631d7d551cc2de48b51172cfcf36e8dd3) Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/glibc/glibc-testing.inc')
-rw-r--r--meta/recipes-core/glibc/glibc-testing.inc95
1 files changed, 0 insertions, 95 deletions
diff --git a/meta/recipes-core/glibc/glibc-testing.inc b/meta/recipes-core/glibc/glibc-testing.inc
deleted file mode 100644
index 0a42ae7f7c..0000000000
--- a/meta/recipes-core/glibc/glibc-testing.inc
+++ /dev/null
@@ -1,95 +0,0 @@
1do_compile_append () {
2 # now generate script to drive testing
3 echo "#!/usr/bin/env sh" >${B}/${HOST_PREFIX}testglibc
4 set >> ${B}/${HOST_PREFIX}testglibc
5 # prune out the unneeded vars
6 sed -i -e "/^BASH/d" ${B}/${HOST_PREFIX}testglibc
7 sed -i -e "/^USER/d" ${B}/${HOST_PREFIX}testglibc
8 sed -i -e "/^OPT/d" ${B}/${HOST_PREFIX}testglibc
9 sed -i -e "/^DIRSTACK/d" ${B}/${HOST_PREFIX}testglibc
10 sed -i -e "/^EUID/d" ${B}/${HOST_PREFIX}testglibc
11 sed -i -e "/^FUNCNAME/d" ${B}/${HOST_PREFIX}testglibc
12 sed -i -e "/^GROUPS/d" ${B}/${HOST_PREFIX}testglibc
13 sed -i -e "/^HOST/d" ${B}/${HOST_PREFIX}testglibc
14 sed -i -e "/^HOME/d" ${B}/${HOST_PREFIX}testglibc
15 sed -i -e "/^IFS/d" ${B}/${HOST_PREFIX}testglibc
16 sed -i -e "/^LC_ALL/d" ${B}/${HOST_PREFIX}testglibc
17 sed -i -e "/^LOGNAME/d" ${B}/${HOST_PREFIX}testglibc
18 sed -i -e "/^MACHTYPE/d" ${B}/${HOST_PREFIX}testglibc
19 sed -i -e "/^OSTYPE/d" ${B}/${HOST_PREFIX}testglibc
20 sed -i -e "/^PIPE/d" ${B}/${HOST_PREFIX}testglibc
21 sed -i -e "/^SHELL/d" ${B}/${HOST_PREFIX}testglibc
22 sed -i -e "/^'/d" ${B}/${HOST_PREFIX}testglibc
23 sed -i -e "/^UID/d" ${B}/${HOST_PREFIX}testglibc
24 sed -i -e "/^TERM/d" ${B}/${HOST_PREFIX}testglibc
25 sed -i -e "/^PKG_/d" ${B}/${HOST_PREFIX}testglibc
26 sed -i -e "/^POSIXLY_/d" ${B}/${HOST_PREFIX}testglibc
27 sed -i -e "/^PPID/d" ${B}/${HOST_PREFIX}testglibc
28 sed -i -e "/^PS4/d" ${B}/${HOST_PREFIX}testglibc
29 sed -i -e "/^Q/d" ${B}/${HOST_PREFIX}testglibc
30 sed -i -e "/^SHLVL/d" ${B}/${HOST_PREFIX}testglibc
31 sed -i -e "/^STAGING/d" ${B}/${HOST_PREFIX}testglibc
32 sed -i -e "/^LD_LIBRARY_PATH/d" ${B}/${HOST_PREFIX}testglibc
33 sed -i -e "/^PSEUDO/d" ${B}/${HOST_PREFIX}testglibc
34
35 # point to real sysroot not the toolchain bootstrap sysroot
36 sed -i -e "s/\-tcbootstrap//g" ${B}/${HOST_PREFIX}testglibc
37
38 # use the final cross-gcc to test since some tests need libstdc++
39 sed -i -e "s/^PATH=.*\.gcc-cross-initial\:/PATH=/g" ${B}/${HOST_PREFIX}testglibc
40
41 # append execution part script
42cat >> ${B}/${HOST_PREFIX}testglibc << STOP
43target="\$1"
44if [ "x\$target" = "x" ]
45then
46 echo "Please specify the target machine and remote user in form of user@target"
47 exit 1;
48fi
49ssh \$target ls \$PWD\ 2>&1 > /dev/null
50if [ "x\$?" != "x0" ]
51then
52 echo "Failed connecting to \$target it could be because of:"
53 echo "1. You dont have passwordless ssh setup to access \$target"
54 echo "2. NFS share on \$target is not mounted or if mounted then not matching the build tree layout."
55 echo " The tree should be accessible at same location on build host and target"
56 echo " You can add nfs-client to IMAGE_FEATURES to get the nfs client on target"
57 echo "3. nfs server on build host is not running."
58 echo " Please make sure that you have 'no_root_squash' added in /etc/exports if you want"
59 echo " to test as root user on target (usually its recommended to create a non"
60 echo " root user."
61 echo " As a sanity check make sure that target can read/write to the glibc build tree"
62 echo " Please refer to ${S}/EGLIBC.cross-testing for further instructions on setup"
63 exit 1
64fi
65 echo "# we test using cross compiler from real sysroot therefore override the" > ${B}/configparms
66 echo "# definitions that come from ${B}/config.make" >> ${B}/configparms
67 fgrep tcbootstrap ${B}/config.make > ${B}/configparms
68 sed -i -e "s/\-tcbootstrap//g" ${B}/configparms
69
70# g++ uses flag -nostdinc, so the locations of system include headers must be explicitly specified
71# If the locations are not already specified in config.make, then we provide the following locations:
72# <sysroot>/usr/include/c++/<g++ version>
73# <sysroot>/usr/include/c++/<g++ version>/<machine>
74
75cxxincludes=\`cat ${B}/config.make | gawk '\$1 == "c++-sysincludes"' | gawk -F"=" '{print \$2}' | sed "s/[ \t]\?//g"\`
76
77if [ -z "\$cxxincludes" ]; then
78 sysroot=\`cat ${B}/configparms | sed -n "/CXX/p" | sed -e "s/^.*--sysroot=//"\`
79 cxx=\`cat ${B}/configparms | gawk '\$1 ~ /^CXX/' | gawk -F"=" '{print \$2}' | gawk '{print \$1}'\`
80 cxxmachine=\`\$cxx -dumpmachine\`
81 cxxversion=\`\$cxx -dumpversion\`
82 # pass the new value of c++-sysincludes via configparms
83 echo "# c++-sysincludes added:" >> ${B}/configparms
84 echo "c++-sysincludes = -isystem \$sysroot/usr/include/c++/\$cxxversion -isystem \$sysroot/usr/include/c++/\$cxxversion/\$cxxmachine" >> ${B}/configparms
85fi
86
87wrapper="${S}/scripts/cross-test-ssh.sh \$target"
88localedef="${STAGING_BINDIR_NATIVE}/cross-localedef --little-endian --uint32-align=4"
89make tests-clean
90make cross-localedef="\$localedef" cross-test-wrapper="\$wrapper" -k check
91rm -rf ${B}/configparms
92STOP
93
94 chmod +x ${B}/${HOST_PREFIX}testglibc
95}