From e4e655bc9a1cfc4ac70cf9c7b9fd19166008f0ef Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 4 Aug 2024 23:55:40 +0200 Subject: [PATCH] once-tests: New module, extracted from lock-tests. * modules/once-tests: New file. * modules/lock-tests (Files): Remove tests/test-once.c. (Makefile.am): Don't build and test test-once1 and test-once2. --- ChangeLog | 5 +++++ modules/lock-tests | 9 ++------- modules/once-tests | 15 +++++++++++++++ 3 files changed, 22 insertions(+), 7 deletions(-) create mode 100644 modules/once-tests diff --git a/ChangeLog b/ChangeLog index 67c46542f4..87dc7788df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2024-08-04 Bruno Haible + once-tests: New module, extracted from lock-tests. + * modules/once-tests: New file. + * modules/lock-tests (Files): Remove tests/test-once.c. + (Makefile.am): Don't build and test test-once1 and test-once2. + once: New module, extracted from lock. * lib/glthread/once.h: New file, extracted from lib/glthread/lock.h. * lib/glthread/once.c: New file, extracted from lib/glthread/lock.c. diff --git a/modules/lock-tests b/modules/lock-tests index 7b398e2327..2a9855b0f2 100644 --- a/modules/lock-tests +++ b/modules/lock-tests @@ -1,7 +1,6 @@ Files: tests/test-rwlock1.c tests/test-lock.c -tests/test-once.c tests/atomic-int-gnulib.h tests/macros.h m4/semaphore.m4 @@ -19,11 +18,7 @@ AC_CHECK_DECLS_ONCE([alarm]) AC_REQUIRE([gl_SEMAPHORE]) Makefile.am: -TESTS += test-rwlock1 test-lock test-once1 test-once2 -check_PROGRAMS += test-rwlock1 test-lock test-once1 test-once2 +TESTS += test-rwlock1 test-lock +check_PROGRAMS += test-rwlock1 test-lock test_rwlock1_LDADD = $(LDADD) @LIBMULTITHREAD@ @YIELD_LIB@ test_lock_LDADD = $(LDADD) @LIBMULTITHREAD@ @YIELD_LIB@ @LIB_SEMAPHORE@ -test_once1_SOURCES = test-once.c -test_once1_LDADD = $(LDADD) @LIBTHREAD@ -test_once2_SOURCES = test-once.c -test_once2_LDADD = $(LDADD) @LIBMULTITHREAD@ diff --git a/modules/once-tests b/modules/once-tests new file mode 100644 index 0000000000..8684f25bc9 --- /dev/null +++ b/modules/once-tests @@ -0,0 +1,15 @@ +Files: +tests/test-once.c +tests/macros.h + +Depends-on: + +configure.ac: + +Makefile.am: +TESTS += test-once1 test-once2 +check_PROGRAMS += test-once1 test-once2 +test_once1_SOURCES = test-once.c +test_once1_LDADD = $(LDADD) @LIBTHREAD@ +test_once2_SOURCES = test-once.c +test_once2_LDADD = $(LDADD) @LIBMULTITHREAD@ -- 2.39.5