Package: pnu-b2bt
Installationpip installpnu-b2btB2BT(1)NAMEb2bt - back-to-back testingSYNOPSISb2bt[-f|--force]
[-k|--keep]
[-n|--newpath PATH]
[-o|--origpath PATH]
[-q|--quiet]
[-s|--skip]
[-t|--timeout VALUE]
[-y|--autoconfirm]
[-N|--nocolors]
[--debug]
[--help|-?]
[--version]
[--]
filename [...]DESCRIPTIONTheb2btutility aims to automate:back-to-back testing (testing a command-line utility against another implementation)non regression testing (testing a command-line utility against a previous version)It processes one or moreXMLfiles describing the test suite
for a command-line utility, with its different test cases, executing the 2 commands versions and
reporting potential differences (on return codes, standard output, standard error output, plus
custom post processing output in order to check other kind of impacts, on file systems, execution
time, etc.) for each test case.In a test suite it is possible to specify:optional shell commands to execute before the test, typically to setup the test environment
in an automatically generated test sub directoryoptional standard input to be injected in the command testedmandatory one line shell command-line for the command to be testedoptional shell commands to execute after the test, typically to analyze the tested command
impact on the test environment. The output of these "post" commands is captured before
automatic removal of the test sub directoryEach test case can have a name and a potential timeout (in seconds or fraction of seconds).By defaut, this utility:executes the original command, unless you use the-soption to skip it (useful when you are testing the new command on another system);executes the original command from the PATH, unless you use the-ooption to specify another location;uses a 120.0 s timeout for commands execution, unless you use the-toption to modify it;discards the test results after each comparison, unless you use the-koption to keep them;details the differences between the 2 commands runs, unless you use the-qoption to limit it;does not execute again tests when you have kept previous results, unless you use the-foption to overwrite them;asks for confirmation before each test case execution, unless you use the-yoption to auto confirm them;uses ANSI colours in the output, unless you use the-Noption to disable it;does not execute the new command if it has the sameMD5digest than the original one.The new command location has to be specified with the -n option if you want a comparison to occur.OPTIONSOptionsUse-f|--forceOverwrite results directories-k|--keepKeep results directories after running-n|--newpath PATHPath of the new command-o|--origpath PATHPath of the original command if not in $PATH-q|--quietDon't detail run differences-s|--skipSkip original command processing-t|--timeout VALUESet default timeout (120.0 s) to a new value, with a 30.0 s minimum-y|--autoconfirmDon't ask for confirmation before test case execution-N|--nocolorsDon't use colors in output--debugEnable debug mode--help|-?Print usage and a short help message and exit--versionPrint version and exit--Options processing terminatorENVIRONMENTThe B2BT_OPTIONS environment variable can be set with a combination of the following command-line options letters:fin order to overwrite results directories if they existkin order to keep results directories after runningqin order to disable details in run differencessin order to skip original command processingyin order to answer yes to all confirmation requestsNin order to disable colors in outputThe B2BT_DEBUG environment variable can also be set to any value to enable debug mode.These 2 environment variables are superseded by command line options.FILESThe format of the XML files processed is described in theb2bt(5)manual page.EXIT STATUSThe b2bt utility exits 0 on success, and >0 if an error occurs.SEE ALSOb2bt(5),what(1),ident(1)STANDARDSThe b2bt utility is not a standard UNIX/POSIX command.It tries to follow thePEP 8style guide forPythoncode.HISTORYThis utility was made for thePNU projectin order to test the rewritten commands against the installed ones.LICENSEThis utility is available under the3-clause BSD license.AUTHORSHubert TournierCAVEATSIf you are comparing commands execution across operating systems, for example between Unix-like and Windows systems,
the output might be different due to the path separators ("/" versus "\").Comparing timeout interrupted commands output is hazardous...SECURITY CONSIDERATIONSThis utility processes XML files describing commands to be shell executed on your system.
If you are not the author of a test suite or are using an untrusted source, this can be dangerous!To mitigate the risks, the utility will:Warn you if you are using a privileged account and advise you not to do so.Show you every command to be executed and ask for prior confirmation.Visual inspection of the XML files to process is recommended, and useful anyway if you are rewriting an existing command.The program is using MD5 file digests but not for security purposes.
It is also calling thewhat(1)andident(1)commands from their PATH location, if they are available, assuming system directories precede user directories in the PATH.