blob: 097107cd095014310494a47c2040fb90434b04bf [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
Andrew Geisslerd5838332022-05-27 11:33:10 -050016# losetup tests will be skipped and/or fail otherwise
17modprobe loop
18
Andrew Geissler5f350902021-07-23 13:09:54 -040019./tests/run.sh --use-system-commands --parsable --show-diff | sed -u '{
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050020 s/^\(.*\):\(.*\) \.\.\. OK$/PASS: \1:\2/
21 s/^\(.*\):\(.*\) \.\.\. FAILED \(.*\)$/FAIL: \1:\2 \3/
22 s/^\(.*\):\(.*\) \.\.\. SKIPPED \(.*\)$/SKIP: \1:\2 \3/
Andrew Geissler5f350902021-07-23 13:09:54 -040023 }'
Brad Bishop15ae2502019-06-18 21:44:24 -040024
25if [ "x$UDEV_PID" != "x" ]; then
26 /etc/init.d/udev start
27fi