Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLénaïc Huard <lenaic@lhuard.fr>2021-09-28 00:30:16 +0300
committerJunio C Hamano <gitster@pobox.com>2021-09-28 02:06:59 +0300
commit670e5973992b6126aa0841c3c6bc183f0cec749f (patch)
tree6a4a3156b7417063af786ea9eaa4d19b575a2616 /t/t7900-maintenance.sh
parentb681b191f923267aab80ae7f7ab2f85a692e8833 (diff)
maintenance: fix test t7900-maintenance.sh
Commit b681b191 introduced the support of systemd timers for git maintenance. A test is leveraging the `systemd-analyze verify` utility to verify the correctness of the systemd unit files generated by git. But on some systems, although the `systemd-analyze` tool is installed and supports the `verify` subcommand, it fails with some permission errors. So, instead of only checking if the `verify` subcommand exists, a more reliable way of detecting whether `systemd-analyze verify` can be used is to try to use it. The SYSTEMD_ANALYZE prerequisite is now trying to run `systemd-analyze verify` on a systemd unit file which is shipped by systemd itself. We can reasonably think that, on systemd hosts, this file is present and valid. Signed-off-by: Lénaïc Huard <lenaic@lhuard.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7900-maintenance.sh')
-rwxr-xr-xt/t7900-maintenance.sh3
1 files changed, 1 insertions, 2 deletions
diff --git a/t/t7900-maintenance.sh b/t/t7900-maintenance.sh
index b289cae6b9..1386756f0d 100755
--- a/t/t7900-maintenance.sh
+++ b/t/t7900-maintenance.sh
@@ -21,8 +21,7 @@ test_xmllint () {
}
test_lazy_prereq SYSTEMD_ANALYZE '
- systemd-analyze --help >out &&
- grep verify out
+ systemd-analyze verify /lib/systemd/system/basic.target
'
test_systemd_analyze_verify () {