blob: e135ee583bd31de92d4ff413fbf7293e674298b3 [file] [log] [blame]
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05001#!/bin/sh
2
Brad Bishop15ae2502019-06-18 21:44:24 -04003
4# When udevd (from eudev) is running most eject/mount tests will fail because
5# of automount. We need to stop udevd before executing util-linux's tests.
6# The systemd-udevd daemon doesn't change the outcome of util-linux's tests.
7UDEV_PID="`pidof "@base_sbindir@/udevd"`"
8if [ "x$UDEV_PID" != "x" ]; then
9 /etc/init.d/udev stop
10fi
11
Brad Bishopc342db32019-05-15 21:57:59 -040012current_path=$(readlink -f $0)
13export bindir=$(dirname $current_path)
14export PATH=$bindir/bin:$PATH
15
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050016cd tests || exit 1
17
18comps=$(find ts/ -type f -perm -111 -regex ".*/[^\.~]*" | sort)
19
20
21echo
22echo "-------------------- util-linux regression tests --------------------"
23echo
24echo " For development purpose only. "
25echo " Don't execute on production system! "
26echo
27
28res=0
29count=0
30for ts in $comps;
31do
Brad Bishopd89cb5f2019-04-10 09:02:41 -040032 $ts | sed -u '{
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050033 s/^\(.*\):\(.*\) \.\.\. OK$/PASS: \1:\2/
34 s/^\(.*\):\(.*\) \.\.\. FAILED \(.*\)$/FAIL: \1:\2 \3/
35 s/^\(.*\):\(.*\) \.\.\. SKIPPED \(.*\)$/SKIP: \1:\2 \3/
36 }'
37done
38
Brad Bishop15ae2502019-06-18 21:44:24 -040039
40if [ "x$UDEV_PID" != "x" ]; then
41 /etc/init.d/udev start
42fi
43