dhrun starts a list of (Unix) processes, monitors the standard streams
for patterns that should be expected or avoided, kills the processes
when criteria are met and exits accordingly. It is configured using
either Dhall or YAML.
Its goals are similar to venom. Compared
to that tool,
dhrun has only one execution capability(exec) and its
assertions are poor(infix strings only). It supports concurrency and
monitors streams, however. It was written to create a configuration
layer to control single-node integration tests for a linux daemon. See
the last section of this file for a list of similar
dhrun run path/to/config.dhall dhrun run path/to/config.yaml
See file quickstart.yml for an overview of
capabilities. The resources directory contains the Dhall
types for the configuration layer, and the examples
directory contains more
The originally intended workflow is to configure dhrun using a dhall codebase. In bash, this might involve a here-document:
dhrun run <<< "let codebase = /path/package.dhall in codebase.foo bar baz"
You can find an example project-specific dhall configuration layer here.
dhrun Usage: dhrun COMMAND dhall-configured concurrent process execution with streaming assertion monitoring Available options: -h,--help Show this help text COMMAND Type of operation to run. Available commands: run Run a dhrun specification. print Print a dhrun specification.
dhrun run --help
Usage: dhrun run [INPUT] [-y|--yaml] [-v|--verbose] [-e|--edit] Run a dhrun specification. Available options: INPUT Input configuration with .yml/.yaml/.dh/.dhall extension. Leave void for stdin (dhall) input. -y,--yaml Assume stdin to be yaml instead of dhall. -v,--verbose Enable verbose mode. -e,--edit Edit yaml in $EDITOR before run. -h,--help Show this help text
install the 1.0.0 release:
nix-env -f https://github.com/freuk/dhrun/archive/1.0.0.tar.gz -iA dhrun
This pins nixpkgs 18.09. Building should take a minute or two and will
definitely succeed. You can also try installing the bleeding edge
nix-env -f https://github.com/freuk/dhrun.git -iA dhrun
I have not tried building this code using stack or any other tool, but
here are the hackage dependencies for
dhrun and its tests:
nix-shellprovides a dev environment with cabal-build, ghcid, hlint, brittany, and other tools.
./shakealso has other useful dev workflows.
direnv allowfor lorri integration.
/nixvendored nix expressions.
/resourcesDhall types and helper functions.
/appthe main cli tool.
/examplesexample Dhall and YAML configuration files for dhrun. These also serve as golden tests.
/srcdhrun types and logic.
/testsgolden, unit, quickcheck tests.