Reduce number of tests for functest

This commit is contained in:
Thom Wiggers 2019-04-18 11:21:30 +02:00
parent 2be9d6b775
commit f39b300e4e
No known key found for this signature in database
GPG Key ID: 001BB0A7CE26E363
3 changed files with 9 additions and 1 deletions

View File

@ -20,6 +20,9 @@ CFLAGS=-O3 -Wall -Wextra -Wpedantic -Werror -std=c99 \
-fstrict-aliasing -fno-common -pipe \ -fstrict-aliasing -fno-common -pipe \
-I$(COMMON_DIR) $(EXTRAFLAGS) -I$(COMMON_DIR) $(EXTRAFLAGS)
# Number of tests run for functests
NTESTS=1
all: $(DEST_DIR)/functest_$(SCHEME)_$(IMPLEMENTATION) \ all: $(DEST_DIR)/functest_$(SCHEME)_$(IMPLEMENTATION) \
$(DEST_DIR)/testvectors_$(SCHEME)_$(IMPLEMENTATION) \ $(DEST_DIR)/testvectors_$(SCHEME)_$(IMPLEMENTATION) \
$(DEST_DIR)/printparams_$(SCHEME)_$(IMPLEMENTATION) $(DEST_DIR)/printparams_$(SCHEME)_$(IMPLEMENTATION)
@ -50,7 +53,7 @@ $(DEST_DIR)/test_common_%: common/%.c $(COMMON_FILES)
$(DEST_DIR)/functest_$(SCHEME)_$(IMPLEMENTATION): build-scheme crypto_$(TYPE)/functest.c $(COMMON_FILES) $(COMMON_DIR)/randombytes.c $(COMMON_HEADERS) $(DEST_DIR)/functest_$(SCHEME)_$(IMPLEMENTATION): build-scheme crypto_$(TYPE)/functest.c $(COMMON_FILES) $(COMMON_DIR)/randombytes.c $(COMMON_HEADERS)
mkdir -p $(DEST_DIR) mkdir -p $(DEST_DIR)
$(CC) $(CFLAGS) -DPQCLEAN_NAMESPACE=PQCLEAN_$(SCHEME_UPPERCASE)_$(IMPLEMENTATION_UPPERCASE) -I$(SCHEME_DIR) crypto_$(TYPE)/functest.c $(COMMON_FILES) $(COMMON_DIR)/notrandombytes.c -o $@ -L$(SCHEME_DIR) -l$(SCHEME)_$(IMPLEMENTATION) $(CC) $(CFLAGS) -DNTESTS=$(NTESTS) -DPQCLEAN_NAMESPACE=PQCLEAN_$(SCHEME_UPPERCASE)_$(IMPLEMENTATION_UPPERCASE) -I$(SCHEME_DIR) crypto_$(TYPE)/functest.c $(COMMON_FILES) $(COMMON_DIR)/notrandombytes.c -o $@ -L$(SCHEME_DIR) -l$(SCHEME)_$(IMPLEMENTATION)
$(DEST_DIR)/testvectors_$(SCHEME)_$(IMPLEMENTATION): build-scheme crypto_$(TYPE)/testvectors.c $(COMMON_FILES) $(COMMON_DIR)/notrandombytes.c $(COMMON_HEADERS) $(DEST_DIR)/testvectors_$(SCHEME)_$(IMPLEMENTATION): build-scheme crypto_$(TYPE)/testvectors.c $(COMMON_FILES) $(COMMON_DIR)/notrandombytes.c $(COMMON_HEADERS)
mkdir -p $(DEST_DIR) mkdir -p $(DEST_DIR)

View File

@ -5,7 +5,9 @@
#include "api.h" #include "api.h"
#include "randombytes.h" #include "randombytes.h"
#ifndef NTESTS
#define NTESTS 5 #define NTESTS 5
#endif
const uint8_t canary[8] = { const uint8_t canary[8] = {
0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF

View File

@ -6,7 +6,10 @@
#include "api.h" #include "api.h"
#include "randombytes.h" #include "randombytes.h"
#ifndef NTESTS
#define NTESTS 5 #define NTESTS 5
#endif
#define MLEN 32 #define MLEN 32
const uint8_t canary[8] = { const uint8_t canary[8] = {