Skip to content

Commit fc7816c

Browse files
committed
Fix test_compiler_cache
We need exactly 1 binary for the fake ccache wrapper. So change the sed to skip the first line (wrapper) and print the 2nd, then stop. Avoids issues when there is e.g. /usr/bin/gcc and /usr/local/bin/gcc
1 parent 84fdef8 commit fc7816c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/framework/toolchain.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2326,8 +2326,8 @@ def test_compiler_cache(self):
23262326
"#!/bin/bash",
23272327
"echo 'This is a %s wrapper'" % cache_tool,
23282328
"NAME=${0##*/}",
2329-
"comm=$(which -a $NAME | sed 1d)",
2330-
"$comm $@",
2329+
"comm=$(which -a $NAME | sed -n 'n;p')",
2330+
'$comm "$@"',
23312331
"exit 0"
23322332
]
23332333
script = '\n'.join(txt)

0 commit comments

Comments
 (0)