diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-01-08 20:27:48 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-01-09 01:22:26 +0100 |
commit | a412ec571467609aba433ae568dc856ed7924150 (patch) | |
tree | 11817b821e752b0c42c8913789ef73586dbe4cd8 /test/fuzz | |
parent | Merge pull request #18169 from OnkelUlla/can_bus_error_reporting (diff) | |
download | systemd-a412ec571467609aba433ae568dc856ed7924150.tar.xz systemd-a412ec571467609aba433ae568dc856ed7924150.zip |
meson: fix git ls-files invocations during rebase
Normally ls-files prints the full path to files from the repo root. But when
$GIT_WORK_TREE is set, ls-files prints paths relative to the current
directory. When rebasing, $GIT_WORK_TREE is set in the commands executed from
'rebase -x'. This causes problems if meson config is touched and the meson
reconfigures itself. ($GIT_WORK_TREE shouldn't be relevant, since the paths that
ls-files reports don't depend on the work tree, but whatever.) Let's unset
GIT_WORK_TREE to avoid the issue.
$ (cd test; git --git-dir=$PWD/../.git ls-files ':/test/dmidecode-dumps/*.bin')
test/dmidecode-dumps/HP-Z600.bin
test/dmidecode-dumps/Lenovo-ThinkPad-X280.bin
test/dmidecode-dumps/Lenovo-Thinkcentre-m720s.bin
$ (cd test; GIT_WORK_TREE=$PWD/.. git --git-dir=$PWD/../.git ls-files ':/test/dmidecode-dumps/*.bin')
dmidecode-dumps/HP-Z600.bin
dmidecode-dumps/Lenovo-ThinkPad-X280.bin
dmidecode-dumps/Lenovo-Thinkcentre-m720s.bin
Fixes #18148.
Diffstat (limited to 'test/fuzz')
-rw-r--r-- | test/fuzz/meson.build | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/fuzz/meson.build b/test/fuzz/meson.build index 7a83961d11..fc8033dbbe 100644 --- a/test/fuzz/meson.build +++ b/test/fuzz/meson.build @@ -23,9 +23,10 @@ sanitizers = [['address,undefined', sanitize_address_undefined]] if git.found() out = run_command( + 'env', '-u', 'GIT_WORK_TREE', git, '--git-dir=@0@/.git'.format(project_source_root), - 'ls-files', ':/test/fuzz/*/*') + 'ls-files', ':/test/fuzz/*/*') else out = run_command( 'sh', '-c', 'ls @0@/test/fuzz/*/*'.format(project_source_root)) |