Skip to content

Commit

Permalink
containers: Run unit tests with Unicode locale
Browse files Browse the repository at this point in the history
This avoids nasty UnicodeEncodeErrors and friends from our tools; while
they could be worked around with lots of manual encodings and using
binary data everywhere, this makes things unwieldy and error prone, and
would have the same net effect.
  • Loading branch information
martinpitt committed Jul 4, 2018
1 parent c72e5ab commit e613936
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions containers/unit-tests/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
set -o pipefail
set -eux

export LANG=C.UTF-8

# HACK: Something invoked by our build system is setting stdio to non-blocking.
# Validate that this isn't the surrounding context. See more below.
python -c "import fcntl, os; assert fcntl.fcntl(0, fcntl.F_GETFL) & os.O_NONBLOCK == 0; assert fcntl.fcntl(1, fcntl.F_GETFL) & os.O_NONBLOCK == 0; assert fcntl.fcntl(2, fcntl.F_GETFL) & os.O_NONBLOCK == 0"
Expand Down

0 comments on commit e613936

Please sign in to comment.