diff --git a/src/tests/Makefile b/src/tests/Makefile
index b084657c62cd0038272f5d9ba7dd0dbeb049e042..ecb5b39c84814f8475bce19e771956feaa25750e 100644
--- a/src/tests/Makefile
+++ b/src/tests/Makefile
@@ -44,7 +44,7 @@ CFLAGS = -Wall -Werror $(OPTFLAGS) -g $(GCOV_FLAGS)
 TDB_CPPFLAGS = -I../../include
 
 
-SRCS = $(wildcard *.c)
+SRCS = $(sort $(wildcard *.c))
 
 TDB_TESTS = $(patsubst %.c,%.tdb,$(SRCS))
 BDB_TESTS = $(patsubst %.c,%.bdb,$(SRCS))
diff --git a/src/tests/test-weakxaction.c b/src/tests/test_weakxaction.c
similarity index 100%
rename from src/tests/test-weakxaction.c
rename to src/tests/test_weakxaction.c