ryantimwilson / rpms / systemd

Forked from rpms/systemd a month ago
Clone
8d419f
From 5de4b00e4150080e68064fa1de003039a0901468 Mon Sep 17 00:00:00 2001
8d419f
From: Jan Janssen <medhefgo@web.de>
8d419f
Date: Tue, 11 Jan 2022 11:27:27 +0100
8d419f
Subject: [PATCH] meson: Use echo to list files
8d419f
8d419f
No need to invoke ls when we are just interested in file names.
8d419f
Also, the cd to source root makes the output identical to
8d419f
"git ls-files" (relative instead of absolute paths).
8d419f
8d419f
(cherry picked from commit 3a469802f4d7b0a59fe1644cb53d34aee4e56bab)
8d419f
8d419f
Related: #2017035
8d419f
---
8d419f
 test/fuzz/meson.build | 2 +-
8d419f
 test/meson.build      | 2 +-
8d419f
 2 files changed, 2 insertions(+), 2 deletions(-)
8d419f
8d419f
diff --git a/test/fuzz/meson.build b/test/fuzz/meson.build
8d419f
index b4766de3eb..39730a615c 100644
8d419f
--- a/test/fuzz/meson.build
8d419f
+++ b/test/fuzz/meson.build
8d419f
@@ -19,7 +19,7 @@ if git.found() and fs.exists(project_source_root / '.git')
8d419f
                           'ls-files', ':/test/fuzz/*/*',
8d419f
                           check: true)
8d419f
 else
8d419f
-        out = run_command(sh, '-c', 'ls @0@/test/fuzz/*/*'.format(project_source_root), check: true)
8d419f
+        out = run_command(sh, '-c', 'cd "@0@"; echo test/fuzz/*/*'.format(project_source_root), check: true)
8d419f
 endif
8d419f
 
8d419f
 fuzz_regression_tests = []
8d419f
diff --git a/test/meson.build b/test/meson.build
8d419f
index baf94703ea..c5d8d6917b 100644
8d419f
--- a/test/meson.build
8d419f
+++ b/test/meson.build
8d419f
@@ -190,7 +190,7 @@ if want_tests != 'false' and dmi_arches.contains(host_machine.cpu_family())
8d419f
                         check: true)
8d419f
         else
8d419f
                 out = run_command(
8d419f
-                        sh, '-c', 'ls @0@/test/dmidecode-dumps/*.bin'.format(project_source_root),
8d419f
+                        sh, '-c', 'cd "@0@"; echo test/dmidecode-dumps/*.bin'.format(project_source_root),
8d419f
                         check: true)
8d419f
         endif
8d419f