Persistent storage for test runs and later analysis.
Persistent storage for test runs and later analysis.
(class-name->ns-str class-name)
Turns a class string into a namespace string (by translating _ to -)
Turns a class string into a namespace string (by translating _ to -)
(default-edn-reader tag value)
We use defrecords heavily and it's nice to be able to deserialize them.
We use defrecords heavily and it's nice to be able to deserialize them.
What keys in a test can't be serialized to disk, by default?
What keys in a test can't be serialized to disk, by default?
(delete!)
(delete! test-name)
(delete! test-name test-time)
Deletes all tests, or all tests under a given name, or, if given a date as well, a specific test.
Deletes all tests, or all tests under a given name, or, if given a date as well, a specific test.
(delete-file-recursively! f)
(edn-tag->constructor tag)
Takes an edn tag and returns a constructor fn taking that tag's value and building an object from it.
Takes an edn tag and returns a constructor fn taking that tag's value and building an object from it.
(fressian-file test)
Gives the path to a fressian file encoding all the results from a test.
Gives the path to a fressian file encoding all the results from a test.
(fressian-file! test)
Gives the path to a fressian file encoding all the results from a test, ensuring its containing directory exists.
Gives the path to a fressian file encoding all the results from a test, ensuring its containing directory exists.
(load test-name test-time)
Loads a specific test by name and time.
Loads a specific test by name and time.
(load-results test-name test-time)
Loads only a results.edn by name and time.
Loads only a results.edn by name and time.
(nonserializable-keys test)
What keys in a test can't be serialized to disk? The union of default nonserializable keys, plus any in :nonserializable-keys.
What keys in a test can't be serialized to disk? The union of default nonserializable keys, plus any in :nonserializable-keys.
(path test)
(path test & args)
With one arg, a test, returns the directory for that test's results. Given additional arguments, returns a file with that name in the test directory. Nested paths are flattened: (path t [:a [:b :c] :d) expands to .../a/b/c/d. Nil path components are ignored: (path t :a nil :b) expands to .../a/b.
Test must have only two keys: :name, and :start-time. :start-time may be a string, or a DateTime.
With one arg, a test, returns the directory for that test's results. Given additional arguments, returns a file with that name in the test directory. Nested paths are flattened: (path t [:a [:b :c] :d) expands to .../a/b/c/d. Nil path components are ignored: (path t :a nil :b) expands to .../a/b. Test must have only two keys: :name, and :start-time. :start-time may be a string, or a DateTime.
(path! & args)
Like path, but ensures the path's containing directories exist.
Like path, but ensures the path's containing directories exist.
(save-1! test)
Writes a history and fressian file to disk and updates latest symlinks. Returns test.
Writes a history and fressian file to disk and updates latest symlinks. Returns test.
(save-2! test)
Phase 2: after computing results, we re-write the fressian file, histories, and also dump results as edn. Returns test.
Phase 2: after computing results, we re-write the fressian file, histories, and also dump results as edn. Returns test.
(start-logging! test)
Starts logging to a file in the test's directory. Also updates current symlink. Test may include a :logging key, which should be a map with the following optional options:
{:overrides A map of packages to log level keywords}
Starts logging to a file in the test's directory. Also updates current symlink. Test may include a :logging key, which should be a map with the following optional options: {:overrides A map of packages to log level keywords}
(stop-logging!)
Resets logging to console only.
Resets logging to console only.
(test-names)
Returns a seq of all known test names.
Returns a seq of all known test names.
(tests)
(tests test-name)
If given a test name, returns a map of test runs to deref-able tests. With no test name, returns a map of test names to maps of runs to deref-able tests.
If given a test name, returns a map of test runs to deref-able tests. With no test name, returns a map of test names to maps of runs to deref-able tests.
(update-current-symlink! test)
Creates a current
symlink to the currently running test, if a store
directory exists.
Creates a `current` symlink to the currently running test, if a store directory exists.
(update-symlink! test dest)
Takes a test and a symlink path. Creates a symlink from that path to the test directory, if it exists.
Takes a test and a symlink path. Creates a symlink from that path to the test directory, if it exists.
(update-symlinks! test)
Creates latest
and current
symlinks to the given test, if a store
directory exists.
Creates `latest` and `current` symlinks to the given test, if a store directory exists.
(virtual-dir? f)
Is this a . or .. directory entry?
Is this a . or .. directory entry?
(with-out-file test filename & body)
Binds stdout to a file for the duration of body.
Binds stdout to a file for the duration of body.
(write-fressian! test)
Write the entire test as a .fressian file
Write the entire test as a .fressian file
(write-history! test)
Writes out history.txt and history.edn files.
Writes out history.txt and history.edn files.
(write-results! test)
Writes out a results.edn file.
Writes out a results.edn file.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close