From 9870bc3e2c42ec99fcc3f8056a0de633eec99b97 Mon Sep 17 00:00:00 2001 From: Richard Tucker Date: Fri, 16 May 1997 15:35:45 +0100 Subject: [PATCH] New unit becos Copied from Perforce Change: 18184 ServerID: perforce.ravenbrook.com --- mps/qa/test/script/commands/help | 47 ++++++++++++++++++++++++++++++++ mps/qa/test/script/help/naming | 20 ++++++++++++++ mps/qa/test/script/help/output | 36 ++++++++++++++++++++++++ 3 files changed, 103 insertions(+) create mode 100644 mps/qa/test/script/commands/help create mode 100644 mps/qa/test/script/help/naming create mode 100644 mps/qa/test/script/help/output diff --git a/mps/qa/test/script/commands/help b/mps/qa/test/script/commands/help new file mode 100644 index 00000000000..a4395a3e259 --- /dev/null +++ b/mps/qa/test/script/commands/help @@ -0,0 +1,47 @@ +#!/usr/local/perl +# +# provide help on QA functions +# + +&options(); + +if (@qa_args) { + foreach (@qa_args) { + &printhelp($_); + } +} else { + print "Help topics:\n"; + foreach (<$script_dir/help/*>) { + /\/([^\/]*)$/; + &summhelp($1); + } + print "For help on a topic, type 'qa help '.\n"; +} + +sub summhelp { + local ($infile, $sumline) = @_; + unless(open(IN, $script_dir."/help/".$infile)) { + die "File ".$infile." unexpectedly not found.\n"; + } + $sumline = ; + close(IN); + write STDOUT; +} + +sub printhelp { + local ($infile) = @_; + unless(open(IN, $script_dir."/help/".$infile)) { + print "No help available on $infile.\n"; + } else { + ; + while () { + print $_; + } + } +} + +format STDOUT = + @<<<<<<<<<<<@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< +$infile, $sumline +. + diff --git a/mps/qa/test/script/help/naming b/mps/qa/test/script/help/naming new file mode 100644 index 00000000000..a8fbc0dc082 --- /dev/null +++ b/mps/qa/test/script/help/naming @@ -0,0 +1,20 @@ +Numbering of test programs + +Test programs are identified by codes consisting of a single letter +and some numbers (no leading zeros). The letter gives the type +of test, and where to find it, as follows: + + f -- Functional test MMQA_test_function + a -- Argument violation MMQA_test_argerr + c -- Context violation MMQA_test_conerr + t -- aTtribute test MMQA_test_attribute + m -- Miscellaneous test MMQA_test_misc + +Every program is classified as one of these, and for each there is +a directory, as given above. In the directory, nn.c are the +test files, numbered in decimal from 0, and index is a text +file giving short summaries of what the tests test. + +When citing a test in a bug report, Darwin request or other +documentation, give its code as, e.g. 'f5'. + diff --git a/mps/qa/test/script/help/output b/mps/qa/test/script/help/output new file mode 100644 index 00000000000..77e4a1bcf2c --- /dev/null +++ b/mps/qa/test/script/help/output @@ -0,0 +1,36 @@ +Conventions for test output + +Lines beginning with % are comments and will be ignored +in all automatic processing. They'll only be useful +when running test programs manually. + +All other lines will be of the form: + += + +Where is a string of alphanumerics and blahs, and + is any printable chars up to the end of line. + +The output should begin with identifying lines something +like this: + +test_program= +platform= +product= +version= + +No line should be more than 80 chars long. + +Obviously this isn't the direct output from the test +program. Things like abortion, assertion failure &c &c +will tend to produce other junk in the test output; this +will be processed by a (platform-specific) program to produce +the eventual test output. The processing program will +pass straight through all lines beginning with %, and all +blank lines. It will strip a ! from the beginning of any +line which begins with one (use for !=), +and do platform-speciic stuff on all the remaining lines. +It will complain about (at least) the first line it +doesn't understand. + +