aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/.gitignore5
-rw-r--r--tests/Makefile24
-rw-r--r--tests/test-aes.c (renamed from wpa_supplicant/tests/test_aes.c)0
-rw-r--r--tests/test-md5.c (renamed from wpa_supplicant/tests/test_md5.c)0
-rw-r--r--tests/test-ms_funcs.c (renamed from wpa_supplicant/tests/test_ms_funcs.c)0
-rw-r--r--tests/test-sha1.c (renamed from wpa_supplicant/tests/test_sha1.c)0
-rw-r--r--tests/test-sha256.c (renamed from wpa_supplicant/tests/test_sha256.c)0
-rw-r--r--wpa_supplicant/Makefile33
8 files changed, 29 insertions, 33 deletions
diff --git a/tests/.gitignore b/tests/.gitignore
index 460b76c..0710c37 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -1,3 +1,8 @@
+test-aes
test-base64
test-md4
+test-md5
test-milenage
+test-ms_funcs
+test-sha1
+test-sha256
diff --git a/tests/Makefile b/tests/Makefile
index 1665a56..7c0a6ff 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -1,4 +1,5 @@
-TESTS=test-base64 test-md4 test-milenage
+TESTS=test-base64 test-md4 test-md5 test-milenage test-ms_funcs test-sha1 \
+ test-sha256 test-aes
all: $(TESTS)
@@ -27,19 +28,40 @@ LIBS = ../src/utils/libutils.a \
$(MAKE) -C ../src/crypto
+test-aes: test-aes.o $(LIBS)
+ $(LDO) $(LDFLAGS) -o $@ $^
+
test-base64: test-base64.o $(LIBS)
$(LDO) $(LDFLAGS) -o $@ $^
test-md4: test-md4.o $(LIBS)
$(LDO) $(LDFLAGS) -o $@ $^
+test-md5: test-md5.o $(LIBS)
+ $(LDO) $(LDFLAGS) -o $@ $^
+
test-milenage: test-milenage.o $(LIBS)
$(LDO) $(LDFLAGS) -o $@ $^
+test-ms_funcs: test-ms_funcs.o $(LIBS)
+ $(LDO) $(LDFLAGS) -o $@ $^
+
+test-sha1: test-sha1.o $(LIBS)
+ $(LDO) $(LDFLAGS) -o $@ $^
+
+test-sha256: test-sha256.o $(LIBS)
+ $(LDO) $(LDFLAGS) -o $@ $^
+
run-tests: $(TESTS)
+ ./test-aes
./test-md4
+ ./test-md5
./test-milenage
+ ./test-sha1
+ ./test-sha256
+ @echo
+ @echo All tests completed successfully.
clean:
$(MAKE) -C ../src clean
diff --git a/wpa_supplicant/tests/test_aes.c b/tests/test-aes.c
index 8c0b152..8c0b152 100644
--- a/wpa_supplicant/tests/test_aes.c
+++ b/tests/test-aes.c
diff --git a/wpa_supplicant/tests/test_md5.c b/tests/test-md5.c
index ecd3183..ecd3183 100644
--- a/wpa_supplicant/tests/test_md5.c
+++ b/tests/test-md5.c
diff --git a/wpa_supplicant/tests/test_ms_funcs.c b/tests/test-ms_funcs.c
index 231ccd2..231ccd2 100644
--- a/wpa_supplicant/tests/test_ms_funcs.c
+++ b/tests/test-ms_funcs.c
diff --git a/wpa_supplicant/tests/test_sha1.c b/tests/test-sha1.c
index a2343cf..a2343cf 100644
--- a/wpa_supplicant/tests/test_sha1.c
+++ b/tests/test-sha1.c
diff --git a/wpa_supplicant/tests/test_sha256.c b/tests/test-sha256.c
index f194ff9..f194ff9 100644
--- a/wpa_supplicant/tests/test_sha256.c
+++ b/tests/test-sha256.c
diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile
index 79da19c..428f010 100644
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
@@ -1329,31 +1329,6 @@ wpa_gui-qt4/Makefile:
wpa_gui-qt4: wpa_gui-qt4/Makefile
$(MAKE) -C wpa_gui-qt4
-TEST_MS_FUNCS_OBJS = ../src/crypto/crypto_openssl.o $(SHA1OBJS) $(MD5OBJS) \
- ../src/utils/os_unix.o ../src/crypto/rc4.o tests/test_ms_funcs.o
-test-ms_funcs: $(TEST_MS_FUNCS_OBJS)
- $(LDO) $(LDFLAGS) -o $@ $(TEST_MS_FUNCS_OBJS) $(LIBS) -lcrypto
- ./test-ms_funcs
- rm test-ms_funcs
-
-TEST_SHA1_OBJS = $(SHA1OBJS) $(MD5OBJS) tests/test_sha1.o #../src/crypto/crypto_openssl.o
-test-sha1: $(TEST_SHA1_OBJS)
- $(LDO) $(LDFLAGS) -o $@ $(TEST_SHA1_OBJS) $(LIBS)
- ./test-sha1
- rm test-sha1
-
-TEST_SHA256_OBJS = $(SHA256OBJS) $(MD5OBJS) tests/test_sha256.o ../src/utils/os_unix.o ../src/crypto/crypto_openssl.o
-test-sha256: $(TEST_SHA256_OBJS)
- $(LDO) $(LDFLAGS) -o $@ $(TEST_SHA256_OBJS) $(LIBS)
- ./test-sha256
- rm test-sha256
-
-TEST_AES_OBJS = tests/test_aes.o $(AESOBJS)
-test-aes: $(TEST_AES_OBJS)
- $(LDO) $(LDFLAGS) -o $@ $(TEST_AES_OBJS) $(LIBS)
- ./test-aes
- rm test-aes
-
TEST_EAP_SIM_COMMON_OBJS = $(SHA1OBJS) $(MD5OBJS) \
../src/utils/common.o ../src/utils/os_unix.o \
../src/utils/wpa_debug.o $(AESOBJS) \
@@ -1363,13 +1338,7 @@ test-eap_sim_common: $(TEST_EAP_SIM_COMMON_OBJS)
./test-eap_sim_common
rm test-eap_sim_common
-TEST_MD5_OBJS = $(MD5OBJS) tests/test_md5.o #../src/crypto/crypto_openssl.o
-test-md5: $(TEST_MD5_OBJS)
- $(LDO) $(LDFLAGS) -o $@ $(TEST_MD5_OBJS) $(LIBS)
- ./test-md5
- rm test-md5
-
-tests: test-ms_funcs test-sha1 test-aes test-eap_sim_common test-md5
+tests: test-eap_sim_common
clean:
$(MAKE) -C ../src clean