forked from systemd/systemd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup! WIP: test: Run integration tests with mkosi-built image
- Loading branch information
1 parent
09088fc
commit 03b6031
Showing
15 changed files
with
77 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[Config] | ||
Dependencies=base | ||
|
||
[Output] | ||
Format=sysext | ||
Overlay=yes | ||
|
||
[Content] | ||
BaseTrees=%O/base |
1 change: 1 addition & 0 deletions
1
...-shutdown/mkosi.extra/usr/lib/extension-release.d/extension-release.testsuite-69-shutdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
EXTENSION_RELOAD_MANAGER=1 |
3 changes: 3 additions & 0 deletions
3
mkosi.images/testsuite-69-shutdown/mkosi.extra/usr/lib/systemd/system.conf.d/99-timeout.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[Manager] | ||
DefaultTimeoutStopSec=30s | ||
DefaultTimeoutAbortSec=30s |
Empty file.
Empty file.
Empty file.
2 changes: 2 additions & 0 deletions
2
...down/mkosi.extra/usr/lib/systemd/system/systemd-firstboot.service.d/no-root-password.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[Service] | ||
ExecStart=systemd-firstboot --prompt-locale --prompt-timezone --delete-root-password |
2 changes: 2 additions & 0 deletions
2
mkosi.images/testsuite-69-shutdown/mkosi.extra/usr/lib/tmpfiles.d/99-bashrc.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
C /root/.bashrc | ||
C /root/.profile |
2 changes: 2 additions & 0 deletions
2
mkosi.images/testsuite-69-shutdown/mkosi.extra/usr/share/factory/mkosi/etc/screenrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
startup_message off | ||
bell_msg "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
mkdir -p "$BUILDROOT/usr/share/factory/root" | ||
if [[ -e "$BUILDROOT/root/.bashrc" ]]; then | ||
cp -a "$BUILDROOT/root/.bashrc" "$BUILDROOT/usr/share/factory/root/.bashrc" | ||
fi | ||
if [[ -e "$BUILDROOT/root/.profile" ]]; then | ||
cp -a "$BUILDROOT/root/.profile" "$BUILDROOT/usr/share/factory/root/.profile" | ||
fi | ||
echo "PS1='screen\$WINDOW # '" >>"$BUILDROOT/usr/share/factory/root/.bashrc" | ||
echo "PS1='\s-\v\\\$ '" >>"$BUILDROOT/usr/share/factory/root/.profile" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/python3 | ||
|
||
from logging import getLogger as logging_get_logger | ||
from pathlib import Path | ||
from shlex import quote | ||
from shutil import which | ||
from subprocess import run | ||
|
||
|
||
log = logging_get_logger(__name__) | ||
|
||
|
||
def wrap_run(args, **kwargs): | ||
args[0] = which(args[0]) | ||
clargs = [Path(__file__).parents[1] / 'test-shutdown.py', '-v', '--'] | ||
clargs += args | ||
log.debug(f"Running {' '.join(quote(str(a)) for a in clargs)}") | ||
run(clargs, **kwargs) | ||
|
||
|
||
def check_result(mountpoint, console_log): | ||
# This test determines success by whether the wrapper command failed | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
test_params += { | ||
'mkosi_args' : [ | ||
'--kernel-command-line-extra', | ||
' '.join([ | ||
'apparmor=0', | ||
'selinux=0', | ||
'enforcing=0', | ||
f'SYSTEMD_UNIT_PATH=/usr/lib/systemd/tests/testdata/testsuite-@[email protected]:/usr/lib/systemd/tests/testdata/units:', | ||
'systemd.unit=testsuite.target', | ||
f'systemd.wants=@test_unit_name@', | ||
'systemd.mount-extra=/usr/share/testsuite-69-shutdown.raw:/run/extensions/testsuite-69-shutdown.raw::bind', | ||
]), | ||
], | ||
'hook_module' : meson.current_source_dir() / 'hook.py', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters