From e61a320aed0252c9434825cddc265f54bd357540 Mon Sep 17 00:00:00 2001 From: Joost Rijneveld Date: Thu, 17 Jan 2019 17:44:55 +0100 Subject: [PATCH] Move tests to separate directory --- Makefile | 7 +++---- crypto_kem/test.c => test/crypto_kem/functest.c | 0 {crypto_kem => test/crypto_kem}/testvectors.c | 0 crypto_sign/test.c => test/crypto_sign/functest.c | 0 {crypto_sign => test/crypto_sign}/testvectors.c | 0 5 files changed, 3 insertions(+), 4 deletions(-) rename crypto_kem/test.c => test/crypto_kem/functest.c (100%) rename {crypto_kem => test/crypto_kem}/testvectors.c (100%) rename crypto_sign/test.c => test/crypto_sign/functest.c (100%) rename {crypto_sign => test/crypto_sign}/testvectors.c (100%) diff --git a/Makefile b/Makefile index 88253e4b..3559cfe5 100644 --- a/Makefile +++ b/Makefile @@ -7,12 +7,12 @@ default: help .PHONY: require_scheme require_scheme: -# assumes a SCHEME variable; e.g. make functest_kem SCHEME=crypto_kem/kyber768 +# assumes a SCHEME variable; e.g. make functest SCHEME=crypto_kem/kyber768 ifndef SCHEME $(error The SCHEME variable is not set. Example: SCHEME=crypto_kem/kyber768) endif -bin/functest_$(subst /,_,$(SCHEME)): $(dir $(SCHEME))test.c $(wildcard $(SCHEME)/clean/*.c) $(wildcard $(SCHEME)/clean/*.h) | require_scheme +bin/functest_$(subst /,_,$(SCHEME)): test/$(dir $(SCHEME))functest.c $(wildcard $(SCHEME)/clean/*.c) $(wildcard $(SCHEME)/clean/*.h) | require_scheme mkdir -p bin $(CC) $(CFLAGS) \ -iquote "./common/" \ @@ -29,7 +29,7 @@ functest: bin/functest_$(subst /,_,$(SCHEME)) run-functest: bin/functest_$(subst /,_,$(SCHEME)) ./$< -bin/testvectors_$(subst /,_,$(SCHEME)): $(dir $(SCHEME))testvectors.c $(wildcard $(SCHEME)/clean/*.c) $(wildcard $(SCHEME)/clean/*.h) | require_scheme +bin/testvectors_$(subst /,_,$(SCHEME)): test/$(dir $(SCHEME))testvectors.c $(wildcard $(SCHEME)/clean/*.c) $(wildcard $(SCHEME)/clean/*.h) | require_scheme mkdir -p bin $(CC) $(CFLAGS) \ -iquote "./common/" \ @@ -69,7 +69,6 @@ do-tidy: require_scheme clang-tidy \ -quiet $(.TIDY_FIX) \ $(SCHEME)/clean/*.c \ - $(SCHEME)/../test.c \ common/*.c \ -- -iquote "common/" -iquote "$(SCHEME)/clean" diff --git a/crypto_kem/test.c b/test/crypto_kem/functest.c similarity index 100% rename from crypto_kem/test.c rename to test/crypto_kem/functest.c diff --git a/crypto_kem/testvectors.c b/test/crypto_kem/testvectors.c similarity index 100% rename from crypto_kem/testvectors.c rename to test/crypto_kem/testvectors.c diff --git a/crypto_sign/test.c b/test/crypto_sign/functest.c similarity index 100% rename from crypto_sign/test.c rename to test/crypto_sign/functest.c diff --git a/crypto_sign/testvectors.c b/test/crypto_sign/testvectors.c similarity index 100% rename from crypto_sign/testvectors.c rename to test/crypto_sign/testvectors.c