<commit_before># Makefile for building sesqlite_test

.PHONY: all clean distclean fresh test

TOP				 = ../../..
NAME			:= test_sesqlite
OBJS			+= test_sesqlite1.o sqlite3.o
LDFLAGS			+= -lselinux -lpthread -ldl -lcunit

CUNIT_XML		:= cunit_testall-Results.xml		# do not change
JUNIT_XML		:= junit_testall-Results.xml
CUNIT_TO_JUNIT	:= cunit-to-junit.xsl
CONTEXTS		:= sesqlite_contexts

all: test

sqlite3.o:
	@ make all -C $(TOP)
	cp $(TOP)/build/sqlite3.o .

sesqlite_contexts:
	cp ../policy/$@

$(NAME): $(OBJS)
	gcc $(OBJS) -o $(NAME) $(LDFLAGS)

$(CUNIT_XML): $(sesqlite_contexts)
	@- ./$(NAME) -auto

$(JUNIT_XML) test: $(NAME) $(CUNIT_XML)
	@ xsltproc --novalid -o $(JUNIT_XML) $(CUNIT_TO_JUNIT) $(CUNIT_XML)

clean:
	@- $(RM) $(NAME) $(OBJS) $(CUNIT_XML) $(JUNIT_XML)

distclean: clean
	@ make clean -C $(TOP)

fresh: | distclean all<commit_msg>Typo in cunit Makefile<commit_after># Makefile for building sesqlite_test

.PHONY: all clean distclean fresh test

TOP				 = ../../..
NAME			:= test_sesqlite
OBJS			+= test_sesqlite1.o sqlite3.o
LDFLAGS			+= -lselinux -lpthread -ldl -lcunit

CUNIT_XML		:= cunit_testall-Results.xml		# do not change
JUNIT_XML		:= junit_testall-Results.xml
CUNIT_TO_JUNIT	:= cunit-to-junit.xsl
CONTEXTS		:= sesqlite_contexts

all: test

sqlite3.o:
	@ make all -C $(TOP)
	cp $(TOP)/build/sqlite3.o .

$(CONTEXTS):
	cp ../policy/$@ .

$(NAME): $(OBJS)
	gcc $(OBJS) -o $(NAME) $(LDFLAGS)

$(CUNIT_XML): $(CONTEXTS)
	@- ./$(NAME) -auto

$(JUNIT_XML) test: $(NAME) $(CUNIT_XML)
	@ xsltproc --novalid -o $(JUNIT_XML) $(CUNIT_TO_JUNIT) $(CUNIT_XML)

clean:
	@- $(RM) $(NAME) $(OBJS) $(CUNIT_XML) $(JUNIT_XML)

distclean: clean
	@ make clean -C $(TOP)

fresh: | distclean all
{'fraction_non_alphanumeric': 0.17391304347826086, 'fraction_numerical': 0.004700352526439483, 'mean_word_length': 3.8380681818181817, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '4598973', 'n_tokens_mistral': 771, 'n_tokens_neox': 738, 'n_words': 164}