Skip to content

Commit 8a01f60

Browse files
committed
configure support for extended test suite
Add a configure argument to enable extended test suite. The extended test suite is disabled by default (and thus will not be run in vanilla Swift CI jobs). Move yet another intermittently failing test, dispatch_suspend_timer, out of the list of default tests.
1 parent cb59f92 commit 8a01f60

File tree

2 files changed

+30
-49
lines changed

2 files changed

+30
-49
lines changed

configure.ac

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,18 @@ AC_SUBST([SWIFT_LIBDIR])
168168
AC_CHECK_PROG(use_gold_linker, ld.gold, true, false)
169169
AM_CONDITIONAL(USE_GOLD_LINKER, $use_gold_linker)
170170

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

tests/Makefile.am

Lines changed: 18 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +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 \
43+
dispatch_cascade \
3844
dispatch_io
3945

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'
4053
TESTS= \
4154
dispatch_apply \
4255
dispatch_api \
@@ -52,59 +65,15 @@ TESTS= \
5265
dispatch_timer_short \
5366
dispatch_timer_timeout \
5467
dispatch_sema \
55-
dispatch_suspend_timer \
5668
dispatch_timer_bit31 \
5769
dispatch_timer_bit63 \
5870
dispatch_timer_set_time \
5971
dispatch_starfish \
60-
dispatch_cascade \
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)