aboutsummaryrefslogtreecommitdiff
path: root/tests/unit/libstore/characterization.hh
blob: 46bf4b2e5ddee8ca248d39f93291df4be89b8988 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#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";
}

constexpr std::string_view cannotReadGoldenMaster =
    "Cannot read golden master because another test is also updating it";

constexpr std::string_view updatingGoldenMaster =
    "Updating golden master";
}