mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-07-04 16:03:03 +02:00
- linux_configuration/tests: update script paths after periodic_background/ reorganisation (hosts_file_monitor, makepkg_capped, music_parallelism, shutdown_timer_monitor, usage_monitoring_installer_efficiency) - test_i3blocks_efficiency.sh: remove checks for HEARTBEAT_INTERVAL_S and WARP_POLL_INTERVAL_S constants that no longer exist - test_pacman_wrapper_security.sh: remove tests 20-21 (builtin time helpers / external date calls) that are no longer applicable; update path - generate_hosts_file.sh: add sed unblock rules for delio.com.pl and loverslab.com to stay consistent with install.sh whitelist - steam_backlog_enforcer/scanning.py: remove unplayable_reason arg from logger.info call (too many format args); drop matching test assertion - steam_backlog_enforcer/tests/test_protondb.py: add test_unplayable_reason_no_trending_tier to restore 100% branch coverage on protondb.py line 97 (was previously covered indirectly)
32 lines
1.1 KiB
Bash
Executable File
32 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
# Regression checks for makepkg_capped wrapper.
|
|
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)
|
|
REPO_DIR=$(cd -- "$SCRIPT_DIR/.." && pwd)
|
|
WRAPPER="$REPO_DIR/scripts/digital_wellbeing/pacman/makepkg_capped.sh"
|
|
|
|
fail() {
|
|
printf 'FAIL: %s\n' "$1" >&2
|
|
exit 1
|
|
}
|
|
|
|
printf 'Checking makepkg_capped exists...\n'
|
|
[[ -f "$WRAPPER" ]] || fail 'makepkg_capped.sh is missing'
|
|
|
|
printf 'Checking makepkg_capped syntax...\n'
|
|
bash -n "$WRAPPER"
|
|
|
|
printf 'Checking systemd scope limits are present...\n'
|
|
grep -Fq 'CPUQuota=' "$WRAPPER" || fail 'CPUQuota setting missing'
|
|
grep -Fq 'MemoryMax=' "$WRAPPER" || fail 'MemoryMax setting missing'
|
|
grep -Fq 'MemorySwapMax=0' "$WRAPPER" || fail 'MemorySwapMax=0 setting missing'
|
|
grep -Fq 'TasksMax=' "$WRAPPER" || fail 'TasksMax setting missing'
|
|
|
|
printf 'Checking graceful fallback path exists...\n'
|
|
grep -Fq 'run_makepkg_fallback' "$WRAPPER" || fail 'fallback function missing'
|
|
grep -Fq 'systemd-run --user --scope --quiet true' "$WRAPPER" || fail 'user-scope probe missing'
|
|
|
|
printf 'makepkg_capped regression checks passed.\n'
|