]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Use a known and set TERM variable to stabilize color_diagnostics tests
authorJoel Rosdahl <joel@rosdahl.net>
Sun, 5 Jul 2020 18:35:05 +0000 (20:35 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 5 Jul 2020 19:05:42 +0000 (21:05 +0200)
On some distributions TERM is unset when run via Docker which failed
color_diagnostics tests since ccache doesn’t enable color output if TERM
is unset. Fix this by using a known TERM value.

Fixes #616.

test/run
test/suites/color_diagnostics.bash

index e3bce01318cb0c9641ec55be0ad51717e07c02d4..672299d7eb9b52012790fff7e951fe96c76558d6 100755 (executable)
--- a/test/run
+++ b/test/run
@@ -307,6 +307,7 @@ TEST() {
 $(env | sed -n 's/^\(CCACHE_[A-Z0-9_]*\)=.*$/\1/p')
 EOF
     unset GCC_COLORS
+    unset TERM
 
     export CCACHE_CONFIGPATH=$ABS_TESTDIR/ccache.conf
     export CCACHE_DETECT_SHEBANG=1
index 60254a1865aa837c9c560cc8f0f275814bbbc005..b2b009962167ffd1ed4747adc30d84029d14ef97 100644 (file)
@@ -30,6 +30,7 @@ SUITE_color_diagnostics_SETUP() {
     fi
 
     unset GCC_COLORS
+    export TERM=vt100
 }
 
 color_diagnostics_expect_color() {