<commit_before>include ../Makefile.config
include ../Makefile.libconfig

NC_DIAG_READ_TESTS=test_ncdr_get.x test_ncdr_get_arda.x \
	test_ncdr_get_ardg.x test_ncdr_get_ardag.x \
	test_ncdr_get_id.x test_ncdr_get_id_arda.x \
	test_ncdr_get_id_ardg.x test_ncdr_get_id_ardag.x \
	test_ncdr_get_pushpop.x \
	test_ncdr_dims.x \
	test_ncdr_vars.x

# Coverage build flags
ifndef COVERAGE
	COVERAGE=0
endif

ifeq ($(COVERAGE), 1)
	NCDR_F90FLAGS+=-prof-gen=srcpos
	STATIC_COMPILE=1
endif

# Static compilation flags
ifndef STATIC_COMPILE
	STATIC_COMPILE=0
endif

ifeq ($(STATIC_COMPILE), 1)
	NC_DIAG_READ_FLAGS=-I.. ../nc_diag_read.F90 ../ncdr_*.f90 ../ncdr_*.F90 ../netcdf_unlimdims.F90
endif

.PHONY: all clean check precoverage coverage

all: $(NC_DIAG_READ_TESTS)

check: $(NC_DIAG_READ_TESTS)
	@$(foreach ncdr_test,$(NC_DIAG_READ_TESTS),echo "Running: $(ncdr_test)";./$(ncdr_test) || exit 1;echo "Pass: $(ncdr_test)";)

test_ncdr_dims.x: test_ncdr_dims.f90
	$(NCDR_FORT90C) $(NCDR_F90FLAGS)\
		test_ncdr_dims.f90 -o test_ncdr_dims.x \
		$(NC_DIAG_READ_FLAGS) \
		$(NCDR_NETCDF_FLAGS)

test_ncdr_vars.x: test_ncdr_vars.f90
	$(NCDR_FORT90C) $(NCDR_F90FLAGS) \
		test_ncdr_vars.f90 -o test_ncdr_vars.x \
		$(NC_DIAG_READ_FLAGS) \
		$(NCDR_NETCDF_FLAGS)

test_ncdr_get.x: $(NCDR_LIB_PATH) test_ncdr_get.f90
	$(NCDR_FORT90C) $(NCDR_F90FLAGS) \
		test_ncdr_get.f90 -o test_ncdr_get.x \
		$(NC_DIAG_READ_FLAGS) \
		$(NCDR_NETCDF_FLAGS)

test_ncdr_get_pushpop.x: $(NCDR_LIB_PATH) test_ncdr_get_pushpop.f90
	$(NCDR_FORT90C) $(NCDR_F90FLAGS) \
		test_ncdr_get_pushpop.f90 -o test_ncdr_get_pushpop.x \
		$(NC_DIAG_READ_FLAGS) \
		$(NCDR_NETCDF_FLAGS)

test_ncdr_get_arda.x: $(NCDR_LIB_PATH) test_ncdr_get_arda.f90
	$(NCDR_FORT90C) $(NCDR_F90FLAGS) \
		test_ncdr_get_arda.f90 -o test_ncdr_get_arda.x \
		$(NC_DIAG_READ_FLAGS) \
		$(NCDR_NETCDF_FLAGS)

test_ncdr_get_ardg.x: $(NCDR_LIB_PATH) test_ncdr_get_ardg.f90
	$(NCDR_FORT90C) $(NCDR_F90FLAGS) \
		test_ncdr_get_ardg.f90 -o test_ncdr_get_ardg.x \<commit_msg>Added missing nc_diag_read flags to test cases Makefile<commit_after>include ../Makefile.config
include ../Makefile.libconfig

NC_DIAG_READ_TESTS=test_ncdr_get.x test_ncdr_get_arda.x \
	test_ncdr_get_ardg.x test_ncdr_get_ardag.x \
	test_ncdr_get_id.x test_ncdr_get_id_arda.x \
	test_ncdr_get_id_ardg.x test_ncdr_get_id_ardag.x \
	test_ncdr_get_pushpop.x \
	test_ncdr_dims.x \
	test_ncdr_vars.x

# Coverage build flags
ifndef COVERAGE
	COVERAGE=0
endif

ifeq ($(COVERAGE), 1)
	NCDR_F90FLAGS+=-prof-gen=srcpos
	STATIC_COMPILE=1
endif

# Static compilation flags
ifndef STATIC_COMPILE
	STATIC_COMPILE=0
endif

ifeq ($(STATIC_COMPILE), 1)
	NC_DIAG_READ_FLAGS=-I.. ../nc_diag_read.F90 ../ncdr_*.f90 ../ncdr_*.F90 ../netcdf_unlimdims.F90
endif

.PHONY: all clean check precoverage coverage

all: $(NC_DIAG_READ_TESTS)

check: $(NC_DIAG_READ_TESTS)
	@$(foreach ncdr_test,$(NC_DIAG_READ_TESTS),echo "Running: $(ncdr_test)";./$(ncdr_test) || exit 1;echo "Pass: $(ncdr_test)";)

test_ncdr_dims.x: $(NCDR_LIB_PATH) test_ncdr_dims.f90
	$(NCDR_FORT90C) $(NCDR_F90FLAGS)\
		test_ncdr_dims.f90 -o test_ncdr_dims.x \
		$(NC_DIAG_READ_FLAGS) \
		$(NCDR_NETCDF_FLAGS)

test_ncdr_vars.x: $(NCDR_LIB_PATH) test_ncdr_vars.f90
	$(NCDR_FORT90C) $(NCDR_F90FLAGS) \
		test_ncdr_vars.f90 -o test_ncdr_vars.x \
		$(NC_DIAG_READ_FLAGS) \
		$(NCDR_NETCDF_FLAGS)

test_ncdr_get.x: $(NCDR_LIB_PATH) test_ncdr_get.f90
	$(NCDR_FORT90C) $(NCDR_F90FLAGS) \
		test_ncdr_get.f90 -o test_ncdr_get.x \
		$(NC_DIAG_READ_FLAGS) \
		$(NCDR_NETCDF_FLAGS)

test_ncdr_get_pushpop.x: $(NCDR_LIB_PATH) test_ncdr_get_pushpop.f90
	$(NCDR_FORT90C) $(NCDR_F90FLAGS) \
		test_ncdr_get_pushpop.f90 -o test_ncdr_get_pushpop.x \
		$(NC_DIAG_READ_FLAGS) \
		$(NCDR_NETCDF_FLAGS)

test_ncdr_get_arda.x: $(NCDR_LIB_PATH) test_ncdr_get_arda.f90
	$(NCDR_FORT90C) $(NCDR_F90FLAGS) \
		test_ncdr_get_arda.f90 -o test_ncdr_get_arda.x \
		$(NC_DIAG_READ_FLAGS) \
		$(NCDR_NETCDF_FLAGS)

test_ncdr_get_ardg.x: $(NCDR_LIB_PATH) test_ncdr_get_ardg.f90
	$(NCDR_FORT90C) $(NCDR_F90FLAGS) \
		test_ncdr_get_ardg.f90 -o test_ncdr_get_ardg.x \
{'fraction_non_alphanumeric': 0.1219872110181997, 'fraction_numerical': 0.03148057058534186, 'mean_word_length': 5.6237785016286646, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1524649', 'n_tokens_mistral': 2180, 'n_tokens_neox': 2112, 'n_words': 245}