Skip to content

Commit

Permalink
Set a few environment variables according to specification
Browse files Browse the repository at this point in the history
  • Loading branch information
phst committed Dec 3, 2023
1 parent a7abed1 commit ec32708
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions elisp/ert/runner.el
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,15 @@ TESTBRIDGE_TEST_ONLY environmental variable as test selector."
(< shard-index shard-count))
(error "Invalid SHARD_COUNT (%s) or SHARD_INDEX (%s)"
shard-count shard-index))
;; Set a few environment variables as required or recommended in
;; https://bazel.build/reference/test-encyclopedia#initial-conditions.
(setenv "HOME" temp-dir)
(setenv "LC_CTYPE")
(setenv "LOGNAME" user-login-name)
;; Don’t use unsafe default from
;; https://bazel.build/reference/test-encyclopedia#initial-conditions.
(setenv "PATH" "/usr/bin:/usr/sbin:/bin:/sbin")
(setenv "SHLVL" "2")
(when coverage-enabled
(when verbose-coverage
(message "Reading coverage manifest %s" coverage-manifest))
Expand Down

0 comments on commit ec32708

Please sign in to comment.