<commit_before>TOP = ../..
include $(TOP)/Makefile

# clear CFLAGS and LDFLAGS
CFLAGS :=
LDFLAGS :=

ifdef CONFIG_WIN32
 TCCFLAGS = -B$(top_srcdir)/win32 -I$(top_srcdir)/include -L$(TOP)
else
 TCCFLAGS = -B$(TOP) -I$(top_srcdir)/include -lm
endif

ifeq ($(TARGETOS),Darwin)
 CFLAGS += -Wl,-flat_namespace,-undefined,warning
 TCCFLAGS += -D_ANSI_SOURCE
 export MACOSX_DEPLOYMENT_TARGET:=10.2
endif

TCC = $(TOP)/tcc $(TCCFLAGS)

TESTS = $(patsubst %.c,%.test,$(wildcard *.c))

# 34_array_assignment.test -- array assignment is not in C standard
SKIP = 34_array_assignment.test

# some tests do not pass on all platforms, remove them for now
ifeq ($(CONFIG_arm_eabi),yes) # not ARM soft-float
 SKIP += 22_floating_point.test
endif
ifeq ($(TARGETOS),Darwin)
 SKIP += 40_stdio.test
endif
ifdef CONFIG_WIN32
 SKIP += 24_math_library.test # don't have round()
 SKIP += 28_strings.test # don't have r/index() / strings.h
endif
ifeq ($(ARCH),x86-64)
 SKIP += 73_arm64.test
endif

# Some tests might need arguments
ARGS =
31_args.test : ARGS = arg1 arg2 arg3 arg4 arg5
46_grep.test : ARGS = '[^* ]*[:a:d: ]+\:\*-/: $$' 46_grep.c

# Some tests might need different flags
FLAGS =
76_dollars_in_identifiers.test : FLAGS = -fdollars-in-identifiers

# Filter some always-warning<commit_msg>Run testcases in sorted order<commit_after>TOP = ../..
include $(TOP)/Makefile

# clear CFLAGS and LDFLAGS
CFLAGS :=
LDFLAGS :=

ifdef CONFIG_WIN32
 TCCFLAGS = -B$(top_srcdir)/win32 -I$(top_srcdir)/include -L$(TOP)
else
 TCCFLAGS = -B$(TOP) -I$(top_srcdir)/include -lm
endif

ifeq ($(TARGETOS),Darwin)
 CFLAGS += -Wl,-flat_namespace,-undefined,warning
 TCCFLAGS += -D_ANSI_SOURCE
 export MACOSX_DEPLOYMENT_TARGET:=10.2
endif

TCC = $(TOP)/tcc $(TCCFLAGS)

TESTS = $(patsubst %.c,%.test,$(sort $(wildcard *.c)))

# 34_array_assignment.test -- array assignment is not in C standard
SKIP = 34_array_assignment.test

# some tests do not pass on all platforms, remove them for now
ifeq ($(CONFIG_arm_eabi),yes) # not ARM soft-float
 SKIP += 22_floating_point.test
endif
ifeq ($(TARGETOS),Darwin)
 SKIP += 40_stdio.test
endif
ifdef CONFIG_WIN32
 SKIP += 24_math_library.test # don't have round()
 SKIP += 28_strings.test # don't have r/index() / strings.h
endif
ifeq ($(ARCH),x86-64)
 SKIP += 73_arm64.test
endif

# Some tests might need arguments
ARGS =
31_args.test : ARGS = arg1 arg2 arg3 arg4 arg5
46_grep.test : ARGS = '[^* ]*[:a:d: ]+\:\*-/: $$' 46_grep.c

# Some tests might need different flags
FLAGS =
76_dollars_in_identifiers.test : FLAGS = -fdollars-in-identifiers

# Filter some always-warning
{'fraction_non_alphanumeric': 0.14324534161490685, 'fraction_numerical': 0.03260869565217391, 'mean_word_length': 4.577922077922078, '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': '2447934', 'n_tokens_mistral': 1034, 'n_tokens_neox': 955, 'n_words': 246}