]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
semaphore: run autopkgtest with sudo 24280/head
authorFrantisek Sumsal <frantisek@sumsal.cz>
Thu, 11 Aug 2022 11:36:15 +0000 (13:36 +0200)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Thu, 11 Aug 2022 11:36:15 +0000 (13:36 +0200)
Otherwise it can't access the newly create LXC container:

```
autopkgtest-virt-lxc: DBG: wait_booted: detecting init system failed, retrying...
autopkgtest-virt-lxc: DBG: stderr: lxc-attach: autopkgtest-lxc-trjmpu: tools/lxc_attach.c: main: 302 You lack access to /home/semaphore/.local/share/lxc
```

.semaphore/semaphore-runner.sh

index a509473b170ece2dba838be568f4a8f69809925e..98fd7b441121d9d27903fe39d3e9a48ff7c0954d 100755 (executable)
@@ -100,10 +100,10 @@ EOF
             # now build the package and run the tests
             rm -rf "$ARTIFACTS_DIR"
             # autopkgtest exits with 2 for "some tests skipped", accept that
-            "$AUTOPKGTEST_DIR/runner/autopkgtest" --env DEB_BUILD_OPTIONS=noudeb \
-                                                  --env TEST_UPSTREAM=1 ../systemd_*.dsc \
-                                                  -o "$ARTIFACTS_DIR" \
-                                                  -- lxc -s "$CONTAINER" \
+            sudo "$AUTOPKGTEST_DIR/runner/autopkgtest" --env DEB_BUILD_OPTIONS=noudeb \
+                                                       --env TEST_UPSTREAM=1 ../systemd_*.dsc \
+                                                       -o "$ARTIFACTS_DIR" \
+                                                       -- lxc -s "$CONTAINER" \
                 || [ $? -eq 2 ]
         ;;
         *)