diff options
author | slontis <shane.lontis@oracle.com> | 2023-03-20 06:08:38 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2023-10-25 10:21:07 +0200 |
commit | 66f4782f1452d6fbfab78822b340a99aaeacc2f0 (patch) | |
tree | 063d3ad8628b8b10260b4316531f78de9d83b0c1 /demos/encrypt | |
parent | Add a test for retries when sending app data (diff) | |
download | openssl-66f4782f1452d6fbfab78822b340a99aaeacc2f0.tar.xz openssl-66f4782f1452d6fbfab78822b340a99aaeacc2f0.zip |
Create hierarchical demo Makefile.
Adds a Makefile with all, clean, and test targets.
This has only been added for demos that already contain Makefiles.
For problematic tests that require inputs, the test target does nothing.
(Note: Demos should be self contained and not require unknown external
inputs. This PR does not attempt to fix this.)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20546)
Diffstat (limited to 'demos/encrypt')
-rw-r--r-- | demos/encrypt/Makefile | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/demos/encrypt/Makefile b/demos/encrypt/Makefile index d07dc0caed..6d4e060668 100644 --- a/demos/encrypt/Makefile +++ b/demos/encrypt/Makefile @@ -7,14 +7,22 @@ CFLAGS = -I../../include -g LDFLAGS = -L../.. LDLIBS = -lcrypto -all: rsa_encrypt +TESTS=rsa_encrypt + +all: $(TESTS) %.o: %.c $(CC) $(CFLAGS) -c $< rsa_encrypt: rsa_encrypt.o -test: ; - clean: - $(RM) *.o rsa_encrypt + $(RM) *.o $(TESTS) + +.PHONY: test +test: all + @echo "\nEncrypt tests:" + @set -e; for tst in $(TESTS); do \ + echo "\n"$$tst; \ + LD_LIBRARY_PATH=../.. ./$$tst; \ + done |