Browse Source

Move tests to separate directory

master
Joost Rijneveld 5 years ago
parent
commit
e61a320aed
No known key found for this signature in database GPG Key ID: A4FE39CF49CBC553
5 changed files with 3 additions and 4 deletions
  1. +3
    -4
      Makefile
  2. +0
    -0
      test/crypto_kem/functest.c
  3. +0
    -0
      test/crypto_kem/testvectors.c
  4. +0
    -0
      test/crypto_sign/functest.c
  5. +0
    -0
      test/crypto_sign/testvectors.c

+ 3
- 4
Makefile View File

@@ -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"



crypto_kem/test.c → test/crypto_kem/functest.c View File


crypto_kem/testvectors.c → test/crypto_kem/testvectors.c View File


crypto_sign/test.c → test/crypto_sign/functest.c View File


crypto_sign/testvectors.c → test/crypto_sign/testvectors.c View File


Loading…
Cancel
Save