SUT Updaters: package fuzzinator.update
¶
function SubprocessUpdate
¶
-
fuzzinator.update.
SubprocessUpdate
(command, cwd=None, env=None, timeout=None)¶ Subprocess invocation-based SUT update.
Mandatory parameter of the SUT update:
command
: string to pass to the child shell as a command to run.
Optional parameters of the SUT update:
cwd
: if notNone
, change working directory before the command invocation.env
: if notNone
, a dictionary of variable names-values to update the environment with.timeout
: run subprocess with timeout.
Example configuration snippet:
[sut.foo] update=fuzzinator.update.SubprocessUpdate #update_condition=... is needed to trigger the update [sut.foo.update] command=git pull && make cwd=/home/alice/foo env={"BAR": "1"}
function TimestampUpdateCondition
¶
-
fuzzinator.update.
TimestampUpdateCondition
(path, age)¶ File timestamp-based SUT update condition.
Mandatory parameters of the SUT update condition:
path
: path to a file or directory to check for its last modification time.age
: maximum allowed age ofpath
given in [days:][hours:][minutes:]seconds format.
Result of the SUT update condition:
- Returns
True
ifpath
does not exist or is older thanage
.
Example configuration snippet:
[sut.foo] update_condition=fuzzinator.update.TimestampUpdateCondition #update=... will be triggered if file timestamp is too old [sut.foo.update_condition] path=/home/alice/foo/bin/foo age=7:00:00:00