From: Martin Wilck <[email protected]>

This change has two effects: 1. no error message is printed if
the directio_test_dev file doesn't exist, and 2. DIO_TEST_DEV
can be set in the environment, or on the "make" command line.
It's still possible to set DIO_TEST_DEV via the directio_test_dev
file if preferred.

Signed-off-by: Martin Wilck <[email protected]>
---
 tests/Makefile | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/Makefile b/tests/Makefile
index 6e3e9ca2..5f6583a0 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -18,12 +18,14 @@ TESTS := uevent parser util dmevents hwtable blacklist 
unaligned vpd pgpolicy \
 .SILENT: $(TESTS:%=%.o)
 .PRECIOUS: $(TESTS:%=%-test)
 
-DIO_TEST_DEV = $(shell sed -n -e 
's/^[[:space:]]*DIO_TEST_DEV[[:space:]]*=[[:space:]]*\([^[:space:]\#]\+\).*/\1/p'
 < directio_test_dev)
-
 all:   $(TESTS:%=%.out)
 
 # test-specific compiler flags
 # XYZ-test_FLAGS: Additional compiler flags for this test
+
+ifneq ($(wildcard directio_test_dev),)
+DIO_TEST_DEV = $(shell sed -n -e 
's/^[[:space:]]*DIO_TEST_DEV[[:space:]]*=[[:space:]]*\([^[:space:]\#]\+\).*/\1/p'
 < directio_test_dev)
+endif
 ifneq ($(DIO_TEST_DEV),)
 directio-test_FLAGS := -DDIO_TEST_DEV=\"$(DIO_TEST_DEV)\"
 endif
-- 
2.25.0


--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel

Reply via email to