annotate gcc/testsuite/README.gcc @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 This file contains a list of notes for those writing testcases and those
kono
parents:
diff changeset
2 writing expect scripts. At present, they're in random order.
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 Verbosity Levels
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 - each level adds verbosity so level 2 prints all level 1 and level 2 stuff.
kono
parents:
diff changeset
7
kono
parents:
diff changeset
8 1) Print a one-liner indicating the testcase being run (and maybe special
kono
parents:
diff changeset
9 compiler options).
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 2) Print compiler and program invocation including arguments and their output.
kono
parents:
diff changeset
12 Proc's gcc_load and gcc_start handle the latter two.
kono
parents:
diff changeset
13
kono
parents:
diff changeset
14 3) Print detailed testcase analysis like "Looking for pattern ...", etc.
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16 4) Maximum verbosity. Print anything else of interest.
kono
parents:
diff changeset
17
kono
parents:
diff changeset
18 send_log conventions
kono
parents:
diff changeset
19
kono
parents:
diff changeset
20 Various messages are stored in gcc.log by the testing framework and we
kono
parents:
diff changeset
21 try to augment them with some of our own. The format of the framework
kono
parents:
diff changeset
22 messages are:
kono
parents:
diff changeset
23
kono
parents:
diff changeset
24 PASS: blah blah ...
kono
parents:
diff changeset
25 FAIL: blah blah ...
kono
parents:
diff changeset
26
kono
parents:
diff changeset
27 so we use
kono
parents:
diff changeset
28
kono
parents:
diff changeset
29 XXXX: blah blah ...
kono
parents:
diff changeset
30
kono
parents:
diff changeset
31 Current messages are:
kono
parents:
diff changeset
32
kono
parents:
diff changeset
33 EXEC: program being executed (so compiler path and args are recorded)
kono
parents:
diff changeset
34 STAT: intermediate pass/fail statistics
kono
parents:
diff changeset
35
kono
parents:
diff changeset
36 Test scripts must ignore the compiler messages "path prefix never used"
kono
parents:
diff changeset
37 and "linker input file unused". Don't let their appearance cause a testcase
kono
parents:
diff changeset
38 to fail. See lib/dg.exp for the exact regsub to use.
kono
parents:
diff changeset
39
kono
parents:
diff changeset
40 If you're unclear about which directory a testcase should be installed in,
kono
parents:
diff changeset
41 ask gcc-local.
kono
parents:
diff changeset
42
kono
parents:
diff changeset
43 Have the text of a fail message be the same as that for pass.
kono
parents:
diff changeset
44 IE: have
kono
parents:
diff changeset
45
kono
parents:
diff changeset
46 if ...success...
kono
parents:
diff changeset
47 pass "pr 1234"
kono
parents:
diff changeset
48 else
kono
parents:
diff changeset
49 fail "pr 1234"
kono
parents:
diff changeset
50
kono
parents:
diff changeset
51 not
kono
parents:
diff changeset
52
kono
parents:
diff changeset
53 if ...success...
kono
parents:
diff changeset
54 pass "pr 1234 passed"
kono
parents:
diff changeset
55 else
kono
parents:
diff changeset
56 fail "pr 1234 failed"
kono
parents:
diff changeset
57
kono
parents:
diff changeset
58
kono
parents:
diff changeset
59 This lets test-tool (which drives the nightly tests) do a better job
kono
parents:
diff changeset
60 at tracking which tests have digressed or been fixed.
kono
parents:
diff changeset
61
kono
parents:
diff changeset
62 DO NOT PUT NON-PORTABLE TESTCASES IN gcc.c-torture.
kono
parents:
diff changeset
63
kono
parents:
diff changeset
64 ANY TARGET SPECIFIC TESTCASE MUST HAVE APPROPRIATE CODE TO PREVENT IT FROM
kono
parents:
diff changeset
65 CAUSING A `FAILURE' ON UNSUPPORTED PLATFORMS.
kono
parents:
diff changeset
66
kono
parents:
diff changeset
67 The "torture" tests are meant to be generic tests that can run on any
kono
parents:
diff changeset
68 target. So you have to be careful about endianness, assumptions about
kono
parents:
diff changeset
69 sizes of datatypes, etc etc.
kono
parents:
diff changeset
70
kono
parents:
diff changeset
71 For tests that merely need to compile, put them in the "compile" directory.
kono
parents:
diff changeset
72
kono
parents:
diff changeset
73 For tests which should give an error, put them in the "noncompile" directory
kono
parents:
diff changeset
74 and update noncompile.exp appropriately (see examples in noncompile.exp).
kono
parents:
diff changeset
75
kono
parents:
diff changeset
76 For IEEE FP specific tests, put them in execute/ieee.
kono
parents:
diff changeset
77
kono
parents:
diff changeset
78 For execution tests, put them in execute.
kono
parents:
diff changeset
79
kono
parents:
diff changeset
80 If a test does not fit into the torture framework, use the dg framework.
kono
parents:
diff changeset
81
kono
parents:
diff changeset
82
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
83 Copyright (C) 1997-2018 Free Software Foundation, Inc.
111
kono
parents:
diff changeset
84
kono
parents:
diff changeset
85 Copying and distribution of this file, with or without modification,
kono
parents:
diff changeset
86 are permitted in any medium without royalty provided the copyright
kono
parents:
diff changeset
87 notice and this notice are preserved.