diff options
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/recipes-devtools/gcc/gcc-cross.inc | 91 |
1 files changed, 90 insertions, 1 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc index 5a796bcde6..0b31a8c8a3 100644 --- a/meta/recipes-devtools/gcc/gcc-cross.inc +++ b/meta/recipes-devtools/gcc/gcc-cross.inc | |||
| @@ -8,5 +8,94 @@ require gcc-package-cross.inc | |||
| 8 | 8 | ||
| 9 | do_compile () { | 9 | do_compile () { |
| 10 | oe_runmake all-host all-target-libgcc | 10 | oe_runmake all-host all-target-libgcc |
| 11 | } | 11 | # now generate script to drive testing |
| 12 | echo "#!/usr/bin/env sh" >${B}/${TARGET_PREFIX}testgcc | ||
| 13 | set >> ${B}/${TARGET_PREFIX}testgcc | ||
| 14 | # prune out the unneeded vars | ||
| 15 | sed -i -e "/^BASH/d" ${B}/${TARGET_PREFIX}testgcc | ||
| 16 | sed -i -e "/^USER/d" ${B}/${TARGET_PREFIX}testgcc | ||
| 17 | sed -i -e "/^OPT/d" ${B}/${TARGET_PREFIX}testgcc | ||
| 18 | sed -i -e "/^DIRSTACK/d" ${B}/${TARGET_PREFIX}testgcc | ||
| 19 | sed -i -e "/^EUID/d" ${B}/${TARGET_PREFIX}testgcc | ||
| 20 | sed -i -e "/^FUNCNAME/d" ${B}/${TARGET_PREFIX}testgcc | ||
| 21 | sed -i -e "/^GROUPS/d" ${B}/${TARGET_PREFIX}testgcc | ||
| 22 | sed -i -e "/^HOST/d" ${B}/${TARGET_PREFIX}testgcc | ||
| 23 | sed -i -e "/^HOME/d" ${B}/${TARGET_PREFIX}testgcc | ||
| 24 | sed -i -e "/^IFS/d" ${B}/${TARGET_PREFIX}testgcc | ||
| 25 | sed -i -e "/^LC_ALL/d" ${B}/${TARGET_PREFIX}testgcc | ||
| 26 | sed -i -e "/^LOGNAME/d" ${B}/${TARGET_PREFIX}testgcc | ||
| 27 | sed -i -e "/^MACHTYPE/d" ${B}/${TARGET_PREFIX}testgcc | ||
| 28 | sed -i -e "/^OSTYPE/d" ${B}/${TARGET_PREFIX}testgcc | ||
| 29 | sed -i -e "/^PIPE/d" ${B}/${TARGET_PREFIX}testgcc | ||
| 30 | sed -i -e "/^SHELL/d" ${B}/${TARGET_PREFIX}testgcc | ||
| 31 | sed -i -e "/^'/d" ${B}/${TARGET_PREFIX}testgcc | ||
| 32 | sed -i -e "/^UID/d" ${B}/${TARGET_PREFIX}testgcc | ||
| 33 | sed -i -e "/^TERM/d" ${B}/${TARGET_PREFIX}testgcc | ||
| 34 | sed -i -e "/^PATCH_GET/d" ${B}/${TARGET_PREFIX}testgcc | ||
| 35 | sed -i -e "/^PKG_/d" ${B}/${TARGET_PREFIX}testgcc | ||
| 36 | sed -i -e "/^POSIXLY_/d" ${B}/${TARGET_PREFIX}testgcc | ||
| 37 | sed -i -e "/^PPID/d" ${B}/${TARGET_PREFIX}testgcc | ||
| 38 | sed -i -e "/^PS4/d" ${B}/${TARGET_PREFIX}testgcc | ||
| 39 | sed -i -e "/^Q/d" ${B}/${TARGET_PREFIX}testgcc | ||
| 40 | sed -i -e "/^SHLVL/d" ${B}/${TARGET_PREFIX}testgcc | ||
| 41 | sed -i -e "/^STAGING/d" ${B}/${TARGET_PREFIX}testgcc | ||
| 42 | sed -i -e "/^LD_LIBRARY_PATH/d" ${B}/${TARGET_PREFIX}testgcc | ||
| 43 | sed -i -e "/^PSEUDO/d" ${B}/${TARGET_PREFIX}testgcc | ||
| 44 | |||
| 45 | # append execution part of the script | ||
| 46 | cat >> ${B}/${TARGET_PREFIX}testgcc << STOP | ||
| 47 | target="\$1" | ||
| 48 | shift | ||
| 49 | usage () { | ||
| 50 | echo "Usage:" | ||
| 51 | echo "\$0 user@target 'extra options to dejagnu'" | ||
| 52 | echo "\$0 target 'extra options to dejagnu'" | ||
| 53 | echo "\$0 target" | ||
| 54 | echo "e.g. \$0 192.168.7.2 ' dg.exp=visibility-d.c'" | ||
| 55 | echo "will only run visibility-d.c test case" | ||
| 56 | echo "e.g. \$0 192.168.7.2 '/-mthumb dg.exp=visibility-d.c'" | ||
| 57 | echo "will only run visibility-d.c test case in thumb mode" | ||
| 58 | echo "You need to have dejagnu autogen expect installed" | ||
| 59 | echo "on the build host" | ||
| 60 | } | ||
| 61 | if [ "x\$target" = "x" ] | ||
| 62 | then | ||
| 63 | echo "Please specify the target machine and remote user in form of user@target" | ||
| 64 | usage | ||
| 65 | exit 1; | ||
| 66 | fi | ||
| 67 | |||
| 68 | echo "\$target" | grep −q "@" >& /dev/null | ||
| 69 | if [ "x\$?" = "x0" ] | ||
| 70 | then | ||
| 71 | user=echo \$target | cut -d '@' -f 1 | ||
| 72 | target=echo \$target | cut -d '@' -f 2 | ||
| 73 | else | ||
| 74 | user=\$USER | ||
| 75 | fi | ||
| 76 | ssh \$user@\$target date >& /dev/null | ||
| 77 | if [ "x\$?" != "x0" ] | ||
| 78 | then | ||
| 79 | echo "Failed connecting to \$user@\$target it could be because" | ||
| 80 | echo "you don't have passwordless ssh setup to access \$target" | ||
| 81 | echo "or sometimes host key has been changed" | ||
| 82 | echo "in such case do something like below on build host" | ||
| 83 | echo "ssh-keygen -f "~/.ssh/known_hosts" -R \$target" | ||
| 84 | echo "and then try ssh \$user@\$target" | ||
| 85 | |||
| 86 | usage | ||
| 87 | exit 1 | ||
| 88 | fi | ||
| 89 | echo "lappend boards_dir [pwd]/../../.." > ${B}/site.exp | ||
| 90 | echo "load_generic_config \"unix\"" > ${B}/${MACHINE_ARCH}.exp | ||
| 91 | echo "set_board_info username \$user" >> ${B}/${MACHINE_ARCH}.exp | ||
| 92 | echo "set_board_info rsh_prog ssh" >> ${B}/${MACHINE_ARCH}.exp | ||
| 93 | echo "set_board_info rcp_prog scp" >> ${B}/${MACHINE_ARCH}.exp | ||
| 94 | echo "set_board_info hostname \$target" >> ${B}/${MACHINE_ARCH}.exp | ||
| 95 | DEJAGNU=${B}/site.exp make -k check RUNTESTFLAGS="--target_board=${MACHINE_ARCH}\$@" | ||
| 12 | 96 | ||
| 97 | STOP | ||
| 98 | |||
| 99 | chmod +x ${B}/${TARGET_PREFIX}testgcc | ||
| 100 | |||
| 101 | } | ||
