From f9d5079c694fb6cd1029c895c2fa8e226b1ee22e Mon Sep 17 00:00:00 2001 From: Rebecca Turner Date: Tue, 26 Mar 2024 15:40:09 -0700 Subject: Set `MAKEFLAGS=-j` and `GTEST_BRIEF` in `.envrc` - Enable parallel builds by default (and allow using environment variables to override `make` variables) - Hopefully we can get rid of this once we have Meson - Set `GTEST_BRIEF=1` - This only shows failed tests, instead of listing every test on its own line. ``` $ GTEST_BRIEF=1 make check [==========] 328 tests from 15 test suites ran. (37 ms total) [ PASSED ] 328 tests. ``` Change-Id: Id8103a8f24a9681be2be87e1b4df6fd5fdd7e4fd --- .envrc | 6 ++++++ .gitignore | 2 ++ 2 files changed, 8 insertions(+) diff --git a/.envrc b/.envrc index 38764da7a..e6505ace6 100644 --- a/.envrc +++ b/.envrc @@ -1,3 +1,9 @@ # shellcheck shell=bash source_env_if_exists .envrc.local +# TODO: `use flake .#native-clangStdenvPackages` on macOS? use flake ".#${LIX_SHELL_VARIANT:-default}" "${LIX_SHELL_EXTRA_ARGS[@]}" +export MAKEFLAGS="$MAKEFLAGS -e" +if [[ -n "$NIX_BUILD_CORES" ]]; then + export MAKEFLAGS="$MAKEFLAGS -j $NIX_BUILD_CORES" +fi +export GTEST_BRIEF=1 diff --git a/.gitignore b/.gitignore index 4527ab45f..d08d04ccf 100644 --- a/.gitignore +++ b/.gitignore @@ -157,3 +157,5 @@ result-* # ClangBuildAnalyzer output, see maintainers/buildtime_report.sh buildtime.bin + +.envrc.local -- cgit v1.2.3