Nix
2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Toggle main menu visibility
Loading...
Searching...
No Matches
test-data.hh
Go to the documentation of this file.
1
#pragma once
3
4
#include <filesystem>
5
#include "
nix/util/environment-variables.hh
"
6
#include "
nix/util/error.hh
"
7
8
namespace
nix {
9
14
static
inline
std::filesystem::path getUnitTestData()
15
{
16
auto
data = getEnv(
"_NIX_TEST_UNIT_DATA"
);
17
if
(!data)
18
throw
Error
(
19
"_NIX_TEST_UNIT_DATA environment variable is not set. "
20
"Recommendation: use meson, example: 'meson test -C build --gdb'"
);
21
return
std::filesystem::path(*data);
22
}
23
24
}
// namespace nix
nix::Error
Definition
error.hh:310
environment-variables.hh
error.hh
This file defines two main structs/classes used in nix error handling.
libutil-test-support
include
nix
util
tests
test-data.hh
Generated by
1.18.0