Package workstation tools, reuse emulator sessions, and derive build versions
This commit is contained in:
@@ -6,6 +6,7 @@ import subprocess
|
||||
import tempfile
|
||||
|
||||
project = Path(__file__).resolve().parents[2]
|
||||
version = subprocess.check_output([str(project/'tools/version')], text=True).strip()
|
||||
|
||||
def run(binary, *args, ok=True):
|
||||
result = subprocess.run([str(project/'tools/in-void'), 'qemu-aarch64',
|
||||
@@ -22,11 +23,11 @@ with tempfile.TemporaryDirectory(prefix='m3-', dir=project/'out') as directory:
|
||||
for helper in ['fds', 'fds-burn', 'fds-inspect', 'fds-eject', 'fds-power',
|
||||
'fds-stage0', 'fds-boottrace', 'fds-cartridged', 'fds-profile', 'fds-release']:
|
||||
assert f'Usage: {helper}' in run(helper, '--help')
|
||||
assert '0.1.0' in run(helper, '--version')
|
||||
assert version in run(helper, '--version')
|
||||
assert 'activate windowmaker' in run('fds-profile', '--help')
|
||||
run('fds-profile', 'activate', 'windowmaker', ok=False)
|
||||
assert '0.1.0' in run('fds', '--version')
|
||||
assert '0.1.0' in run('fds-stage0', '--version')
|
||||
assert version in run('fds', '--version')
|
||||
assert version in run('fds-stage0', '--version')
|
||||
run('fds-stage0', ok=False) # Must refuse root-switch operations outside PID 1.
|
||||
assert json.loads(run('fds', '--json', 'info'))['target'] == 'aarch64 static-musl'
|
||||
fixture = project/'tests/fixtures/manifests/windowmaker.toml'
|
||||
|
||||
Reference in New Issue
Block a user