File: 0024-Fix-forced-rescan-test-adding-runsv-path.patch

package info (click to toggle)
runit 2.1.2-54
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,524 kB
  • sloc: ansic: 6,098; sh: 1,741; makefile: 389
file content (29 lines) | stat: -rw-r--r-- 953 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Description: Fix test failure on sbuild
 The test fails in sbuild or in any other environment where runit is not installed
 because runsvdir can't find runsv in PATH. The fix adds the build directory at the
 beginning of PATH in order to make sure that runsvdir pick the right runsv when the
 test is done on machine where runit is installed.
Author: <Lorenzo Puliti plorenzo@disroot.org>
Forwarded: <not-needed>
Last-Update: 2020-04-11
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/runit-2.1.2/src/t/runtest.sh
+++ b/runit-2.1.2/src/t/runtest.sh
@@ -2,13 +2,15 @@
 set -eu
 
 : "${runsvdir:=runsvdir}"
+runsvpath=$(dirname $PWD)
 
 rm -rf timestamp/supervise/ service/
 rm -f ./timestamp.txt
 
 mkdir service
 
-"${runsvdir}" ./service &
+#runsvdir need to know where to find runsv
+PATH=$runsvpath:$PATH "${runsvdir}" ./service &
 echo "pid = $!"
 # Wait till runsvdir scans directory and concludes it is empty
 sleep 1