aboutsummaryrefslogtreecommitdiff
path: root/tests/unit/libstore/characterization.hh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/libstore/characterization.hh')
-rw-r--r--tests/unit/libstore/characterization.hh23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/unit/libstore/characterization.hh b/tests/unit/libstore/characterization.hh
new file mode 100644
index 000000000..5f366cb42
--- /dev/null
+++ b/tests/unit/libstore/characterization.hh
@@ -0,0 +1,23 @@
+#pragma once
+///@file
+
+namespace nix {
+
+/**
+ * The path to the `unit-test-data` directory. See the contributing
+ * guide in the manual for further details.
+ */
+static Path getUnitTestData() {
+ return getEnv("_NIX_TEST_UNIT_DATA").value();
+}
+
+/**
+ * Whether we should update "golden masters" instead of running tests
+ * against them. See the contributing guide in the manual for further
+ * details.
+ */
+static bool testAccept() {
+ return getEnv("_NIX_TEST_ACCEPT") == "1";
+}
+
+}