tests.edn text and CLI options to volley's normalized config.
Reading follows Aero as Kaocha uses it: #profile, #env, #envf,
#prop, #long, #double, #keyword, #boolean, #include, #join,
#read-edn, #merge, #ref, #hostname, #user and #or are Aero's
readers; #kaocha/v1, #kaocha and #meta-merge are the ones Kaocha adds
(kaocha.config). Anything environmental (env vars, system properties,
included files) is passed in, never read here.
Normalizing follows kaocha.config/normalize, merge-config and
apply-cli-opts (see the docstrings of the private helpers for the Kaocha
function each one mirrors).
tests.edn text and CLI options to volley's normalized config. Reading follows Aero as Kaocha uses it: `#profile`, `#env`, `#envf`, `#prop`, `#long`, `#double`, `#keyword`, `#boolean`, `#include`, `#join`, `#read-edn`, `#merge`, `#ref`, `#hostname`, `#user` and `#or` are Aero's readers; `#kaocha/v1`, `#kaocha` and `#meta-merge` are the ones Kaocha adds (`kaocha.config`). Anything environmental (env vars, system properties, included files) is passed in, never read here. Normalizing follows `kaocha.config/normalize`, `merge-config` and `apply-cli-opts` (see the docstrings of the private helpers for the Kaocha function each one mirrors).
(engine-opts config run)The volley.engine/init options normalized config decides: worker
count, fail-fast, isolation, preloading, output capture, bindings, run
seed, hook options, the config itself (for --print-result) and the
JUnit report, which carries run's :timestamp and :cwd.
The `volley.engine/init` options normalized `config` decides: worker count, fail-fast, isolation, preloading, output capture, bindings, run seed, hook options, the config itself (for `--print-result`) and the JUnit report, which carries `run`'s `:timestamp` and `:cwd`.
The value of kaocha/default_config.edn in Kaocha 1.91.1392.
The value of `kaocha/default_config.edn` in Kaocha 1.91.1392.
(kaocha-shaped config)--print-config: normalized config in Kaocha's shape
(kaocha.config/normalize, as volley.hooks/kaocha-config builds it
for hooks) with Kaocha's top-level settings, and volley's own settings
under :volley/* keys.
`--print-config`: normalized `config` in Kaocha's shape (`kaocha.config/normalize`, as `volley.hooks/kaocha-config` builds it for hooks) with Kaocha's top-level settings, and volley's own settings under `:volley/*` keys.
(merge-config c1 c2)Mirrors kaocha.config/merge-config: meta-merge where tests, reporter,
test-paths, source-paths and ns-patterns replace rather than concatenate.
Mirrors `kaocha.config/merge-config`: `meta-merge` where tests, reporter, test-paths, source-paths and ns-patterns replace rather than concatenate.
(meta-merge)(meta-merge left)(meta-merge left right)(meta-merge left right & more)Recursively merge values based on :replace, :displace, :prepend and
:append metadata, exactly like meta-merge.core/meta-merge.
Recursively merge values based on `:replace`, `:displace`, `:prepend` and `:append` metadata, exactly like `meta-merge.core/meta-merge`.
(normalize raw cli-options)(normalize raw cli-options env)Normalize raw tests.edn data (from read-config, or nil when the file is
missing) and parsed CLI cli-options (the :options of
volley.cli/parse-args) into volley's config; see doc/design.md.
Applies Kaocha's #kaocha/v1 defaults and normalize, then the CLI
overrides of kaocha.config/apply-cli-opts; the CLI always wins. Accepts
both :test-paths and :kaocha/test-paths style keys. Unsupported plugins
and options become :warnings entries. env may carry :seed, the
random seed to use when neither --seed nor tests.edn gives one,
:cpus for the default worker count and :bb? (default true) for the
runtime of the parent, which is also the default worker runtime.
Total: input Kaocha would reject (where it exits with an error, such as a
string for :test-paths) yields the defaults and a message in :errors,
which the caller should report and exit on. A non-map config yields the
defaults and a warning.
Normalize raw `tests.edn` data (from `read-config`, or nil when the file is missing) and parsed CLI `cli-options` (the `:options` of `volley.cli/parse-args`) into volley's config; see doc/design.md. Applies Kaocha's `#kaocha/v1` defaults and `normalize`, then the CLI overrides of `kaocha.config/apply-cli-opts`; the CLI always wins. Accepts both `:test-paths` and `:kaocha/test-paths` style keys. Unsupported plugins and options become `:warnings` entries. `env` may carry `:seed`, the random seed to use when neither `--seed` nor tests.edn gives one, `:cpus` for the default worker count and `:bb?` (default true) for the runtime of the parent, which is also the default worker runtime. Total: input Kaocha would reject (where it exits with an error, such as a string for `:test-paths`) yields the defaults and a message in `:errors`, which the caller should report and exit on. A non-map config yields the defaults and a warning.
(read-config text)(read-config text opts)Parse tests.edn text. Returns {:config raw :warnings [...]} or
{:error "message"}; never throws.
opts (all optional):
:profile the #profile to pick. Default :ci when env CI is "true",
else :default (as kaocha.config/read-config-source).:env map of environment variables (string keys) for #env/#envf.:props map of system properties for #prop.:hostname and :user for #hostname and #user.:include (fn [path including-source]) returning the text of an
included file, or nil when it does not exist (Aero then
yields {:aero/missing-include path}).The result is the raw value, tags resolved. #kaocha/v1 is the identity
here; normalize applies Kaocha's defaults exactly once. Blank text gives a
nil config (Kaocha's "use the defaults").
Parse tests.edn `text`. Returns `{:config raw :warnings [...]}` or
`{:error "message"}`; never throws.
`opts` (all optional):
- `:profile` the `#profile` to pick. Default `:ci` when env CI is "true",
else `:default` (as `kaocha.config/read-config-source`).
- `:env` map of environment variables (string keys) for `#env`/`#envf`.
- `:props` map of system properties for `#prop`.
- `:hostname` and `:user` for `#hostname` and `#user`.
- `:include` `(fn [path including-source])` returning the text of an
included file, or nil when it does not exist (Aero then
yields `{:aero/missing-include path}`).
The result is the raw value, tags resolved. `#kaocha/v1` is the identity
here; `normalize` applies Kaocha's defaults exactly once. Blank text gives a
nil config (Kaocha's "use the defaults").cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |