test: never run fipsinstall if the tests are not enabled.
authorPauli <pauli@openssl.org>
Wed, 28 Apr 2021 01:25:52 +0000 (11:25 +1000)
committerPauli <pauli@openssl.org>
Thu, 29 Apr 2021 07:40:24 +0000 (17:40 +1000)
Fixes #15056

The dependency for fipsinstall was being added to the makefile regardless of
it being used.  This means that a subsequent `make test` would fail if the
command line application wasn't present.  Rather than fix the instance in question,
it is better to leave out this part of the makefile if the tests cannot be
run.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15057)

providers/build.info

index 4296aa05a6b3f3554c6834d956d6abbe848a9226..b772e5ec250ef2a35c705eaf0c51c1c3dc7bc073 100644 (file)
@@ -147,11 +147,13 @@ IF[{- !$disabled{fips} -}]
   # module installation.  We have the output go to standard output, because
   # the generated commands in build templates are expected to catch that,
   # and thereby keep control over the exact output file location.
-  DEPEND[|tests|]=fipsmodule.cnf
-  GENERATE[fipsmodule.cnf]=../apps/openssl fipsinstall \
-        -module providers/$(FIPSMODULENAME) -provider_name fips \
-        -mac_name HMAC -section_name fips_sect
-  DEPEND[fipsmodule.cnf]=$FIPSGOAL
+  IF[{- !$disabled{tests} -}]
+    DEPEND[|tests|]=fipsmodule.cnf
+    GENERATE[fipsmodule.cnf]=../apps/openssl fipsinstall \
+          -module providers/$(FIPSMODULENAME) -provider_name fips \
+          -mac_name HMAC -section_name fips_sect
+    DEPEND[fipsmodule.cnf]=$FIPSGOAL
+  ENDIF
 ENDIF
 
 #