Skip to content

Commit 92773e0

Browse files
authored
Merge pull request swiftlang#187 from dgrove-oss/extended-test-suite
configure support for extended test suite
2 parents 4664355 + bf3c07a commit 92773e0

File tree

2 files changed

+29
-48
lines changed

2 files changed

+29
-48
lines changed

configure.ac

+12
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,18 @@ AC_SUBST([SWIFT_LIBDIR])
174174
AC_CHECK_PROG(use_gold_linker, ld.gold, true, false)
175175
AM_CONDITIONAL(USE_GOLD_LINKER, $use_gold_linker)
176176

177+
#
178+
# Enable an extended test suite that includes
179+
# tests that are too unreliable to be enabled by
180+
# default in the Swift CI environment, but are still
181+
# useful for libdispatch developers to be able to run.
182+
#
183+
AC_ARG_ENABLE([extended-test-suite],
184+
[AS_HELP_STRING([--enable-extended-test-suite],
185+
[Include additional test cases that may fail intermittently])]
186+
)
187+
AM_CONDITIONAL(EXTENDED_TEST_SUITE, test "x$enable_extended_test_suite" = "xyes")
188+
177189
#
178190
# Enable __thread based TSD on platforms where it is efficient
179191
# Allow override based on command line argument to configure

tests/Makefile.am

+17-48
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,36 @@ check_PROGRAMS= \
2020

2121
noinst_SCRIPTS=leaks-wrapper.sh
2222

23+
# Tests that have not been ported to Linux
24+
# because they test unsupported functionality.
2325
UNPORTED_TESTS= \
2426
dispatch_deadname \
2527
dispatch_proc \
2628
dispatch_vm \
2729
dispatch_vnode
2830

29-
# Tests that have been disabled as they dont' reliably
30-
# pass or fail (so can't succeed, or run as XFAIL tests)
31-
DISABLED_TESTS= \
31+
# Tests that usually pass, but occasionally fail
32+
# and are therefore not suitable for general CI usage.
33+
UNRELIABLE_TESTS= \
3234
dispatch_priority \
3335
dispatch_priority2 \
36+
dispatch_concur \
3437
dispatch_read \
3538
dispatch_read2 \
39+
dispatch_suspend_timer \
3640
dispatch_pingpong \
3741
dispatch_drift \
42+
dispatch_readsync \
3843
dispatch_cascade \
3944
dispatch_io
4045

46+
if EXTENDED_TEST_SUITE
47+
ADDITIONAL_TESTS= $(UNRELIABLE_TESTS)
48+
else
49+
ADDITIONAL_TESTS=
50+
endif
51+
52+
# The set of tests that will be run by 'make check'
4153
TESTS= \
4254
dispatch_apply \
4355
dispatch_api \
@@ -53,58 +65,15 @@ TESTS= \
5365
dispatch_timer_short \
5466
dispatch_timer_timeout \
5567
dispatch_sema \
56-
dispatch_suspend_timer \
5768
dispatch_timer_bit31 \
5869
dispatch_timer_bit63 \
5970
dispatch_timer_set_time \
6071
dispatch_starfish \
6172
dispatch_data \
6273
dispatch_io_net \
63-
dispatch_select
64-
65-
# List tests that are expected to fail here.
66-
# Currently dispatch_concur fails occasionally, but passes more often than fails.
67-
XFAIL_TESTS = \
68-
dispatch_concur \
69-
dispatch_readsync
74+
dispatch_select \
75+
$(ADDITIONAL_TESTS)
7076

71-
ORIGINAL_LIST_OF_TESTS= \
72-
dispatch_apply \
73-
dispatch_api \
74-
dispatch_c99 \
75-
dispatch_deadname \
76-
dispatch_debug \
77-
dispatch_queue_finalizer \
78-
dispatch_group \
79-
dispatch_overcommit \
80-
dispatch_pingpong \
81-
dispatch_plusplus \
82-
dispatch_priority \
83-
dispatch_priority2 \
84-
dispatch_concur \
85-
dispatch_context_for_key \
86-
dispatch_proc \
87-
dispatch_read \
88-
dispatch_read2 \
89-
dispatch_after \
90-
dispatch_timer \
91-
dispatch_timer_short \
92-
dispatch_timer_timeout \
93-
dispatch_sema \
94-
dispatch_suspend_timer \
95-
dispatch_timer_bit31 \
96-
dispatch_timer_bit63 \
97-
dispatch_timer_set_time \
98-
dispatch_starfish \
99-
dispatch_cascade \
100-
dispatch_drift \
101-
dispatch_readsync \
102-
dispatch_data \
103-
dispatch_io \
104-
dispatch_io_net \
105-
dispatch_vm \
106-
dispatch_vnode \
107-
dispatch_select
10877

10978
dispatch_c99_CFLAGS=$(DISPATCH_TESTS_CFLAGS) $(CBLOCKS_FLAGS) $(KQUEUE_CFLAGS) -std=c99
11079
dispatch_plusplus_SOURCES=dispatch_plusplus.cpp

0 commit comments

Comments
 (0)