Skip to content

Commit

Permalink
Fix test_compiler_cache
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Flamefire committed Sep 11, 2024
1 parent 84fdef8 commit fc7816c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/framework/toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -2326,8 +2326,8 @@ def test_compiler_cache(self):
"#!/bin/bash",
"echo 'This is a %s wrapper'" % cache_tool,
"NAME=${0##*/}",
"comm=$(which -a $NAME | sed 1d)",
"$comm $@",
"comm=$(which -a $NAME | sed -n 'n;p')",
'$comm "$@"',
"exit 0"
]
script = '\n'.join(txt)
Expand Down

0 comments on commit fc7816c

Please sign in to comment.