contrib/gcc-test-suite/README
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Dec 13 23:32:39 2011 +0100 (2011-12-13)
branch1.13
changeset 2847 c0bf2319af08
parent 1965 e3d532dd8b5d
child 2908 dcdb309b7967
permissions -rw-r--r--
scripts: fix dumping execution backtrace

Dumping the backtrace has been broken since changeset #652e56d6d35a:
scripts: execute each steps in a subshell

We can spawn sub-sub-shells in some cases.

The way the fault handler works is to dump the backtrace, but to avoid
printing it once for every sub-shell (which could get quite confusing),
it simply exits when it detects that it is being run in a sub-shell,
leaving to the top-level shell the work to dump the backtrace.

Because each step is executed in its own sub-shell, the variable arrays
that contain the step name, the source file and line number, are lost
when exiting the per-step sub-shell.

Hence, the backtrace is currently limited to printing only the top-level
main procedure of the shell.

Fix this thus:
- when dumping the bckatraces for the steps & the functions, remember
it was dumped, and only dump it if it was not already dumped
- at the top-level shell, print the hints

Also, rename the top-level step label.

Reported-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
(transplanted from 4193d6e6a17430a177fa88c287879c2c35e319f3)
     1 
     2 Helper Makefile for testing gcc toolchains using the gcc-testsuite
     3 ==================================================================
     4 
     5 Requirements
     6 ------------
     7 
     8 * DejaGnu 'runtest' v1.4.4+
     9 * Make v3.81+
    10 
    11 
    12 Configuration
    13 -------------
    14 
    15 Edit default.cfg to reflect your toolchain and target configuration.
    16 
    17 Alternatively, override configuration variables on the command line.
    18 
    19 Available config variables:
    20 
    21 DG_TOOLNAME
    22   The name of the tool you want to test.
    23   Currently supported: gcc or g++
    24   Default: gcc
    25 
    26 DG_TARGET_HOSTNAME
    27   The hostname or IP of the machine to execute run-tests
    28   Default: 127.0.0.1
    29 
    30 DG_TARGET_USERNAME
    31   Execute the run-test as this user on DG_TARGET_HOSTNAME
    32   Default: root
    33 
    34 DG_C_TESTS
    35 DG_CPP_TESTS
    36   The C/C++ tests you want to check
    37   Default: (empty, means all tests)
    38 
    39 
    40 Run examples
    41 ------------
    42 
    43 The first two examples require a networked target with ssh access and automatic
    44 ssh login (see section below). Target SW should be compiled with the toolchain 
    45 to be tested.
    46 
    47 Run default gcc compile/execution tests:
    48 $ make DG_TOOLNAME=gcc DG_TARGET_HOSTNAME=192.168.17.93 DG_TARGET_USERNAME=root
    49 
    50 Run default g++ compile/execution tests:
    51 $ make DG_TOOLNAME=g++ DG_TARGET_HOSTNAME=192.168.17.93 DG_TARGET_USERNAME=root
    52 
    53 Run selected gcc compile only tests (no target required):
    54 $ make DG_TOOLNAME=gcc DG_C_TESTS="compile.exp noncompile.exp" 
    55 
    56 
    57 SSH automatic login configuration example
    58 -----------------------------------------
    59 
    60 On host do: 
    61 ssh-keygen -t rsa (then simply press enter thru all steps)
    62 ssh-copy-id -i ~/.ssh/id_rsa.pub <username>@<target IP>
    63 
    64 Now automatic ssh login should work - test by doing a simple ssh session to target.
    65 
    66 Note: The procedure might be slightly different for your particular target.
    67 
    68 
    69 Getting rid of the test-suite
    70 -----------------------------
    71 
    72 If you no longer have a need for the test-suite, then you can remove it altogether
    73 from your toolchain. Just delete the test-suite/ dub-dir.
    74 
    75 
    76 Author
    77 ------
    78 Martin Lund <mgl@doredevelopment.dk>
    79   Initial content
    80 
    81 "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
    82   Getting rid of the test-suite
    83   Minor fixes