| 1 | .\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13 |
| 2 | .\" |
| 3 | .\" Standard preamble: |
| 4 | .\" ======================================================================== |
| 5 | .de Sh \" Subsection heading |
| 6 | .br |
| 7 | .if t .Sp |
| 8 | .ne 5 |
| 9 | .PP |
| 10 | \fB\\$1\fR |
| 11 | .PP |
| 12 | .. |
| 13 | .de Sp \" Vertical space (when we can't use .PP) |
| 14 | .if t .sp .5v |
| 15 | .if n .sp |
| 16 | .. |
| 17 | .de Vb \" Begin verbatim text |
| 18 | .ft CW |
| 19 | .nf |
| 20 | .ne \\$1 |
| 21 | .. |
| 22 | .de Ve \" End verbatim text |
| 23 | .ft R |
| 24 | .fi |
| 25 | .. |
| 26 | .\" Set up some character translations and predefined strings. \*(-- will |
| 27 | .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left |
| 28 | .\" double quote, and \*(R" will give a right double quote. | will give a |
| 29 | .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to |
| 30 | .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' |
| 31 | .\" expand to `' in nroff, nothing in troff, for use with C<>. |
| 32 | .tr \(*W-|\(bv\*(Tr |
| 33 | .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' |
| 34 | .ie n \{\ |
| 35 | . ds -- \(*W- |
| 36 | . ds PI pi |
| 37 | . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch |
| 38 | . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch |
| 39 | . ds L" "" |
| 40 | . ds R" "" |
| 41 | . ds C` "" |
| 42 | . ds C' "" |
| 43 | 'br\} |
| 44 | .el\{\ |
| 45 | . ds -- \|\(em\| |
| 46 | . ds PI \(*p |
| 47 | . ds L" `` |
| 48 | . ds R" '' |
| 49 | 'br\} |
| 50 | .\" |
| 51 | .\" If the F register is turned on, we'll generate index entries on stderr for |
| 52 | .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index |
| 53 | .\" entries marked with X<> in POD. Of course, you'll have to process the |
| 54 | .\" output yourself in some meaningful fashion. |
| 55 | .if \nF \{\ |
| 56 | . de IX |
| 57 | . tm Index:\\$1\t\\n%\t"\\$2" |
| 58 | .. |
| 59 | . nr % 0 |
| 60 | . rr F |
| 61 | .\} |
| 62 | .\" |
| 63 | .\" For nroff, turn off justification. Always turn off hyphenation; it makes |
| 64 | .\" way too many mistakes in technical documents. |
| 65 | .hy 0 |
| 66 | .if n .na |
| 67 | .\" |
| 68 | .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). |
| 69 | .\" Fear. Run. Save yourself. No user-serviceable parts. |
| 70 | . \" fudge factors for nroff and troff |
| 71 | .if n \{\ |
| 72 | . ds #H 0 |
| 73 | . ds #V .8m |
| 74 | . ds #F .3m |
| 75 | . ds #[ \f1 |
| 76 | . ds #] \fP |
| 77 | .\} |
| 78 | .if t \{\ |
| 79 | . ds #H ((1u-(\\\\n(.fu%2u))*.13m) |
| 80 | . ds #V .6m |
| 81 | . ds #F 0 |
| 82 | . ds #[ \& |
| 83 | . ds #] \& |
| 84 | .\} |
| 85 | . \" simple accents for nroff and troff |
| 86 | .if n \{\ |
| 87 | . ds ' \& |
| 88 | . ds ` \& |
| 89 | . ds ^ \& |
| 90 | . ds , \& |
| 91 | . ds ~ ~ |
| 92 | . ds / |
| 93 | .\} |
| 94 | .if t \{\ |
| 95 | . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" |
| 96 | . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' |
| 97 | . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' |
| 98 | . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' |
| 99 | . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' |
| 100 | . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' |
| 101 | .\} |
| 102 | . \" troff and (daisy-wheel) nroff accents |
| 103 | .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' |
| 104 | .ds 8 \h'\*(#H'\(*b\h'-\*(#H' |
| 105 | .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] |
| 106 | .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' |
| 107 | .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' |
| 108 | .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] |
| 109 | .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] |
| 110 | .ds ae a\h'-(\w'a'u*4/10)'e |
| 111 | .ds Ae A\h'-(\w'A'u*4/10)'E |
| 112 | . \" corrections for vroff |
| 113 | .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' |
| 114 | .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' |
| 115 | . \" for low resolution devices (crt and lpr) |
| 116 | .if \n(.H>23 .if \n(.V>19 \ |
| 117 | \{\ |
| 118 | . ds : e |
| 119 | . ds 8 ss |
| 120 | . ds o a |
| 121 | . ds d- d\h'-1'\(ga |
| 122 | . ds D- D\h'-1'\(hy |
| 123 | . ds th \o'bp' |
| 124 | . ds Th \o'LP' |
| 125 | . ds ae ae |
| 126 | . ds Ae AE |
| 127 | .\} |
| 128 | .rm #[ #] #H #V #F C |
| 129 | .\" ======================================================================== |
| 130 | .\" |
| 131 | .IX Title "DiagList 3" |
| 132 | .TH DiagList 3 "2003-04-25" "perl v5.8.0" "User Contributed Perl Documentation" |
| 133 | .SH "NAME" |
| 134 | DiagList \- perl module for parsing diag lists |
| 135 | .SH "SYNOPSIS" |
| 136 | .IX Header "SYNOPSIS" |
| 137 | .Vb 1 |
| 138 | \& use DiagList; |
| 139 | .Ve |
| 140 | .PP |
| 141 | .Vb 2 |
| 142 | \& my $dlist = DiagList->new('./master_diaglist'); |
| 143 | \& my $group = $dlist->find_group('cmp_regr'); |
| 144 | .Ve |
| 145 | .PP |
| 146 | .Vb 1 |
| 147 | \& foreach my $buildtag ($group->build_tags) { |
| 148 | .Ve |
| 149 | .PP |
| 150 | .Vb 1 |
| 151 | \& my $buildargs = $dlist->build_args($buildtag); |
| 152 | .Ve |
| 153 | .PP |
| 154 | .Vb 4 |
| 155 | \& foreach my $diagname ($group->list_diags($buildtag)) { |
| 156 | \& my $diag = $group->find_diag($buildtag, $diagname); |
| 157 | \& my $runargs = $diag->get_cmdline(); |
| 158 | \& } |
| 159 | .Ve |
| 160 | .PP |
| 161 | .Vb 1 |
| 162 | \& } |
| 163 | .Ve |
| 164 | .SH "ABSTRACT" |
| 165 | .IX Header "ABSTRACT" |
| 166 | .Vb 2 |
| 167 | \& This is a perl module for parsing diag lists. It uses |
| 168 | \& XML-like syntax to define regression arguments. |
| 169 | .Ve |
| 170 | .SH "DESCRIPTION" |
| 171 | .IX Header "DESCRIPTION" |
| 172 | This module exists to parse diaglists and return results in a usable |
| 173 | format. The Synopsis section above describes common usage. This is |
| 174 | an object module with no exported functions. The top-level object is |
| 175 | of type DiagList. Sub-objects are returned of type DiagList::Group |
| 176 | and DiagList::Diag. The public interface of each is described below. |
| 177 | .Sh "DiagList Object" |
| 178 | .IX Subsection "DiagList Object" |
| 179 | This is the only type of object the user will create explicitly. |
| 180 | .IP "new($file, [$fh]) <class method>" 4 |
| 181 | .IX Item "new($file, [$fh]) <class method>" |
| 182 | Parse the given diaglist file and return a new DiagList object. |
| 183 | Throws an exception if it cannot parse the file. If an optional |
| 184 | second argument is provided, it is treated as a file handle to read |
| 185 | from. It can be either an IO::File object or a bare file handle. In |
| 186 | this case the first argument, \f(CW$file\fR, is used purely for reporting |
| 187 | errors. |
| 188 | .IP "\fIbuild_list()\fR" 4 |
| 189 | .IX Item "build_list()" |
| 190 | Returns a list of the build tags that were seen in the file. |
| 191 | .IP "build_args($build_tag)" 4 |
| 192 | .IX Item "build_args($build_tag)" |
| 193 | Returns the build arguments for the specified build tag. Returns |
| 194 | undef if a build tag called \f(CW$build_tag\fR was not seen in the file. The |
| 195 | build arguments are the ones specified in the group tag defintion. |
| 196 | The only processing done is that name=<...> is stripped out |
| 197 | completely and sys=<...> is replaced by \-sys=<...>. |
| 198 | .IP "\fIbuild_hash()\fR" 4 |
| 199 | .IX Item "build_hash()" |
| 200 | Returns a reference to a hash where the keys are build tags and the |
| 201 | values are the build args. Note that this is a reference into the |
| 202 | internal state of the object, so modifying this hash will modify the |
| 203 | DiagList object. |
| 204 | .IP "\fIgroup_list()\fR" 4 |
| 205 | .IX Item "group_list()" |
| 206 | Returns a list of group names that were seen in the file. |
| 207 | .IP "find_group($groupname)" 4 |
| 208 | .IX Item "find_group($groupname)" |
| 209 | Returns a DiagList::Group object for the specified \f(CW$groupname\fR. |
| 210 | Returns undef if no such \f(CW$groupname\fR was seen in the file. |
| 211 | .IP "\fIgroup_hash()\fR" 4 |
| 212 | .IX Item "group_hash()" |
| 213 | Returns a reference to a hash where keys are group names and values |
| 214 | are DiagList::Group objects. Note that this is a reference into the |
| 215 | internal state of the object, so modifying the hash will modify the |
| 216 | DiagList object. |
| 217 | .Sh "DiagList::Group Object" |
| 218 | .IX Subsection "DiagList::Group Object" |
| 219 | These objects are created by the DiagList object and can be returned |
| 220 | to the user via the DiagList methods find_group and group_hash (both |
| 221 | described above). The DiagList::Group objects support the following |
| 222 | methods. |
| 223 | .IP "name([$name])" 4 |
| 224 | .IX Item "name([$name])" |
| 225 | Accessor function for the group name. If an argument \f(CW$name\fR is |
| 226 | provided, the name of the group is set to \f(CW$name\fR. The name of the |
| 227 | group is returned, whether or not it has changed. Changing the name |
| 228 | with this method is highly discouraged for user code, but it is |
| 229 | perfectly acceptable to call \fIname()\fR with no arugments to get the name. |
| 230 | .IP "\fIbuild_tags()\fR" 4 |
| 231 | .IX Item "build_tags()" |
| 232 | Returns a list of build_tags that are applicable to this group. |
| 233 | .IP "list_diags($buildtag)" 4 |
| 234 | .IX Item "list_diags($buildtag)" |
| 235 | Returns a list of diag names in this group that correspond to the |
| 236 | given \f(CW$buildtag\fR. |
| 237 | .ie n .IP "find_diag($buildtag, $diagname)" 4 |
| 238 | .el .IP "find_diag($buildtag, \f(CW$diagname\fR)" 4 |
| 239 | .IX Item "find_diag($buildtag, $diagname)" |
| 240 | Returns a DiagList::Diag object that corresponds the the given |
| 241 | \&\f(CW$diagname\fR and the provided \f(CW$buildtag\fR. Returns undef if no such |
| 242 | \&\f(CW$buildtag\fR or no such \f(CW$diagname\fR was found. |
| 243 | .IP "diag_hash($buildtag)" 4 |
| 244 | .IX Item "diag_hash($buildtag)" |
| 245 | Returns a reference to a hash where the keys are diag names and the |
| 246 | values are DiagList::Diag objects. Note tha this is a reference into |
| 247 | the internal state of the object, so modifying the hash will modify |
| 248 | the object. |
| 249 | .Sh "DiagList::Diag Object" |
| 250 | .IX Subsection "DiagList::Diag Object" |
| 251 | DiagList::Diag objects represent the state associated with a diag. |
| 252 | They are returned by the DiagList::Group methods \fIfind_diag()\fR and |
| 253 | \&\fIdiag_hash()\fR. DiagList::Diag objects support the following methods. |
| 254 | .IP "\fIget_alias()\fR" 4 |
| 255 | .IX Item "get_alias()" |
| 256 | Returns the diag alias, as provided in the diaglist file. |
| 257 | .IP "\fIget_nametag()\fR" 4 |
| 258 | .IX Item "get_nametag()" |
| 259 | Returns the diag nametag, as provided in the diaglist file. |
| 260 | .IP "\fIget_name()\fR" 4 |
| 261 | .IX Item "get_name()" |
| 262 | Returns the diag name which is the diag alias with :<nametag> |
| 263 | appended. |
| 264 | .IP "\fIget_full_name()\fR" 4 |
| 265 | .IX Item "get_full_name()" |
| 266 | Returns the full diag name with alias, nametag, and group, separated |
| 267 | by ':'. |
| 268 | .IP "\fIget_file()\fR" 4 |
| 269 | .IX Item "get_file()" |
| 270 | Returns the first file mentioned in the diag line. |
| 271 | .IP "\fIget_owner()\fR" 4 |
| 272 | .IX Item "get_owner()" |
| 273 | Get debug owner form diag list. |
| 274 | .IP "\fIget_cmdline()\fR" 4 |
| 275 | .IX Item "get_cmdline()" |
| 276 | Returns the command-line for the diag. This includes arguments |
| 277 | specified in the DiagList::Group object that contains this object, |
| 278 | followed by arguments specified on the diag command line. If the |
| 279 | containing group happens to be a buildtag (i.e., has a |
| 280 | sys=<something>), the sys=<something> is stripped out |
| 281 | of the diag command\-line. |
| 282 | .IP "\fIget_cmd_argv()\fR" 4 |
| 283 | .IX Item "get_cmd_argv()" |
| 284 | This is the same as get_cmdline, except that it processes the |
| 285 | command-line with a shell and returns a list that can be treated as an |
| 286 | argv list. Using this instead of get_cmdline allows diaglist entries |
| 287 | to be written the same way they would be on the command\-line. |
| 288 | .Sh "Syntax of the Diaglist file" |
| 289 | .IX Subsection "Syntax of the Diaglist file" |
| 290 | The syntax of the Diaglist file is somewhat strange. It makes the |
| 291 | most sense to describe how it evolved than to try to explain the |
| 292 | entire syntax all at once. |
| 293 | .PP |
| 294 | \fIDiag Lines\fR |
| 295 | .IX Subsection "Diag Lines" |
| 296 | .PP |
| 297 | A diag line is a line in the diaglist that specifies a diag. Its syntax is: |
| 298 | .PP |
| 299 | .Vb 1 |
| 300 | \& <alias> <args> |
| 301 | .Ve |
| 302 | .PP |
| 303 | Where <alias> is a name for the diag, and <args> are |
| 304 | arguments to \fBsims\fR used to run the diag. For instance: |
| 305 | .PP |
| 306 | .Vb 1 |
| 307 | \& mydiag mydiag.s -max_cycle=300000 |
| 308 | .Ve |
| 309 | .PP |
| 310 | creates a diag alias \*(L"mydiag\*(R", which \fBsims\fR will invoke as \*(L"mydiag.s |
| 311 | \&\-max_cycle=300000\*(R". One argument is special, however. If an argument |
| 312 | is "debugowner=<username>", that argument is removed from the |
| 313 | command-line before it is passed to \fBsims\fR. The debugowner is |
| 314 | available to clients of the DiagList module via the \fIget_owner()\fR |
| 315 | function, but it is not part of the command line because there is |
| 316 | nothing \fBsims\fR to do with it at runtime. It is useful, however, for |
| 317 | informing the \fBdiagstatus\fR database of who owns which diags. |
| 318 | .PP |
| 319 | \fIGroups\fR |
| 320 | .IX Subsection "Groups" |
| 321 | .PP |
| 322 | The main organizational structure in the diaglist is a group. A group |
| 323 | defines a list of diags for a regression and arguments to use for all |
| 324 | diags in that regression. The syntax for a group is an XML-like tag. |
| 325 | The definition can contain arguments. |
| 326 | .PP |
| 327 | For example: |
| 328 | .PP |
| 329 | .Vb 1 |
| 330 | \& <foo -foo1 -foo2> |
| 331 | .Ve |
| 332 | .PP |
| 333 | .Vb 2 |
| 334 | \& abc abc.s -abc |
| 335 | \& def def.s -def |
| 336 | .Ve |
| 337 | .PP |
| 338 | .Vb 1 |
| 339 | \& </foo> |
| 340 | .Ve |
| 341 | .PP |
| 342 | This defines regression group named \*(L"foo\*(R". The arguments for the |
| 343 | group are prepended to each diag command line. \fBsims\fR uses |
| 344 | Getopt::Long to parse its arguments, so if conflicting options are |
| 345 | repeated on its command\-line, the later option takes precedence. This |
| 346 | means that diag-line options override group options if they are in |
| 347 | conflict. If group foo were run in \fBsims\fR, it would run a diag with |
| 348 | alias \*(L"abc\*(R" and arguments \*(L"\-foo1 \-foo2 abc.s \-abc\*(R" and an alias \*(L"def\*(R" |
| 349 | with arguments \*(L"\-foo1 \-foo2 def.s \-def\*(R". |
| 350 | .PP |
| 351 | Groups can be opened multiple times, and they may have different |
| 352 | arguments each time. Arguments are only used in the diags contained |
| 353 | in that particular tag. For example: |
| 354 | .PP |
| 355 | .Vb 1 |
| 356 | \& <foo -foo1 -foo2> |
| 357 | .Ve |
| 358 | .PP |
| 359 | .Vb 2 |
| 360 | \& abc abc.s -abc |
| 361 | \& def def.s -def |
| 362 | .Ve |
| 363 | .PP |
| 364 | .Vb 1 |
| 365 | \& </foo> |
| 366 | .Ve |
| 367 | .PP |
| 368 | .Vb 1 |
| 369 | \& <foo -foo3> |
| 370 | .Ve |
| 371 | .PP |
| 372 | .Vb 1 |
| 373 | \& ghi ghi.s -ghi |
| 374 | .Ve |
| 375 | .PP |
| 376 | .Vb 1 |
| 377 | \& </foo> |
| 378 | .Ve |
| 379 | .PP |
| 380 | This would run \*(L"abc\*(R" and \*(L"def\*(R" exactly the same as before. The diag |
| 381 | \&\*(L"ghi\*(R" would be run with \*(L"\-foo3 ghi.s \-ghi\*(R" and would not include |
| 382 | \&\*(L"\-foo1 or \-foo2\*(R". |
| 383 | .PP |
| 384 | Group definitions may nest, but this does \fBnot\fR imply any |
| 385 | relationship between the groups. |
| 386 | .PP |
| 387 | .Vb 2 |
| 388 | \& <foo -foo1> |
| 389 | \& <bar -bar1> |
| 390 | .Ve |
| 391 | .PP |
| 392 | .Vb 1 |
| 393 | \& abc abc.s -abc |
| 394 | .Ve |
| 395 | .PP |
| 396 | .Vb 2 |
| 397 | \& </bar> |
| 398 | \& </foo> |
| 399 | .Ve |
| 400 | .PP |
| 401 | This defines two different regressions, \*(L"foo\*(R" and \*(L"bar\*(R". In |
| 402 | regression \*(L"foo\*(R", \*(L"abc\*(R" will have arguments \*(L"\-foo1 abc.s \-abc\*(R". In |
| 403 | regression \*(L"bar\*(R", it will have arguments \*(L"\-bar1 abc.s \-abc\*(R". There is |
| 404 | no notion of group \*(L"foo\*(R" containing group \*(L"bar\*(R" or anything like that. |
| 405 | They just happen to have some diag lines in common. |
| 406 | .PP |
| 407 | Note that this means that a diag alias by itself does not define a |
| 408 | unique test (diag plus arguments). The alias/group combination is |
| 409 | necessary, but not sufficient, to make a diag unique. More on that |
| 410 | later. |
| 411 | .PP |
| 412 | \fINesting tags\fR |
| 413 | .IX Subsection "Nesting tags" |
| 414 | .PP |
| 415 | One special tag, <runargs> specifies arguments to all enclosed |
| 416 | diags, regardless of their group. |
| 417 | .PP |
| 418 | .Vb 3 |
| 419 | \& <runargs -runrun> |
| 420 | \& <foo -foo1> |
| 421 | \& <bar -bar1> |
| 422 | .Ve |
| 423 | .PP |
| 424 | .Vb 1 |
| 425 | \& abc abc.s -abc |
| 426 | .Ve |
| 427 | .PP |
| 428 | .Vb 3 |
| 429 | \& </bar> |
| 430 | \& </foo> |
| 431 | \& </runargs> |
| 432 | .Ve |
| 433 | .PP |
| 434 | This means that in group \*(L"foo\*(R", the diag \*(L"abc\*(R" will run as \*(L"\-runrun |
| 435 | \&\-foo1 abc.s \-abc\*(R" and in group \*(L"bar\*(R", it will be \*(L"\-runrun \-bar1 abc.s |
| 436 | \&\-abc\*(R". |
| 437 | .PP |
| 438 | You can nest <runargs> tags. Inner tags will append to the |
| 439 | argument list so inner <runargs> will override outer tags if |
| 440 | any arguments are in conflict. Please note that a <runargs> |
| 441 | tag does \fBnot\fR define a regression, so there is no group called |
| 442 | \&\*(L"runargs\*(R". |
| 443 | .PP |
| 444 | Another special tag that applies to all enclosed diags, regardless of |
| 445 | their group, is <debugowner>. Just as described for the diag |
| 446 | line, <debugowner> does not affect the command line at all, |
| 447 | but it does provide information to the \fBdiagstatus\fR database about |
| 448 | who owns which diags. |
| 449 | .PP |
| 450 | .Vb 1 |
| 451 | \& <debugowner someuser> |
| 452 | .Ve |
| 453 | .PP |
| 454 | .Vb 1 |
| 455 | \& ... |
| 456 | .Ve |
| 457 | .PP |
| 458 | .Vb 1 |
| 459 | \& </debugowner> |
| 460 | .Ve |
| 461 | .PP |
| 462 | This is the same as having \*(L"debugowner=someuser\*(R" on every diag line in |
| 463 | its scope. Note that if a diag line contains a \*(L"debugowner=...\*(R" and |
| 464 | it is inside a <debugowner> tag, the diag line will take |
| 465 | precedence. |
| 466 | .PP |
| 467 | \fISpecial Groups\fR |
| 468 | .IX Subsection "Special Groups" |
| 469 | .PP |
| 470 | There are two types of special groups, buildtags and nametags. They |
| 471 | are syntacticaly just like any other groups, and they define |
| 472 | regressions just like any other groups. They have special meanings |
| 473 | and restrictions, however. |
| 474 | .PP |
| 475 | Build Tags |
| 476 | .IX Subsection "Build Tags" |
| 477 | .PP |
| 478 | A buildtag is any group that has "sys=<sysname>" in its |
| 479 | argument list. (Note that all \fBsims\fR options begin with '\-', so any |
| 480 | argument of the form "<name>=<value>" is an argument |
| 481 | to the diaglist parser). |
| 482 | .PP |
| 483 | A buildtag defines the model that should be built for the regression |
| 484 | and the \fBsims\fR options of how to build the model. |
| 485 | .PP |
| 486 | .Vb 1 |
| 487 | \& <build1 sys=cmp -arg1 -arg2> |
| 488 | .Ve |
| 489 | .PP |
| 490 | .Vb 1 |
| 491 | \& ... |
| 492 | .Ve |
| 493 | .PP |
| 494 | .Vb 1 |
| 495 | \& </build1> |
| 496 | .Ve |
| 497 | .PP |
| 498 | This creates a buildtag called \*(L"build1\*(R" that specifies that all diags |
| 499 | inside it should be run with the \fBsims\fR \*(L"cmp\*(R" model, which can be |
| 500 | built with \*(L"\-arg1 \-arg2\*(R". |
| 501 | .PP |
| 502 | Unlike other groups, buildtags do \fBnot\fR nest. Each diag line must |
| 503 | appear in \fBexactly one\fR build tag. All diaglines in all groups |
| 504 | inside the scope of the buildtag will be run on the specified model. |
| 505 | .PP |
| 506 | .Vb 7 |
| 507 | \& <build1 sys=cmp -arg1 -arg2> |
| 508 | \& <foo -foo1> |
| 509 | \& <bar -bar1> |
| 510 | \& mydiag mydiag.s -diag1 |
| 511 | \& </bar> |
| 512 | \& </foo> |
| 513 | \& </build1> |
| 514 | .Ve |
| 515 | .PP |
| 516 | When you run regression \*(L"foo\*(R", it will build a cmp model with args |
| 517 | \&\*(L"\-arg1 \-arg2\*(R". It will then run \*(L"mydiag\*(R" with arguments \*(L"\-foo1 |
| 518 | mydiag.s \-diag1\*(R". Similarly, if you ran regression \*(L"bar\*(R", it would |
| 519 | build the same cmp model and run \*(L"mydiag\*(R" with \*(L"\-bar1 mydiag.s |
| 520 | \&\-diag1\*(R". Note that \*(L"\-arg1\*(R" and \*(L"\-arg2\*(R" are used at build time for |
| 521 | groups \*(L"foo\*(R" and \*(L"bar\*(R", but they do not appear on the diag |
| 522 | command-line during the run. |
| 523 | .PP |
| 524 | A build tag also defines a regression, so you could run a regression |
| 525 | \&\*(L"build1\*(R" with the above diaglist. It would build with \*(L"\-arg1 \-arg2\*(R" |
| 526 | and would run \*(L"mydiag\*(R" with \*(L"\-arg1 \-arg2 mydiag.s \-diag1\*(R". There is |
| 527 | no way for the diaglist parser to tell build-time arguments from |
| 528 | run-time arguments when a buildtag is used as a regression group. |
| 529 | Fortunately, \fBsims\fR will ignore run-time options at build time and |
| 530 | vice\-versa, so using buildtags as groups is perfectly legal. |
| 531 | .PP |
| 532 | Name Tags |
| 533 | .IX Subsection "Name Tags" |
| 534 | .PP |
| 535 | An ambiguity is possible with multiple groups that contain diags with the same alias. For example: |
| 536 | .PP |
| 537 | .Vb 1 |
| 538 | \& <both> |
| 539 | .Ve |
| 540 | .PP |
| 541 | .Vb 5 |
| 542 | \& <foo> |
| 543 | \& <runargs -foo1> |
| 544 | \& mydiag mydiag.s |
| 545 | \& </runargs> |
| 546 | \& </foo> |
| 547 | .Ve |
| 548 | .PP |
| 549 | .Vb 5 |
| 550 | \& <bar> |
| 551 | \& <runargs -bar1> |
| 552 | \& mydiag mydiag.s |
| 553 | \& </runargs> |
| 554 | \& </bar> |
| 555 | .Ve |
| 556 | .PP |
| 557 | .Vb 1 |
| 558 | \& </both> |
| 559 | .Ve |
| 560 | .PP |
| 561 | Note that we use <runargs> tags instead of putting them in the |
| 562 | \&\*(L"foo\*(R" and \*(L"bar\*(R" regressions directly, since we want the \*(L"both\*(R" group |
| 563 | to run \*(L"mydiag\*(R" once with \*(L"\-foo1\*(R" and again with \*(L"\-bar1\*(R". The problem |
| 564 | with the above diaglist is that both runs of \*(L"mydiag\*(R" have the same |
| 565 | alias/group combination when run in group \*(L"both\*(R". Some other |
| 566 | identifier is needed to give each diag a unique name. |
| 567 | .PP |
| 568 | Nametags are used for this purpose. A nametag is a group that has |
| 569 | "name=<name>" in its argument list. The name is appended to |
| 570 | the alias do define a name that is unique within a group. The |
| 571 | alias/nametag/group combination is enough to make a diag unique |
| 572 | overall. As with buildtags, nametags do not nest, and each diag must |
| 573 | appear in \fBexactly one\fR nametag. We can rewrite the above diaglist |
| 574 | as: |
| 575 | .PP |
| 576 | .Vb 1 |
| 577 | \& <both> |
| 578 | .Ve |
| 579 | .PP |
| 580 | .Vb 5 |
| 581 | \& <foo_group name=foo> |
| 582 | \& <runargs -foo1> |
| 583 | \& mydiag mydiag.s |
| 584 | \& </runargs> |
| 585 | \& </foo> |
| 586 | .Ve |
| 587 | .PP |
| 588 | .Vb 5 |
| 589 | \& <bar_group name=bar> |
| 590 | \& <runargs -bar1> |
| 591 | \& mydiag mydiag.s |
| 592 | \& </runargs> |
| 593 | \& </bar> |
| 594 | .Ve |
| 595 | .PP |
| 596 | .Vb 1 |
| 597 | \& </both> |
| 598 | .Ve |
| 599 | .PP |
| 600 | Group \*(L"foo_group\*(R" contains the diag \*(L"mydiag:foo\*(R" with args \*(L"\-foo1 |
| 601 | mydiag.s\*(R". Group \*(L"bar_group\*(R" contains the diag \*(L"mydiag:bar\*(R" with args |
| 602 | \&\*(L"\-bar1 mydiag.s\*(R". Group \*(L"both\*(R" contains two diags: \*(L"mydiag:foo\*(R" with |
| 603 | \&\*(L"\-foo1 mydiag.s\*(R" and \*(L"mydiag:bar\*(R" with args \*(L"\-bar1 mydiag.s\*(R". |
| 604 | .PP |
| 605 | When \fBsims\fR creates a directory to run a directory, it uses |
| 606 | <alias>:<nametag>:<group> to get a unique |
| 607 | directory name. In contexts where only a single group is relevant, |
| 608 | then <alias>:<nametag> is sufficent to name a diag. |
| 609 | .SH "SEE ALSO" |
| 610 | .IX Header "SEE ALSO" |
| 611 | \&\fIsims\fR\|(1). |