vinix-ports / tests / userland / btop.sh
23 lines · 22 sloc · 615 bytes · 45848b255cfeed2daa46cb995d838964f1d88870
Raw
1#!/bin/sh
2set -eu
3export PATH=/bin:/usr/bin:/sbin:/usr/sbin HOME=/root LC_ALL=C
4phase=identity
5finish() {
6 status=$?
7 if [ "$status" -ne 0 ]; then echo "btop fixture failed at $phase with status $status"; fi
8 /sbin/poweroff -f
9}
10trap finish EXIT
11
12test "$(uname -o)" = Vinix
13phase=version
14version=$(btop --version)
15printf '%s\n' "$version"
16printf '%s\n' "$version" | grep -Fxq 'btop version: 1.4.0'
17phase=help
18btop --help >/tmp/btop-help
19grep -Fq -- '--version' /tmp/btop-help
20phase=package-data
21test -s /usr/share/btop/themes/dracula.theme
22test -s /usr/share/man/man1/btop.1
23echo 'VPAC FIXTURE GUEST PASS'
24