<commit_before>#!/bin/sh

#Adjusting terminal window to spec reporter 
REPORTER = 'spec'

MOCHA=$(PWD)/node_modules/.bin/mocha
# flyway location
FLYWAY= ../../3rdparty/flyway-3.0

# flyway jdbc location
FLYWAY_JAR="-jarDir=$(FLYWAY)/jars"

# flyway database connection string
FLYWAY_URL='-url=jdbc:postgresql://localhost/flowsim'

# flyway migrations locations
FLYWAY_LOCATIONS="-locations=filesystem:$(PWD)/../sql"

# flyway username/password
FLYWAY_USER='-user=flogdev'
FLYWAY_PASSWORD='-<PASSWORD>'

# general flyway configuration string
FLYWAY_CFG=$(FLYWAY_USER) $(FLYWAY_PASSWORD) $(FLYWAY_JAR) $(FLYWAY_URL) $(FLYWAY_LOCATIONS)

flyway=$(FLYWAY)/flyway $(FLYWAY_CFG)

server='$(PWD)/index.js'

# looking for files present in "test" folder throughout the repo excluding "scratch" and "node_modules" folders
UNIT_TESTS=$(shell find -path "*/test/*.js" -not -path "*/node_modules/*" -a -not -path "*/*/rest*.js")

# looking for files present in "test" folder throughout the repo excluding "scratch" and "node_modules" folders
SYSTEM_TESTS=$(shell find -path "*/test/rest*.js" -not -path "*/node_modules/*" )

unit-test:
	$(flyway) clean && $(flyway) migrate
	clear
	$(MOCHA) -t 20000 -R $(REPORTER) $(UNIT_TESTS)

system-test:
	$(flyway) clean && $(flyway) migrate
	$(server) -t & 
	sleep 5
	$(MOCHA) -t 40000 -R $(REPORTER) $(SYSTEM_TESTS)

.PHONY: unit-test, system-test<commit_msg>Adding kill feature to system test runner<commit_after>#!/bin/sh

#Adjusting terminal window to spec reporter 
REPORTER = 'spec'

MOCHA=$(PWD)/node_modules/.bin/mocha
# flyway location
FLYWAY= ../../3rdparty/flyway-3.0

# flyway jdbc location
FLYWAY_JAR="-jarDir=$(FLYWAY)/jars"

# flyway database connection string
FLYWAY_URL='-url=jdbc:postgresql://localhost/flowsim'

# flyway migrations locations
FLYWAY_LOCATIONS="-locations=filesystem:$(PWD)/../sql"

# flyway username/password
FLYWAY_USER='-user=flogdev'
FLYWAY_PASSWORD='-password=<PASSWORD>'

# general flyway configuration string
FLYWAY_CFG=$(FLYWAY_USER) $(FLYWAY_PASSWORD) $(FLYWAY_JAR) $(FLYWAY_URL) $(FLYWAY_LOCATIONS)

flyway=$(FLYWAY)/flyway $(FLYWAY_CFG)

server='$(PWD)/index.js'

# looking for files present in "test" folder throughout the repo excluding "scratch" and "node_modules" folders
UNIT_TESTS=$(shell find -path "*/test/*.js" -not -path "*/node_modules/*" -a -not -path "*/*/rest*.js")

# looking for files present in "test" folder throughout the repo excluding "scratch" and "node_modules" folders
SYSTEM_TESTS=$(shell find -path "*/test/rest*.js" -not -path "*/node_modules/*" )

unit-test:
	$(flyway) clean && $(flyway) migrate
	clear
	$(MOCHA) -t 20000 -R $(REPORTER) $(UNIT_TESTS)

system-test:
	$(flyway) clean && $(flyway) migrate
	$(server) -t & 
	sleep 5
	$(MOCHA) -t 40000 -R $(REPORTER) $(SYSTEM_TESTS)
	killall -i node
.PHONY: unit-test, system-test
{'fraction_non_alphanumeric': 0.16200919702865227, 'fraction_numerical': 0.009904492394764769, 'mean_word_length': 5.270509977827051, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '7446559', 'n_tokens_mistral': 1082, 'n_tokens_neox': 1058, 'n_words': 250}