# Running tests

From the repository root, run the source and Settings checks:

```sh
python3 scripts/check-project.py
./scripts/run-test.sh python3 scripts/tests/test_desktop_settings.py
./scripts/run-test.sh python3 scripts/tests/test_language_settings.py
xvfb-run -a ./scripts/run-test.sh python3 scripts/tests/test_settings_ui.py
```

The GTK interaction suite uses a temporary user profile and device fixtures.
The CI workflow lists the Debian test prerequisites. See
[build instructions](building.md) for the disposable Debian and VM test wrappers.

## Reproduce the footprint measurement

Boot a fresh offline installation in a VM with the configuration listed in
[footprint.json](footprint.json). Log in to the desktop and leave it idle.
Run the sampler from a separate virtual console and return to the desktop
while it collects the samples.

```sh
python3 measure-footprint.py > footprint.json
```

The sampler is in [scripts/measure-footprint.py](../scripts/measure-footprint.py).

## Test a published APT migration

Run the migration check in a disposable Debian container. Allow about 4 GiB
for the historical installation image and its extracted filesystem.

```sh
./scripts/run-in-debian.sh bash -c '
  export DEBIAN_FRONTEND=noninteractive
  apt-get update && apt-get install -y --no-install-recommends python3 ca-certificates xorriso squashfs-tools
  python3 /project/scripts/tests/check_apt_migration.py
'
```
