Liking cljdoc? Tell your friends :D

hive-compose.boundary.report

Test report files: the JDK XML parser, hardened, and the reading of a runner's report directory. The folding into a Report is pure, in hive-compose.promote.report; here XML text becomes a plain element tree {:tag :attrs :content :text} and files become text.

The parser forbids DOCTYPE declarations outright, so neither external entities (XXE) nor entity expansion (billion laughs) can happen, and loads no external DTD or schema.

Test report files: the JDK XML parser, hardened, and the reading of a
runner's report directory. The folding into a Report is pure, in
`hive-compose.promote.report`; here XML text becomes a plain element tree
{:tag :attrs :content :text} and files become text.

The parser forbids DOCTYPE declarations outright, so neither external
entities (XXE) nor entity expansion (billion laughs) can happen, and loads
no external DTD or schema.
raw docstring

collect-reports!clj

(collect-reports! from to)

Result<{:from :to :moved n}>: every report file under from (a suite's declared reports dir) moved into directory to (the cell's own), named by its path relative to from with / made __, so nested files never collide. Links are not followed. An absent from moves nothing.

Result<{:from :to :moved n}>: every report file under `from` (a suite's
declared reports dir) moved into directory `to` (the cell's own), named
by its path relative to `from` with `/` made `__`, so nested files never
collide. Links are not followed. An absent `from` moves nothing.
sourceraw docstring

formatsclj

What a suite may declare as its report format (:suite/report-format).

What a suite may declare as its report format (:suite/report-format).
sourceraw docstring

max-bytesclj

Largest report file read, 64 MiB.

Largest report file read, 64 MiB.
sourceraw docstring

mtime-slack-msclj

How much older than a run's start a report file may look and still be read: file systems keep modification times coarsely.

How much older than a run's start a report file may look and still be
read: file systems keep modification times coarsely.
sourceraw docstring

parseclj

(parse s)
(parse s format)

Result<Report> from report text. format is :junit, :tap or :auto (the default), which detects it from the content. Never throws.

Result<Report> from report text. `format` is :junit, :tap or :auto (the
default), which detects it from the content. Never throws.
sourceraw docstring

parse-junitclj

(parse-junit s)

Result<Report> from JUnit XML text.

Result<Report> from JUnit XML text.
sourceraw docstring

read-reportclj

(read-report path)
(read-report path format)

Result<Report> of the report file at path in format (default :auto), the file named in an error.

Result<Report> of the report file at `path` in `format` (default :auto),
the file named in an error.
sourceraw docstring

read-reportsclj

(read-reports dir)
(read-reports dir format)
(read-reports dir format since-ms)

Result<Report> merging every report file under directory dir (a suite's :suite/reports-dir), sorted by path, each read in format (default :auto). With since-ms, files last modified before it (less mtime-slack-ms) are left out: the leftovers of an earlier run in a directory hive-compose does not own. A file that cannot be read fails the whole, except that :auto skips XML whose root is not JUnit: each skip is {:file path :reason keyword}, the keyword its read answered, so a caller can say why the file was left out rather than only that it was. A directory holding no report is :report/none, its :skipped-files the same {:file :reason} rows, so a run that skipped every file still knows why.

Result<Report> merging every report file under directory `dir` (a suite's
:suite/reports-dir), sorted by path, each read in `format` (default
:auto). With `since-ms`, files last modified before it (less
`mtime-slack-ms`) are left out: the leftovers of an earlier run in a
directory hive-compose does not own. A file that cannot be read fails the
whole, except that :auto skips XML whose root is not JUnit: each skip is
{:file path :reason keyword}, the keyword its read answered, so a caller
can say why the file was left out rather than only that it was. A
directory holding no report is `:report/none`, its :skipped-files the same
{:file :reason} rows, so a run that skipped every file still knows why.
sourceraw docstring

report-file?clj

(report-file? f)

True for a file a runner leaves its report in: .xml or .tap.

True for a file a runner leaves its report in: .xml or .tap.
sourceraw docstring

report-filesclj

(report-files dir)

The report files (.xml, .tap) under directory dir, sorted by path, walked WITHOUT following links: a symlinked directory is not entered and a symlinked file is not a report, so nothing outside dir is ever read, moved or touched through it. An absent dir holds none; a nil or blank one throws (never read as the working directory).

The report files (.xml, .tap) under directory `dir`, sorted by path,
walked WITHOUT following links: a symlinked directory is not entered and
a symlinked file is not a report, so nothing outside `dir` is ever read,
moved or touched through it. An absent `dir` holds none; a nil or blank
one throws (never read as the working directory).
sourceraw docstring

safe-reports-dirclj

(safe-reports-dir root dir)

Result<path>: dir, a suite's declared host reports dir, canonical, when it lies strictly inside the suite's own directory root. Refused as :compose/unsafe-reports-dir, naming the :reason, when it is root itself (:is-root), an ancestor of it (:ancestor), outside it (:outside), or when a link in its existing part resolves to any of those (:link-escapes): the pipeline moves every report file out of that dir before each cell, so it must never be a project or a home.

Result<path>: `dir`, a suite's declared host reports dir, canonical, when
it lies strictly inside the suite's own directory `root`. Refused as
:compose/unsafe-reports-dir, naming the :reason, when it is `root` itself
(:is-root), an ancestor of it (:ancestor), outside it (:outside), or when
a link in its existing part resolves to any of those (:link-escapes):
the pipeline moves every report file out of that dir before each cell,
so it must never be a project or a home.
sourceraw docstring

stash-reports!clj

(stash-reports! dir stash)

Result<{:dir :to :stashed n}>: every report file (.xml, .tap) under dir MOVED into directory stash (never deleted), so a runner's attempt is never read together with a previous one's. Only report files go, links are not followed (see report-files), nothing else in dir is touched. An absent dir moves nothing. A file that cannot be moved (another uid's, a read-only mount) is :report/unclearable naming every leftover: the attempt must not run on top of it.

Result<{:dir :to :stashed n}>: every report file (.xml, .tap) under `dir`
MOVED into directory `stash` (never deleted), so a runner's attempt is
never read together with a previous one's. Only report files go, links are
not followed (see `report-files`), nothing else in `dir` is touched. An
absent `dir` moves nothing. A file that cannot be moved (another uid's, a
read-only mount) is :report/unclearable naming every leftover: the
attempt must not run on top of it.
sourceraw docstring

xml-treeclj

(xml-tree s)

Result<element tree> of XML text s; unparseable XML, or XML declaring a DOCTYPE, is :report/malformed.

Result<element tree> of XML text `s`; unparseable XML, or XML declaring a
DOCTYPE, is `:report/malformed`.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close