mirror of
https://github.com/NixOS/nix.git
synced 2024-11-24 15:52:30 +00:00
More comment rewording as requested
Co-Authored-By: Robert Hensing <robert@roberthensing.nl>
This commit is contained in:
parent
f7db612e8b
commit
0db8ff820b
@ -13,11 +13,12 @@ fs::path getNixBin(std::optional<std::string_view> binaryNameOpt)
|
||||
{
|
||||
auto getBinaryName = [&] { return binaryNameOpt ? *binaryNameOpt : "nix"; };
|
||||
|
||||
// If the environment variable is set, use it unconditionally
|
||||
// If the environment variable is set, use it unconditionally.
|
||||
if (auto envOpt = getEnvNonEmpty("NIX_BIN_DIR"))
|
||||
return fs::path{*envOpt} / std::string{getBinaryName()};
|
||||
|
||||
// Use some-times avaiable OS tricks to get to the path of this Nix, and try that
|
||||
// Try OS tricks, if available, to get to the path of this Nix, and
|
||||
// see if we can find the right executable next to that.
|
||||
if (auto selfOpt = getSelfExe()) {
|
||||
fs::path path{*selfOpt};
|
||||
if (binaryNameOpt)
|
||||
|
@ -17,9 +17,9 @@ namespace nix {
|
||||
* Instead, we'll query the OS for the path to the current executable,
|
||||
* using `getSelfExe()`.
|
||||
*
|
||||
* As a last resort, we resort to `PATH`. Hopefully we find a `nix`
|
||||
* there that's compatible. If you're porting Nix to a new platform,
|
||||
* that might be good enough for a while, but you'll want to improve
|
||||
* As a last resort, we rely on `PATH`. Hopefully we find a `nix` there
|
||||
* that's compatible. If you're porting Nix to a new platform, that
|
||||
* might be good enough for a while, but you'll want to improve
|
||||
* `getSelfExe()` to work on your platform.
|
||||
*
|
||||
* @param binary_name the exact binary name we're looking up. Might be
|
||||
|
@ -253,8 +253,9 @@ foreach suite : suites
|
||||
'NIX_REMOTE': '',
|
||||
'PS4': '+(${BASH_SOURCE[0]-$0}:$LINENO) ',
|
||||
},
|
||||
# some tests take 15+ seconds even on an otherwise idle machine, on a loaded machine
|
||||
# this can easily drive them to failure. give them more time than default of 30sec
|
||||
# Some tests take 15+ seconds even on an otherwise idle machine;
|
||||
# on a loaded machine this can easily drive them to failure. Give
|
||||
# them more time than the default of 30 seconds.
|
||||
timeout : 300,
|
||||
# Used for target dependency/ordering tracking, not adding compiler flags or anything.
|
||||
depends : suite['deps'],
|
||||
|
Loading…
Reference in New Issue
Block a user