<commit_before>ifndef TUXDIR
$(error TUXDIR is not set)
endif

export PATH:=$(TUXDIR)/bin:$(PATH)
export LD_LIBRARY_PATH:=$(TUXDIR)/lib:$(LD_LIBRARY_PATH)
export TUXCONFIG:=$(CURDIR)/tuxconfig

check: server mtserver failserver client defserver defmtserver tuxconfig
	-rm -f ULOG.*
	-tmipcrm -y
	tmboot -y
	./client
	tmshutdown -y
	grep -q ':server\..*:TEST: tpsvrinit called' ULOG.*
	! grep -q ':server\..*:TEST: tpsvrthrinit called' ULOG.*
	grep -q ':server\..*:TEST: SERVICE called' ULOG.*
	! grep -q ':server\..*:TEST: tpsvrthrdone called' ULOG.*
	grep -q ':server\..*:TEST: tpsvrdone called' ULOG.*
	grep -q ':mtserver\..*:TEST: tpsvrinit called' ULOG.*
	grep -q ':mtserver\..*:TEST: tpsvrthrinit called' ULOG.*
	grep -q ':server\..*:TEST: SERVICE called' ULOG.*
	grep -q ':mtserver\..*:TEST: MTSERVICE called' ULOG.*
	grep -q ':defserver\..*:TEST: DEFSERVICE called' ULOG.*
	grep -q ':defmtserver\..*:TEST: DEFMTSERVICE called' ULOG.*
	grep -q ':mtserver\..*:TEST: tpsvrdone called' ULOG.*
	grep -q ':mtserver\..*:TEST: tpsvrthrdone called' ULOG.*
	grep -q ':failserver\..*:TEST: tpsvrinit called' ULOG.*
	! grep -q ':failserver\..*:TEST: tpsvrthrinit called' ULOG.*
	! grep -q ':failserver\..*:TEST: tpsvrdone called' ULOG.*
	! grep -q ':failserver\..*:TEST: tpsvrthrdone called' ULOG.*

ubbconfig: ubbconfig.in
	cat $< \<commit_msg>more command tests<commit_after>ifndef TUXDIR
$(error TUXDIR is not set)
endif

export PATH:=$(TUXDIR)/bin:$(PATH)
export LD_LIBRARY_PATH:=$(TUXDIR)/lib:$(LD_LIBRARY_PATH)
export TUXCONFIG:=$(CURDIR)/tuxconfig

check: server mtserver failserver client defserver defmtserver tuxconfig
	-rm -f ULOG.*
	!(tmboot -zinvalid_option)
	!(tmshutdown -zinvalid_option)
	!(tmipcrm -zinvalid_option)
	!(tmloadcf -zinvalid_option)
	-tmipcrm -y
	echo "n" | tmipcrm
	echo "y" | tmipcrm
	tmboot -y
	./client
	tmshutdown -y
	grep -q ':server\..*:TEST: tpsvrinit called' ULOG.*
	! grep -q ':server\..*:TEST: tpsvrthrinit called' ULOG.*
	grep -q ':server\..*:TEST: SERVICE called' ULOG.*
	! grep -q ':server\..*:TEST: tpsvrthrdone called' ULOG.*
	grep -q ':server\..*:TEST: tpsvrdone called' ULOG.*
	grep -q ':mtserver\..*:TEST: tpsvrinit called' ULOG.*
	grep -q ':mtserver\..*:TEST: tpsvrthrinit called' ULOG.*
	grep -q ':server\..*:TEST: SERVICE called' ULOG.*
	grep -q ':mtserver\..*:TEST: MTSERVICE called' ULOG.*
	grep -q ':defserver\..*:TEST: DEFSERVICE called' ULOG.*
	grep -q ':defmtserver\..*:TEST: DEFMTSERVICE called' ULOG.*
	grep -q ':mtserver\..*:TEST: tpsvrdone called' ULOG.*
	grep -q ':mtserver\..*:TEST: tpsvrthrdone called' ULOG.*
	grep -q ':failserver\..*:TEST: tpsvrinit called' ULOG.*
	! grep -q ':failserver\..*:TEST: tpsvrthrinit called' ULOG.*
	! grep -q ':failserver\..*:TEST: tpsvrdone called' ULOG.*
	! grep -q ':failserver\..*:TEST: tpsvrthrdone called' ULOG.*

ubbconfig: ubbconfig.in
	cat $< \
{'fraction_non_alphanumeric': 0.18846694796061886, 'fraction_numerical': 0.0, 'mean_word_length': 4.035398230088496, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5691345', 'n_tokens_mistral': 1212, 'n_tokens_neox': 1182, 'n_words': 290}