Documentation
¶
Overview ¶
Package hookstest provides a portable hook program for tests: the test binary re-executes itself, so tests need no shell or jq.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Hook ¶
Hook returns a hook entry running mode with args:
stdout TEXT print TEXT, exit 0
exit2 TEXT print TEXT to stderr, exit 2
exit N exit with status N
sleep [PIDFILE] write the pid to PIDFILE if given, then sleep
stdin FILE copy stdin to FILE, exit 0
env FILE write the environment to FILE, exit 0
log FILE TAG append TAG and a newline to FILE, exit 0
gate DIR N TEXT save stdin as DIR/<run>.json; print TEXT to stderr
and exit 2 for the first N runs, then exit 0
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.