
LUA=lua

all:
	@echo "Please read the makefile to check out possible targets."

# Tests for MR-UDP

# 1. periodic transmission of UID segment, for maintaining an open connection.
01_uid_server:
	$(LUA) lac/mrudp/tests/spec/01_uid/uidserver.lua
01_uid_client:
	$(LUA) lac/mrudp/tests/spec/01_uid/uidclient.lua

# 2. correct transmission of all segments of Simple R-UDP (ACK, EAK, SYN, etc.)
# 3. bufferization and delivery of packets in FIFO order
# 6. repeated attempts of transmission of bufferized packets while connection
#    is active.

020306_loss_server:
	$(LUA) lac/mrudp/tests/spec/020306_loss/lossserver.lua
020306_loss_client:
	$(LUA) lac/mrudp/tests/spec/020306_loss/lossclient.lua

# 4. transmission and reception of packets at high rate (packet storm),
#    to check if the socket can handle it
04_packetstorm_server:
	$(LUA) lac/mrudp/tests/spec/04_packetstorm/psserver.lua
04_packetstorm_client:
	$(LUA) lac/mrudp/tests/spec/04_packetstorm/psclient.lua

# 5. correct segmentation/reassembly of an application object when it is
#    larger than the payload of DAT segment
05_dat_server:
	$(LUA) lac/mrudp/tests/spec/05_dat/datserver.lua
05_dat_client:
	$(LUA) lac/mrudp/tests/spec/05_dat/datclient.lua

# 7. notification of disconnection (callback in application listener)
# 8. notification of packets received (callback in application listener)
0708_callbacks_server:
	$(LUA) lac/mrudp/tests/spec/0708_callbacks/cbserver.lua
0708_callbacks_client:
	$(LUA) lac/mrudp/tests/spec/0708_callbacks/cbclient.lua

# Tests for ClientLib

test:
	rm -f luacov.*
	lua -lluacov lac/clientlib/tests/modules/messages.lua
	lua -lluacov lac/clientlib/tests/modules/groups/manager.lua
	lua -lluacov lac/clientlib/tests/modules/pubsub/manager.lua
	luacov lac/clientlib
	grep "Summary" -B1 -A1000 luacov.report.out



