<commit_before>PATH_MK = ../../devel-tools/trunk/Makefile.mk
include $(PATH_MK)

LIB_PATH = var/lib/caterpillar
LOG_PATH = var/log/caterpillar
ETC_PATH = etc/caterpillar
INITD = etc/init.d
SBIN_DIR = usr/sbin

PRIV_PATH = $(LIB_PATH)/priv
REBAR = rebar
BEAMS = $(patsubst src/%.erl, ebin/%.beam, $(wildcard src/*.erl))
TEST_BEAMS = $(patsubst test_src/%.erl, ebin/%.beam, $(wildcard test_src/*.erl))

ERLC_FLAGS += -W

ifdef EXPORT_ALL
	ERLC_FLAGS += +export_all
else
	ERLC_FLAGS += -pa $(EBIN)
endif


.PHONY: clean test compile devel package export_all test_compile


ebin/%.beam: test_src/%.erl
	$(ERLC_LIBS) $(ERLC) $(ERLC_FLAGS) -o $(EBIN) $<


clean:
	rm -rf dist
	rm -f erl_crash.dump
	rm -f $(EBIN)/*.beam


compile:
	@echo $(PWD)
ifeq ($(PATH_MK), ../../devel-tools/trunk/Makefile.mk)
	$(REBAR) compile
else
	$(REBAR) -C new.rebar.config compile
endif



export_all:
	$(MAKE) EXPORT_ALL=true test_compile


test_compile: $(BEAMS) $(TEST_BEAMS)


test: export_all
	$(ERL) -pa ebin/ -env ERL_LIBS "$(NORMALIZED_LIBS)" -noshell \
    	-eval 'test_runner:start({application, caterpillar}, [verbose, {test_timeout, 15000}])' \
    	-s init stop 



devel: $(TEST_BEAMS) $(BEAMS) 
	$(ERL) -pa ebin -env ERL_LIBS "$(NORMALIZED_LIBS)" -config test.config \
		-boot start_sasl \
		-s caterpillar_app start
			 <commit_msg>run tests only once<commit_after>PATH_MK = ../../devel-tools/trunk/Makefile.mk
include $(PATH_MK)

LIB_PATH = var/lib/caterpillar
LOG_PATH = var/log/caterpillar
ETC_PATH = etc/caterpillar
INITD = etc/init.d
SBIN_DIR = usr/sbin

PRIV_PATH = $(LIB_PATH)/priv
REBAR = rebar
BEAMS = $(patsubst src/%.erl, ebin/%.beam, $(wildcard src/*.erl))
TEST_BEAMS = $(patsubst test_src/%.erl, ebin/%.beam, $(wildcard test_src/*.erl))

ERLC_FLAGS += -W

ifdef EXPORT_ALL
	ERLC_FLAGS += +export_all
else
	ERLC_FLAGS += -pa $(EBIN)
endif


.PHONY: clean test compile devel package export_all test_compile


ebin/%.beam: test_src/%.erl
	$(ERLC_LIBS) $(ERLC) $(ERLC_FLAGS) -o $(EBIN) $<


clean:
	rm -rf dist
	rm -f erl_crash.dump
	rm -f $(EBIN)/*.beam


compile:
	@echo $(PWD)
	ifeq ($(PATH_MK), ../../devel-tools/trunk/Makefile.mk)
		$(REBAR) compile
	else
		$(REBAR) -C new.rebar.config compile
	endif



export_all:
	$(MAKE) EXPORT_ALL=true test_compile


test_compile: $(BEAMS) $(TEST_BEAMS)


test: export_all
	$(ERL) -pa ebin/ -env ERL_LIBS "$(NORMALIZED_LIBS)" -noshell \
    	-eval 'test_runner:start({dir, "ebin"}, [verbose, {test_timeout, 15000}])' \
    	-s init stop 



devel: $(TEST_BEAMS) $(BEAMS) 
	$(ERL) -pa ebin -env ERL_LIBS "$(NORMALIZED_LIBS)" -config test.config \
		-boot start_sasl \
		-s caterpillar_app start
			 
{'fraction_non_alphanumeric': 0.1642694928084784, 'fraction_numerical': 0.003785011355034065, 'mean_word_length': 3.867403314917127, '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': '6995027', 'n_tokens_mistral': 1211, 'n_tokens_neox': 1101, 'n_words': 245}