summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common.mk10
-rw-r--r--src/debug.h6
2 files changed, 13 insertions, 3 deletions
diff --git a/src/common.mk b/src/common.mk
index b854933..22bd3ca 100644
--- a/src/common.mk
+++ b/src/common.mk
@@ -29,18 +29,28 @@ results/test-%: results/test/test-%.o
@ echo "LD $@"
$(Q) gcc $^ $(LDFLAGS) -o $@
+results/traces-%: results/test/traces-%.o
+ @ echo "LD $@"
+ $(Q) gcc $^ $(LDFLAGS) -o $@
+
test: $(tests)
$(tests): %: results/%
@ echo "TEST $@"
$(Q) ./results/$@
+traces: $(traces)
+traces-%: results/traces-%
+ @ echo "TRACES $@"
+ $(Q) ./results/$@
+
results/src/cipher.o: src/cipher.h src/tweakey.h src/constants.h src/parameters.h _parameters.h
results/src/constants.o: src/constants.h
results/src/lilliput-ae-i.o: src/lilliput-ae.h src/cipher.h src/constants.h src/parameters.h _parameters.h
results/src/tweakey.o: src/tweakey.h src/constants.h src/parameters.h _parameters.h
results/test-*.o: test/helpers.h src/parameters.h _parameters.h
+results/traces-%.o: test/helpers.h src/parameters.h _parameters.h
# TODO: should add order-only prerequisites to remove mkdirs inside recipes
# TODO: add valgrind, although it does not seem to play well with ASAN
diff --git a/src/debug.h b/src/debug.h
index c7fa343..c25aeb1 100644
--- a/src/debug.h
+++ b/src/debug.h
@@ -60,11 +60,11 @@ static inline void debug_dump_buffer(const char *header, size_t len, const uint8
fprintf(DUMP, "\n");
}
-static inline void debug_open_dump(const char *vector_name)
+static inline void debug_open_dump(const char *suite, const char *vector_name)
{
- size_t namelen = snprintf(NULL, 0, "/tmp/test-%s.txt", vector_name);
+ size_t namelen = snprintf(NULL, 0, "results/traces-%s-%s.txt", suite, vector_name);
char name[namelen+1];
- snprintf(name, sizeof(name), "/tmp/test-%s.txt", vector_name);
+ snprintf(name, sizeof(name), "results/traces-%s-%s.txt", suite, vector_name);
DUMP = fopen(name, "w");
}