From 9dbad2a26fab156b361eb6d0789e8ecda1856881 Mon Sep 17 00:00:00 2001 From: Matias Fontanini Date: Sun, 23 Oct 2016 10:21:58 -0700 Subject: [PATCH] Cleanup tests names and CMake script --- tests/CMakeLists.txt | 1 + tests/src/CMakeLists.txt | 258 +++++------------- ...dress_range.cpp => address_range_test.cpp} | 0 .../{allocators.cpp => allocators_test.cpp} | 0 tests/src/{arp.cpp => arp_test.cpp} | 0 tests/src/{dhcp.cpp => dhcp_test.cpp} | 0 tests/src/{dhcpv6.cpp => dhcpv6_test.cpp} | 0 tests/src/{dns.cpp => dns_test.cpp} | 0 tests/src/dot11/{ack.cpp => ack_test.cpp} | 0 ...soc_request.cpp => assoc_request_test.cpp} | 0 ...c_response.cpp => assoc_response_test.cpp} | 0 ...entication.cpp => authentication_test.cpp} | 0 .../src/dot11/{beacon.cpp => beacon_test.cpp} | 0 ...request.cpp => block_ack_request_test.cpp} | 0 .../{cfendack.cpp => cf_end_ack_test.cpp} | 0 .../src/dot11/{cfend.cpp => cf_end_test.cpp} | 0 tests/src/dot11/{data.cpp => data_test.cpp} | 0 ...tication.cpp => deauthentication_test.cpp} | 0 .../dot11/{disassoc.cpp => disassoc_test.cpp} | 0 tests/src/dot11/{dot11.cpp => dot11_test.cpp} | 0 ...obe_request.cpp => probe_request_test.cpp} | 0 ...e_response.cpp => probe_response_test.cpp} | 0 .../dot11/{pspoll.cpp => ps_poll_test.cpp} | 0 ...c_request.cpp => reassoc_request_test.cpp} | 0 ...response.cpp => reassoc_response_test.cpp} | 0 tests/src/dot11/{rts.cpp => rts_test.cpp} | 0 tests/src/{dot1q.cpp => dot1q_test.cpp} | 0 .../src/{ethernetII.cpp => ethernet_test.cpp} | 0 .../{hw_address.cpp => hw_address_test.cpp} | 0 ..._extension.cpp => icmp_extension_test.cpp} | 0 tests/src/{icmp.cpp => icmp_test.cpp} | 0 tests/src/{icmpv6.cpp => icmpv6_test.cpp} | 0 .../{ip_address.cpp => ip_address_test.cpp} | 0 ...eassembler.cpp => ip_reassembler_test.cpp} | 0 tests/src/{ip.cpp => ip_test.cpp} | 0 tests/src/{ipsec.cpp => ipsec_test.cpp} | 0 ...ipv6_address.cpp => ipv6_address_test.cpp} | 0 tests/src/{ipv6.cpp => ipv6_test.cpp} | 0 tests/src/{llc.cpp => llc_test.cpp} | 0 tests/src/{loopback.cpp => loopback_test.cpp} | 0 tests/src/{main.cpp => main_test.cpp} | 0 ...response.cpp => matches_response_test.cpp} | 0 tests/src/{mpls.cpp => mpls_test.cpp} | 0 ...terface.cpp => network_interface_test.cpp} | 0 ...ter.cpp => offline_packet_filter_test.cpp} | 0 tests/src/{pdu.cpp => pdu_test.cpp} | 0 tests/src/{pktap.cpp => pktap_test.cpp} | 0 tests/src/{ppi.cpp => ppi_test.cpp} | 0 tests/src/{pppoe.cpp => pppoe_test.cpp} | 0 tests/src/{radiotap.cpp => radiotap_test.cpp} | 0 .../src/{rc4eapol.cpp => rc4_eapol_test.cpp} | 0 .../src/{rsn_eapol.cpp => rsn_eapol_test.cpp} | 0 tests/src/{sll.cpp => sll_test.cpp} | 0 tests/src/{snap.cpp => snap_test.cpp} | 0 tests/src/{stp.cpp => stp_test.cpp} | 0 tests/src/{tcp_ip.cpp => tcp_ip_test.cpp} | 0 .../{tcp_stream.cpp => tcp_stream_test.cpp} | 0 tests/src/{tcp.cpp => tcp_test.cpp} | 0 tests/src/{udp.cpp => udp_test.cpp} | 0 tests/src/{utils.cpp => utils_test.cpp} | 0 .../{wep_decrypt.cpp => wep_decrypt_test.cpp} | 0 ...wpa2_decrypt.cpp => wpa2_decrypt_test.cpp} | 0 62 files changed, 70 insertions(+), 189 deletions(-) rename tests/src/{address_range.cpp => address_range_test.cpp} (100%) rename tests/src/{allocators.cpp => allocators_test.cpp} (100%) rename tests/src/{arp.cpp => arp_test.cpp} (100%) rename tests/src/{dhcp.cpp => dhcp_test.cpp} (100%) rename tests/src/{dhcpv6.cpp => dhcpv6_test.cpp} (100%) rename tests/src/{dns.cpp => dns_test.cpp} (100%) rename tests/src/dot11/{ack.cpp => ack_test.cpp} (100%) rename tests/src/dot11/{assoc_request.cpp => assoc_request_test.cpp} (100%) rename tests/src/dot11/{assoc_response.cpp => assoc_response_test.cpp} (100%) rename tests/src/dot11/{authentication.cpp => authentication_test.cpp} (100%) rename tests/src/dot11/{beacon.cpp => beacon_test.cpp} (100%) rename tests/src/dot11/{block_ack_request.cpp => block_ack_request_test.cpp} (100%) rename tests/src/dot11/{cfendack.cpp => cf_end_ack_test.cpp} (100%) rename tests/src/dot11/{cfend.cpp => cf_end_test.cpp} (100%) rename tests/src/dot11/{data.cpp => data_test.cpp} (100%) rename tests/src/dot11/{deauthentication.cpp => deauthentication_test.cpp} (100%) rename tests/src/dot11/{disassoc.cpp => disassoc_test.cpp} (100%) rename tests/src/dot11/{dot11.cpp => dot11_test.cpp} (100%) rename tests/src/dot11/{probe_request.cpp => probe_request_test.cpp} (100%) rename tests/src/dot11/{probe_response.cpp => probe_response_test.cpp} (100%) rename tests/src/dot11/{pspoll.cpp => ps_poll_test.cpp} (100%) rename tests/src/dot11/{reassoc_request.cpp => reassoc_request_test.cpp} (100%) rename tests/src/dot11/{reassoc_response.cpp => reassoc_response_test.cpp} (100%) rename tests/src/dot11/{rts.cpp => rts_test.cpp} (100%) rename tests/src/{dot1q.cpp => dot1q_test.cpp} (100%) rename tests/src/{ethernetII.cpp => ethernet_test.cpp} (100%) rename tests/src/{hw_address.cpp => hw_address_test.cpp} (100%) rename tests/src/{icmp_extension.cpp => icmp_extension_test.cpp} (100%) rename tests/src/{icmp.cpp => icmp_test.cpp} (100%) rename tests/src/{icmpv6.cpp => icmpv6_test.cpp} (100%) rename tests/src/{ip_address.cpp => ip_address_test.cpp} (100%) rename tests/src/{ip_reassembler.cpp => ip_reassembler_test.cpp} (100%) rename tests/src/{ip.cpp => ip_test.cpp} (100%) rename tests/src/{ipsec.cpp => ipsec_test.cpp} (100%) rename tests/src/{ipv6_address.cpp => ipv6_address_test.cpp} (100%) rename tests/src/{ipv6.cpp => ipv6_test.cpp} (100%) rename tests/src/{llc.cpp => llc_test.cpp} (100%) rename tests/src/{loopback.cpp => loopback_test.cpp} (100%) rename tests/src/{main.cpp => main_test.cpp} (100%) rename tests/src/{matches_response.cpp => matches_response_test.cpp} (100%) rename tests/src/{mpls.cpp => mpls_test.cpp} (100%) rename tests/src/{network_interface.cpp => network_interface_test.cpp} (100%) rename tests/src/{offline_packet_filter.cpp => offline_packet_filter_test.cpp} (100%) rename tests/src/{pdu.cpp => pdu_test.cpp} (100%) rename tests/src/{pktap.cpp => pktap_test.cpp} (100%) rename tests/src/{ppi.cpp => ppi_test.cpp} (100%) rename tests/src/{pppoe.cpp => pppoe_test.cpp} (100%) rename tests/src/{radiotap.cpp => radiotap_test.cpp} (100%) rename tests/src/{rc4eapol.cpp => rc4_eapol_test.cpp} (100%) rename tests/src/{rsn_eapol.cpp => rsn_eapol_test.cpp} (100%) rename tests/src/{sll.cpp => sll_test.cpp} (100%) rename tests/src/{snap.cpp => snap_test.cpp} (100%) rename tests/src/{stp.cpp => stp_test.cpp} (100%) rename tests/src/{tcp_ip.cpp => tcp_ip_test.cpp} (100%) rename tests/src/{tcp_stream.cpp => tcp_stream_test.cpp} (100%) rename tests/src/{tcp.cpp => tcp_test.cpp} (100%) rename tests/src/{udp.cpp => udp_test.cpp} (100%) rename tests/src/{utils.cpp => utils_test.cpp} (100%) rename tests/src/{wep_decrypt.cpp => wep_decrypt_test.cpp} (100%) rename tests/src/{wpa2_decrypt.cpp => wpa2_decrypt_test.cpp} (100%) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 1a781db..d7b5c36 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,3 +1,4 @@ +SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/tests) INCLUDE_DIRECTORIES(${gtest_INCLUDE_DIRS}) ADD_SUBDIRECTORY(src) diff --git a/tests/src/CMakeLists.txt b/tests/src/CMakeLists.txt index 7518e51..3daaa91 100644 --- a/tests/src/CMakeLists.txt +++ b/tests/src/CMakeLists.txt @@ -22,196 +22,76 @@ LINK_LIBRARIES( ${PCAP_LIBRARY} ) -IF(LIBTINS_ENABLE_WPA2) - SET(OPTIONAL_TEST_TARGETS WPA2DecryptTest) - ADD_EXECUTABLE(WPA2DecryptTest EXCLUDE_FROM_ALL wpa2_decrypt.cpp) - ADD_TEST(WPA2Decrypt WPA2DecryptTest) -ENDIF() +ADD_CUSTOM_TARGET(tests) -# Add tests target -ADD_CUSTOM_TARGET( - tests DEPENDS - AddressRangeTest - AllocatorsTest - ArpTest - DHCPTest - DHCPv6Test - DNSTest - Dot11AckTest - Dot11AssocRequestTest - Dot11AssocResponseTest - Dot11AuthenticationTest - Dot11BeaconTest - Dot11BlockAckRequestTest - Dot11CFEndTest - Dot11CFEndACKTest - Dot11DataTest - Dot11DeauthenticationTest - Dot11DisassocTest - Dot11Test - Dot11ProbeRequestTest - Dot11ProbeResponseTest - Dot11PSPollTest - Dot11ReassocRequestTest - Dot11ReassocResponseTest - Dot11RTSTest - Dot1QTest - EthernetTest - HWAddressTest - ICMPExtensionTest - ICMPTest - ICMPv6Test - IPTest - IPReassemblerTest - IPv4AddressTest - IPSecTest - IPv6Test - IPv6AddressTest - LLCTest - LoopbackTest - MatchesResponseTest - MPLSTest - NetworkInterfaceTest - OfflinePacketFilterTest - PDUTest - PKTAPTest - PPITest - PPPoETest - RadioTapTest - RC4EAPOLTest - RSNEAPOLTest - SLLTest - SNAPTest - STPTest - TCPIPTest - TCPTest - TCPStreamTest - UDPTest - UtilsTest - WEPDecryptTest - ${OPTIONAL_TEST_TARGETS} -) - -# Test executables - -ADD_EXECUTABLE(AddressRangeTest EXCLUDE_FROM_ALL address_range.cpp) -ADD_EXECUTABLE(AllocatorsTest EXCLUDE_FROM_ALL allocators.cpp) -ADD_EXECUTABLE(ArpTest EXCLUDE_FROM_ALL arp.cpp) -ADD_EXECUTABLE(DHCPTest EXCLUDE_FROM_ALL dhcp.cpp) -ADD_EXECUTABLE(DHCPv6Test EXCLUDE_FROM_ALL dhcpv6.cpp) -ADD_EXECUTABLE(DNSTest EXCLUDE_FROM_ALL dns.cpp) -ADD_EXECUTABLE(Dot1QTest EXCLUDE_FROM_ALL dot1q.cpp) -ADD_EXECUTABLE(EthernetTest EXCLUDE_FROM_ALL ethernetII.cpp) -ADD_EXECUTABLE(HWAddressTest EXCLUDE_FROM_ALL hw_address.cpp) -ADD_EXECUTABLE(ICMPExtensionTest EXCLUDE_FROM_ALL icmp_extension.cpp) -ADD_EXECUTABLE(ICMPTest EXCLUDE_FROM_ALL icmp.cpp) -ADD_EXECUTABLE(ICMPv6Test EXCLUDE_FROM_ALL icmpv6.cpp) -ADD_EXECUTABLE(IPTest EXCLUDE_FROM_ALL ip.cpp) -ADD_EXECUTABLE(IPReassemblerTest EXCLUDE_FROM_ALL ip_reassembler.cpp) -ADD_EXECUTABLE(IPv4AddressTest EXCLUDE_FROM_ALL ip_address.cpp) -ADD_EXECUTABLE(IPSecTest EXCLUDE_FROM_ALL ipsec.cpp) -ADD_EXECUTABLE(IPv6Test EXCLUDE_FROM_ALL ipv6.cpp) -ADD_EXECUTABLE(IPv6AddressTest EXCLUDE_FROM_ALL ipv6_address.cpp) -ADD_EXECUTABLE(LLCTest EXCLUDE_FROM_ALL llc.cpp) -ADD_EXECUTABLE(LoopbackTest EXCLUDE_FROM_ALL loopback.cpp) -ADD_EXECUTABLE(MPLSTest EXCLUDE_FROM_ALL mpls.cpp) -ADD_EXECUTABLE(MatchesResponseTest EXCLUDE_FROM_ALL matches_response.cpp) -ADD_EXECUTABLE(NetworkInterfaceTest EXCLUDE_FROM_ALL network_interface.cpp) -ADD_EXECUTABLE(OfflinePacketFilterTest EXCLUDE_FROM_ALL offline_packet_filter.cpp) -ADD_EXECUTABLE(PDUTest EXCLUDE_FROM_ALL pdu.cpp) -ADD_EXECUTABLE(PKTAPTest EXCLUDE_FROM_ALL pktap.cpp) -ADD_EXECUTABLE(PPITest EXCLUDE_FROM_ALL ppi.cpp) -ADD_EXECUTABLE(PPPoETest EXCLUDE_FROM_ALL pppoe.cpp) -ADD_EXECUTABLE(RadioTapTest EXCLUDE_FROM_ALL radiotap.cpp) -ADD_EXECUTABLE(RC4EAPOLTest EXCLUDE_FROM_ALL rc4eapol.cpp) -ADD_EXECUTABLE(RSNEAPOLTest EXCLUDE_FROM_ALL rsn_eapol.cpp) -ADD_EXECUTABLE(SLLTest EXCLUDE_FROM_ALL sll.cpp) -ADD_EXECUTABLE(SNAPTest EXCLUDE_FROM_ALL snap.cpp) -ADD_EXECUTABLE(STPTest EXCLUDE_FROM_ALL stp.cpp) -ADD_EXECUTABLE(TCPTest EXCLUDE_FROM_ALL tcp.cpp) -ADD_EXECUTABLE(TCPIPTest EXCLUDE_FROM_ALL tcp_ip.cpp) -ADD_EXECUTABLE(TCPStreamTest EXCLUDE_FROM_ALL tcp_stream.cpp) -ADD_EXECUTABLE(UDPTest EXCLUDE_FROM_ALL udp.cpp) -ADD_EXECUTABLE(UtilsTest EXCLUDE_FROM_ALL utils.cpp) -ADD_EXECUTABLE(WEPDecryptTest EXCLUDE_FROM_ALL wep_decrypt.cpp) - -# Dot11 tests executables - -ADD_EXECUTABLE(Dot11AckTest EXCLUDE_FROM_ALL dot11/ack.cpp) -ADD_EXECUTABLE(Dot11AssocRequestTest EXCLUDE_FROM_ALL dot11/assoc_request.cpp) -ADD_EXECUTABLE(Dot11AssocResponseTest EXCLUDE_FROM_ALL dot11/assoc_response.cpp) -ADD_EXECUTABLE(Dot11AuthenticationTest EXCLUDE_FROM_ALL dot11/authentication.cpp) -ADD_EXECUTABLE(Dot11BeaconTest EXCLUDE_FROM_ALL dot11/beacon.cpp) -ADD_EXECUTABLE(Dot11BlockAckRequestTest EXCLUDE_FROM_ALL dot11/block_ack_request.cpp) -ADD_EXECUTABLE(Dot11CFEndTest EXCLUDE_FROM_ALL dot11/cfend.cpp) -ADD_EXECUTABLE(Dot11CFEndACKTest EXCLUDE_FROM_ALL dot11/cfendack.cpp) -ADD_EXECUTABLE(Dot11DataTest EXCLUDE_FROM_ALL dot11/data.cpp) -ADD_EXECUTABLE(Dot11DeauthenticationTest EXCLUDE_FROM_ALL dot11/deauthentication.cpp) -ADD_EXECUTABLE(Dot11DisassocTest EXCLUDE_FROM_ALL dot11/disassoc.cpp) -ADD_EXECUTABLE(Dot11Test EXCLUDE_FROM_ALL dot11/dot11.cpp) -ADD_EXECUTABLE(Dot11ProbeRequestTest EXCLUDE_FROM_ALL dot11/probe_request.cpp) -ADD_EXECUTABLE(Dot11ProbeResponseTest EXCLUDE_FROM_ALL dot11/probe_response.cpp) -ADD_EXECUTABLE(Dot11PSPollTest EXCLUDE_FROM_ALL dot11/pspoll.cpp) -ADD_EXECUTABLE(Dot11ReassocRequestTest EXCLUDE_FROM_ALL dot11/reassoc_request.cpp) -ADD_EXECUTABLE(Dot11ReassocResponseTest EXCLUDE_FROM_ALL dot11/reassoc_response.cpp) -ADD_EXECUTABLE(Dot11RTSTest EXCLUDE_FROM_ALL dot11/rts.cpp) +MACRO(CREATE_TEST test_name) + STRING(REPLACE "/" "_" binary_name ${test_name}) + SET(binary_name "${binary_name}_test") + ADD_EXECUTABLE(${binary_name} EXCLUDE_FROM_ALL "${test_name}_test.cpp") + ADD_TEST(${test_name} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${binary_name}) + ADD_DEPENDENCIES(tests ${binary_name}) +ENDMACRO() # Tests -ADD_TEST(AddressRange AddressRangeTest) -ADD_TEST(Allocators AllocatorsTest) -ADD_TEST(Arp ArpTest) -ADD_TEST(DHCP DHCPTest) -ADD_TEST(DHCPv6 DHCPv6Test) -ADD_TEST(DNS DNSTest) -ADD_TEST(Dot11Ack Dot11AckTest) -ADD_TEST(Dot11AssocRequest Dot11AssocRequestTest) -ADD_TEST(Dot11AssocResponse Dot11AssocResponseTest) -ADD_TEST(Dot11Authentication Dot11AuthenticationTest) -ADD_TEST(Dot11Beacon Dot11BeaconTest) -ADD_TEST(Dot11BlockAckRequest Dot11BlockAckRequestTest) -ADD_TEST(Dot11CFEnd Dot11CFEndTest) -ADD_TEST(Dot11CFEndACK Dot11CFEndACKTest) -ADD_TEST(Dot11Data Dot11DataTest) -ADD_TEST(Dot11Deauthentication Dot11DeauthenticationTest) -ADD_TEST(Dot11Disassoc Dot11DisassocTest) -ADD_TEST(Dot11 Dot11Test) -ADD_TEST(Dot11ProbeRequest Dot11ProbeRequestTest) -ADD_TEST(Dot11ProbeResponse Dot11ProbeResponseTest) -ADD_TEST(Dot11PSPoll Dot11PSPollTest) -ADD_TEST(Dot11ReassocRequest Dot11ReassocRequestTest) -ADD_TEST(Dot11ReassocResponse Dot11ReassocResponseTest) -ADD_TEST(Dot11RTS Dot11RTSTest) -ADD_TEST(Dot1Q Dot1QTest) -ADD_TEST(Ethernet EthernetTest) -ADD_TEST(HWAddress HWAddressTest) -ADD_TEST(ICMPExtension ICMPExtensionTest) -ADD_TEST(ICMP ICMPTest) -ADD_TEST(ICMPv6 ICMPv6Test) -ADD_TEST(IP IPTest) -ADD_TEST(IPReassembler IPReassemblerTest) -ADD_TEST(IPv4Address IPv4AddressTest) -ADD_TEST(IPSec IPSecTest) -ADD_TEST(IPv6 IPv6Test) -ADD_TEST(IPv6Address IPv6AddressTest) -ADD_TEST(LLC LLCTest) -ADD_TEST(Loopback LoopbackTest) -ADD_TEST(MatchesResponse MatchesResponseTest) -ADD_TEST(MPLS MPLSTest) -ADD_TEST(NetworkInterface NetworkInterfaceTest) -ADD_TEST(OfflinePacketFilter OfflinePacketFilterTest) -ADD_TEST(PDU PDUTest) -ADD_TEST(PPI PPITest) -ADD_TEST(PPPoE PPPoETest) -ADD_TEST(RadioTap RadioTapTest) -ADD_TEST(RC4EAPOL RC4EAPOLTest) -ADD_TEST(RSNEAPOL RSNEAPOLTest) -ADD_TEST(SLL SLLTest) -ADD_TEST(SNAP SNAPTest) -ADD_TEST(STP STPTest) -ADD_TEST(TCP TCPTest) -ADD_TEST(TCPIP TCPIPTest) -ADD_TEST(TCPStream TCPStreamTest) -ADD_TEST(UDP UDPTest) -ADD_TEST(Utils UtilsTest) -ADD_TEST(WEPDecrypt WEPDecryptTest) +CREATE_TEST(address_range) +CREATE_TEST(allocators) +CREATE_TEST(arp) +CREATE_TEST(dhcp) +CREATE_TEST(dhcpv6) +CREATE_TEST(dns) +CREATE_TEST(dot11/ack) +CREATE_TEST(dot11/assoc_request) +CREATE_TEST(dot11/assoc_response) +CREATE_TEST(dot11/authentication) +CREATE_TEST(dot11/beacon) +CREATE_TEST(dot11/block_ack_request) +CREATE_TEST(dot11/cf_end) +CREATE_TEST(dot11/cf_end_ack) +CREATE_TEST(dot11/data) +CREATE_TEST(dot11/deauthentication) +CREATE_TEST(dot11/disassoc) +CREATE_TEST(dot11/dot11) +CREATE_TEST(dot11/probe_request) +CREATE_TEST(dot11/probe_response) +CREATE_TEST(dot11/ps_poll) +CREATE_TEST(dot11/reassoc_request) +CREATE_TEST(dot11/reassoc_response) +CREATE_TEST(dot11/rts) +CREATE_TEST(dot1q) +CREATE_TEST(ethernet) +CREATE_TEST(hw_address) +CREATE_TEST(icmp_extension) +CREATE_TEST(icmp) +CREATE_TEST(icmpv6) +CREATE_TEST(ip) +CREATE_TEST(ip_reassembler) +CREATE_TEST(ip_address) +CREATE_TEST(ipsec) +CREATE_TEST(ipv6) +CREATE_TEST(ipv6_address) +CREATE_TEST(llc) +CREATE_TEST(loopback) +CREATE_TEST(matches_response) +CREATE_TEST(mpls) +CREATE_TEST(network_interface) +CREATE_TEST(offline_packet_filter) +CREATE_TEST(pdu) +CREATE_TEST(ppi) +CREATE_TEST(pppoe) +CREATE_TEST(radiotap) +CREATE_TEST(rc4_eapol) +CREATE_TEST(rsn_eapol) +CREATE_TEST(sll) +CREATE_TEST(snap) +CREATE_TEST(stp) +CREATE_TEST(tcp) +CREATE_TEST(tcp_ip) +CREATE_TEST(tcp_stream) +CREATE_TEST(udp) +CREATE_TEST(utils) +CREATE_TEST(wep_decrypt) + +IF(LIBTINS_ENABLE_WPA2) + CREATE_TEST(wpa2_decrypt) +ENDIF() \ No newline at end of file diff --git a/tests/src/address_range.cpp b/tests/src/address_range_test.cpp similarity index 100% rename from tests/src/address_range.cpp rename to tests/src/address_range_test.cpp diff --git a/tests/src/allocators.cpp b/tests/src/allocators_test.cpp similarity index 100% rename from tests/src/allocators.cpp rename to tests/src/allocators_test.cpp diff --git a/tests/src/arp.cpp b/tests/src/arp_test.cpp similarity index 100% rename from tests/src/arp.cpp rename to tests/src/arp_test.cpp diff --git a/tests/src/dhcp.cpp b/tests/src/dhcp_test.cpp similarity index 100% rename from tests/src/dhcp.cpp rename to tests/src/dhcp_test.cpp diff --git a/tests/src/dhcpv6.cpp b/tests/src/dhcpv6_test.cpp similarity index 100% rename from tests/src/dhcpv6.cpp rename to tests/src/dhcpv6_test.cpp diff --git a/tests/src/dns.cpp b/tests/src/dns_test.cpp similarity index 100% rename from tests/src/dns.cpp rename to tests/src/dns_test.cpp diff --git a/tests/src/dot11/ack.cpp b/tests/src/dot11/ack_test.cpp similarity index 100% rename from tests/src/dot11/ack.cpp rename to tests/src/dot11/ack_test.cpp diff --git a/tests/src/dot11/assoc_request.cpp b/tests/src/dot11/assoc_request_test.cpp similarity index 100% rename from tests/src/dot11/assoc_request.cpp rename to tests/src/dot11/assoc_request_test.cpp diff --git a/tests/src/dot11/assoc_response.cpp b/tests/src/dot11/assoc_response_test.cpp similarity index 100% rename from tests/src/dot11/assoc_response.cpp rename to tests/src/dot11/assoc_response_test.cpp diff --git a/tests/src/dot11/authentication.cpp b/tests/src/dot11/authentication_test.cpp similarity index 100% rename from tests/src/dot11/authentication.cpp rename to tests/src/dot11/authentication_test.cpp diff --git a/tests/src/dot11/beacon.cpp b/tests/src/dot11/beacon_test.cpp similarity index 100% rename from tests/src/dot11/beacon.cpp rename to tests/src/dot11/beacon_test.cpp diff --git a/tests/src/dot11/block_ack_request.cpp b/tests/src/dot11/block_ack_request_test.cpp similarity index 100% rename from tests/src/dot11/block_ack_request.cpp rename to tests/src/dot11/block_ack_request_test.cpp diff --git a/tests/src/dot11/cfendack.cpp b/tests/src/dot11/cf_end_ack_test.cpp similarity index 100% rename from tests/src/dot11/cfendack.cpp rename to tests/src/dot11/cf_end_ack_test.cpp diff --git a/tests/src/dot11/cfend.cpp b/tests/src/dot11/cf_end_test.cpp similarity index 100% rename from tests/src/dot11/cfend.cpp rename to tests/src/dot11/cf_end_test.cpp diff --git a/tests/src/dot11/data.cpp b/tests/src/dot11/data_test.cpp similarity index 100% rename from tests/src/dot11/data.cpp rename to tests/src/dot11/data_test.cpp diff --git a/tests/src/dot11/deauthentication.cpp b/tests/src/dot11/deauthentication_test.cpp similarity index 100% rename from tests/src/dot11/deauthentication.cpp rename to tests/src/dot11/deauthentication_test.cpp diff --git a/tests/src/dot11/disassoc.cpp b/tests/src/dot11/disassoc_test.cpp similarity index 100% rename from tests/src/dot11/disassoc.cpp rename to tests/src/dot11/disassoc_test.cpp diff --git a/tests/src/dot11/dot11.cpp b/tests/src/dot11/dot11_test.cpp similarity index 100% rename from tests/src/dot11/dot11.cpp rename to tests/src/dot11/dot11_test.cpp diff --git a/tests/src/dot11/probe_request.cpp b/tests/src/dot11/probe_request_test.cpp similarity index 100% rename from tests/src/dot11/probe_request.cpp rename to tests/src/dot11/probe_request_test.cpp diff --git a/tests/src/dot11/probe_response.cpp b/tests/src/dot11/probe_response_test.cpp similarity index 100% rename from tests/src/dot11/probe_response.cpp rename to tests/src/dot11/probe_response_test.cpp diff --git a/tests/src/dot11/pspoll.cpp b/tests/src/dot11/ps_poll_test.cpp similarity index 100% rename from tests/src/dot11/pspoll.cpp rename to tests/src/dot11/ps_poll_test.cpp diff --git a/tests/src/dot11/reassoc_request.cpp b/tests/src/dot11/reassoc_request_test.cpp similarity index 100% rename from tests/src/dot11/reassoc_request.cpp rename to tests/src/dot11/reassoc_request_test.cpp diff --git a/tests/src/dot11/reassoc_response.cpp b/tests/src/dot11/reassoc_response_test.cpp similarity index 100% rename from tests/src/dot11/reassoc_response.cpp rename to tests/src/dot11/reassoc_response_test.cpp diff --git a/tests/src/dot11/rts.cpp b/tests/src/dot11/rts_test.cpp similarity index 100% rename from tests/src/dot11/rts.cpp rename to tests/src/dot11/rts_test.cpp diff --git a/tests/src/dot1q.cpp b/tests/src/dot1q_test.cpp similarity index 100% rename from tests/src/dot1q.cpp rename to tests/src/dot1q_test.cpp diff --git a/tests/src/ethernetII.cpp b/tests/src/ethernet_test.cpp similarity index 100% rename from tests/src/ethernetII.cpp rename to tests/src/ethernet_test.cpp diff --git a/tests/src/hw_address.cpp b/tests/src/hw_address_test.cpp similarity index 100% rename from tests/src/hw_address.cpp rename to tests/src/hw_address_test.cpp diff --git a/tests/src/icmp_extension.cpp b/tests/src/icmp_extension_test.cpp similarity index 100% rename from tests/src/icmp_extension.cpp rename to tests/src/icmp_extension_test.cpp diff --git a/tests/src/icmp.cpp b/tests/src/icmp_test.cpp similarity index 100% rename from tests/src/icmp.cpp rename to tests/src/icmp_test.cpp diff --git a/tests/src/icmpv6.cpp b/tests/src/icmpv6_test.cpp similarity index 100% rename from tests/src/icmpv6.cpp rename to tests/src/icmpv6_test.cpp diff --git a/tests/src/ip_address.cpp b/tests/src/ip_address_test.cpp similarity index 100% rename from tests/src/ip_address.cpp rename to tests/src/ip_address_test.cpp diff --git a/tests/src/ip_reassembler.cpp b/tests/src/ip_reassembler_test.cpp similarity index 100% rename from tests/src/ip_reassembler.cpp rename to tests/src/ip_reassembler_test.cpp diff --git a/tests/src/ip.cpp b/tests/src/ip_test.cpp similarity index 100% rename from tests/src/ip.cpp rename to tests/src/ip_test.cpp diff --git a/tests/src/ipsec.cpp b/tests/src/ipsec_test.cpp similarity index 100% rename from tests/src/ipsec.cpp rename to tests/src/ipsec_test.cpp diff --git a/tests/src/ipv6_address.cpp b/tests/src/ipv6_address_test.cpp similarity index 100% rename from tests/src/ipv6_address.cpp rename to tests/src/ipv6_address_test.cpp diff --git a/tests/src/ipv6.cpp b/tests/src/ipv6_test.cpp similarity index 100% rename from tests/src/ipv6.cpp rename to tests/src/ipv6_test.cpp diff --git a/tests/src/llc.cpp b/tests/src/llc_test.cpp similarity index 100% rename from tests/src/llc.cpp rename to tests/src/llc_test.cpp diff --git a/tests/src/loopback.cpp b/tests/src/loopback_test.cpp similarity index 100% rename from tests/src/loopback.cpp rename to tests/src/loopback_test.cpp diff --git a/tests/src/main.cpp b/tests/src/main_test.cpp similarity index 100% rename from tests/src/main.cpp rename to tests/src/main_test.cpp diff --git a/tests/src/matches_response.cpp b/tests/src/matches_response_test.cpp similarity index 100% rename from tests/src/matches_response.cpp rename to tests/src/matches_response_test.cpp diff --git a/tests/src/mpls.cpp b/tests/src/mpls_test.cpp similarity index 100% rename from tests/src/mpls.cpp rename to tests/src/mpls_test.cpp diff --git a/tests/src/network_interface.cpp b/tests/src/network_interface_test.cpp similarity index 100% rename from tests/src/network_interface.cpp rename to tests/src/network_interface_test.cpp diff --git a/tests/src/offline_packet_filter.cpp b/tests/src/offline_packet_filter_test.cpp similarity index 100% rename from tests/src/offline_packet_filter.cpp rename to tests/src/offline_packet_filter_test.cpp diff --git a/tests/src/pdu.cpp b/tests/src/pdu_test.cpp similarity index 100% rename from tests/src/pdu.cpp rename to tests/src/pdu_test.cpp diff --git a/tests/src/pktap.cpp b/tests/src/pktap_test.cpp similarity index 100% rename from tests/src/pktap.cpp rename to tests/src/pktap_test.cpp diff --git a/tests/src/ppi.cpp b/tests/src/ppi_test.cpp similarity index 100% rename from tests/src/ppi.cpp rename to tests/src/ppi_test.cpp diff --git a/tests/src/pppoe.cpp b/tests/src/pppoe_test.cpp similarity index 100% rename from tests/src/pppoe.cpp rename to tests/src/pppoe_test.cpp diff --git a/tests/src/radiotap.cpp b/tests/src/radiotap_test.cpp similarity index 100% rename from tests/src/radiotap.cpp rename to tests/src/radiotap_test.cpp diff --git a/tests/src/rc4eapol.cpp b/tests/src/rc4_eapol_test.cpp similarity index 100% rename from tests/src/rc4eapol.cpp rename to tests/src/rc4_eapol_test.cpp diff --git a/tests/src/rsn_eapol.cpp b/tests/src/rsn_eapol_test.cpp similarity index 100% rename from tests/src/rsn_eapol.cpp rename to tests/src/rsn_eapol_test.cpp diff --git a/tests/src/sll.cpp b/tests/src/sll_test.cpp similarity index 100% rename from tests/src/sll.cpp rename to tests/src/sll_test.cpp diff --git a/tests/src/snap.cpp b/tests/src/snap_test.cpp similarity index 100% rename from tests/src/snap.cpp rename to tests/src/snap_test.cpp diff --git a/tests/src/stp.cpp b/tests/src/stp_test.cpp similarity index 100% rename from tests/src/stp.cpp rename to tests/src/stp_test.cpp diff --git a/tests/src/tcp_ip.cpp b/tests/src/tcp_ip_test.cpp similarity index 100% rename from tests/src/tcp_ip.cpp rename to tests/src/tcp_ip_test.cpp diff --git a/tests/src/tcp_stream.cpp b/tests/src/tcp_stream_test.cpp similarity index 100% rename from tests/src/tcp_stream.cpp rename to tests/src/tcp_stream_test.cpp diff --git a/tests/src/tcp.cpp b/tests/src/tcp_test.cpp similarity index 100% rename from tests/src/tcp.cpp rename to tests/src/tcp_test.cpp diff --git a/tests/src/udp.cpp b/tests/src/udp_test.cpp similarity index 100% rename from tests/src/udp.cpp rename to tests/src/udp_test.cpp diff --git a/tests/src/utils.cpp b/tests/src/utils_test.cpp similarity index 100% rename from tests/src/utils.cpp rename to tests/src/utils_test.cpp diff --git a/tests/src/wep_decrypt.cpp b/tests/src/wep_decrypt_test.cpp similarity index 100% rename from tests/src/wep_decrypt.cpp rename to tests/src/wep_decrypt_test.cpp diff --git a/tests/src/wpa2_decrypt.cpp b/tests/src/wpa2_decrypt_test.cpp similarity index 100% rename from tests/src/wpa2_decrypt.cpp rename to tests/src/wpa2_decrypt_test.cpp