tests.build-environment-info: add more information

The user information would have helped diagnose the empty GECOS issue
we had with the Hydra Darwin builders recently and the OS information
seems generally nice to have.
This commit is contained in:
Emily 2024-10-28 13:32:39 +00:00
parent f28cc72d5d
commit 9f36206578

View File

@ -1,11 +1,39 @@
{ runCommand }: {
lib,
stdenv,
runCommand,
getent,
xcbuild,
}:
# Prints information about the state of the build environment for # Prints information about the state of the build environment for
# assistance debugging Hydra. Feel free to add anything you would find # assistance debugging Hydra. Feel free to add anything you would find
# useful to this. # useful to this.
runCommand "build-environment-info" { } '' runCommand "build-environment-info"
ulimit -a {
nativeBuildInputs = [ getent ] ++ lib.optionals stdenv.buildPlatform.isDarwin [ xcbuild ];
}
''
# Its useful to get more info even if a command fails.
set +e
# Always fail so that this job can easily be restarted. run() {
exit 1 echoCmd : "$@"
'' "$@"
}
run uname -a
${lib.optionalString stdenv.buildPlatform.isDarwin ''
run env SYSTEM_VERSION_COMPAT=0 plutil -p /System/Library/CoreServices/SystemVersion.plist
''}
run id
run getent passwd "$(id -un)"
run ulimit -a
# Always fail so that this job can easily be restarted.
run exit 1
''