File: check-setup.sh

package info (click to toggle)
btrfs-progs 6.16-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 20,504 kB
  • sloc: ansic: 126,181; sh: 7,642; python: 1,386; makefile: 900; asm: 296
file content (23 lines) | stat: -rwxr-xr-x 535 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
#
# Check that the system setup and configuration are sufficient for all tests to run

for dir in *-tests; do
	missing=
	echo "Checking prerequisites for: $dir"
	for prog in $(find "$dir" -name 'test.sh' -exec grep check_global_prereq '{}' \; | sort -u); do
		if [ "$prog" = check_global_prereq ]; then
			continue
		fi
		if type -p "$prog" &> /dev/null; then
			echo "Check $prog: OK"
		else
			echo "Check $prog: MISSING"
			missing+=" $prog"
		fi
	done

	if ! [ -z "$missing" ]; then
		echo "MISSING: $missing"
	fi
done