summaryrefslogtreecommitdiff
path: root/tests/Makefile
diff options
context:
space:
mode:
authorrpj <rpj>1999-03-07 18:02:06 +0000
committerrpj <rpj>1999-03-07 18:02:06 +0000
commit1e9697f3e8f5da2f710a98d9ae8ce3105e61a4a6 (patch)
treec97ac587bcdd05ec65a184d188756489fb3f710d /tests/Makefile
parentb7a68044db80c822d86ef20dbdd179ed34291390 (diff)
Mon Mar 8 11:18:59 1999 Ross Johnson <rpj@ixobrychus.canberra.edu.au>
* misc.c (CancelableWait): Ensure cancelEvent handle is the lowest indexed element in the handles array. Enhance test for abandoned objects. * pthread.h (PTHREAD_MUTEX_INITIALIZER): Trailing elements not initialised are set to zero by the compiler. This avoids the problem of initialising the opaque critical section element in it. (PTHREAD_COND_INITIALIZER): Ditto. * semaphore.c (_pthread_sem_timedwait): Check sem == NULL earlier. Sun Mar 7 12:31:14 1999 Ross Johnson <rpj@ixobrychus.canberra.edu.au> * condvar.c (pthread_cond_init): set semaphore initial value to 0, not 1. cond_timedwait was returning signaled immediately. * misc.c (CancelableWait): Place the cancel event handle first in the handle table for WaitForMultipleObjects. This ensures that the cancel event is recognised and acted apon if both objects happen to be signaled together. * private.c (_pthread_cond_test_init_lock): Initialise and destroy. * implement.h (_pthread_cond_test_init_lock): Add extern. * global.c (_pthread_cond_test_init_lock): Add declaration. * condvar.c (pthread_cond_destroy): check for valid initialised CV; flag destroyed CVs as invalid. (pthread_cond_init): pthread_cond_t is no longer just a pointer. This is because PTHREAD_COND_INITIALIZER needs state info to reside in pthread_cond_t so that it can initialise on first use. Will work on making pthread_cond_t (and other objects like it) opaque again, if possible, later. (cond_timedwait): add check for statically initialisation of CV; initialise on first use. (pthread_cond_signal): check for valid CV. (pthread_cond_broadcast): check for valid CV. (_cond_check_need_init): Add. * pthread.h (PTHREAD_COND_INITIALIZER): Fix. (pthread_cond_t): no longer a pointer to pthread_cond_t_. (pthread_cond_t_): add 'staticinit' and 'valid' elements. tests/ChangeLog Sun Mar 7 10:41:52 1999 Ross Johnson <rpj@ixobrychus.canberra.edu.au> * Makefile (condvar3, condvar4): Add tests. * condvar4.c (General): Reduce to simple test case; prerequisite is condvar3.c; add description. * condvar3.c (General): Reduce to simple test case; prerequisite is condvar2.c; add description. * condvar2.c (General): Reduce to simple test case; prerequisite is condvar1.c; add description. * condvar1.c (General): Reduce to simple test case; add description. * Template.c (Comments): Add generic test detail.
Diffstat (limited to 'tests/Makefile')
-rw-r--r--tests/Makefile139
1 files changed, 70 insertions, 69 deletions
diff --git a/tests/Makefile b/tests/Makefile
index 14228b7..dcbb7e0 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -1,69 +1,70 @@
-# Makefile for the pthreads test suite.
-# If all of the .pass files can be created, the test suite has passed.
-
-
-CP = copy
-RM = erase
-MKDIR = mkdir
-TOUCH = echo Passed >
-ECHO = @echo
-
-#
-# Mingw32
-#
-CC = gcc
-CFLAGS = -g -O2 -UNDEBUG -Wall -o $@ $^
-BUILD_DIR = ..
-INCLUDES = -I./include
-LIBS = ./lib/libpthread32.a
-
-##
-## MSVC
-##
-#CC = cl
-#CFLAGS = /W3 /MT /nologo /Yd /Zi /Fe$@ $^
-#BUILD_DIR = ..
-#INCLUDES = -I.\include
-#LIBS = .\lib\pthread.lib
-
-HDR = .\include\pthread.h
-LIB = .\lib\libpthread32.a
-DLL = pthread.dll
-
-# If a test case returns a non-zero exit code to the shell, make will
-# stop.
-
-TESTS = count1 create1 equal1 exit1 exit2 exit3 \
- join1 eyal1 mutex1 mutex2 mutex3 \
- once1 self1 self2 condvar1 condvar2 condvar3 condvar4 tsd1
-
-PASSES = $(TESTS:%=%.pass)
-
-all: $(PASSES)
- @ $(ECHO) ALL TESTS PASSED! Congratulations!
-
-%.pass: %.exe $(LIB) $(DLL) $(HDR)
- $*
- @$(ECHO) Passed
- @ $(TOUCH) $@
-
-%.exe: %.c
- @ $(CC) $(CFLAGS) $(INCLUDES) $(LIBS)
-
-$(LIB):
- @- $(MKDIR) .\lib
- @ $(CP) $(BUILD_DIR)\$@ .\$@
-
-$(HDR):
- @- $(MKDIR) .\include
- @ $(CP) $(BUILD_DIR)\$@ .\$@
-
-$(DLL):
- @ $(CP) $(BUILD_DIR)\$@ .\$@
-
-clean:
- - $(RM) *.dll
- - $(RM) $(LIB)
- - $(RM) $(HDR)
- - $(RM) *.exe
- - $(RM) *.pass
+# Makefile for the pthreads test suite.
+# If all of the .pass files can be created, the test suite has passed.
+
+
+CP = copy
+RM = erase
+MKDIR = mkdir
+TOUCH = echo Passed >
+ECHO = @echo
+
+#
+# Mingw32
+#
+CC = gcc
+CFLAGS = -g -O2 -UNDEBUG -Wall -o $@ $^
+BUILD_DIR = ..
+INCLUDES = -I.
+LIBS = ./libpthread32.a
+
+##
+## MSVC
+##
+#CC = cl
+#CFLAGS = /W3 /MT /nologo /Yd /Zi /Fe$@ $^
+#BUILD_DIR = ..
+#INCLUDES = -I.
+#LIBS = pthread.lib
+
+HDR = pthread.h
+LIB = libpthread32.a
+DLL = pthread.dll
+
+# If a test case returns a non-zero exit code to the shell, make will
+# stop.
+
+TESTS = count1 create1 equal1 exit1 exit2 exit3 \
+ join1 mutex1 mutex2 mutex3 \
+ once1 self1 self2 condvar1 condvar2 condvar3 condvar4 tsd1
+
+PASSES = $(TESTS:%=%.pass)
+
+all: $(PASSES)
+ @ $(ECHO) ALL TESTS PASSED! Congratulations!
+
+%.pass: %.exe $(LIB) $(DLL) $(HDR)
+ $*
+ @$(ECHO) Passed
+ @ $(TOUCH) $@
+
+%.exe: %.c
+ @ $(CC) $(CFLAGS) $(INCLUDES) $(LIBS)
+
+$(LIB):
+ @ $(ECHO) Copying the library
+ @ $(CP) $(BUILD_DIR)\$@ .
+
+$(HDR):
+ @ $(ECHO) Copying the header file
+ @ $(CP) $(BUILD_DIR)\$@ .
+
+$(DLL):
+ @ $(ECHO) Copying the DLL
+ @ $(CP) $(BUILD_DIR)\$@ .
+
+clean:
+ - $(RM) *.dll
+ - $(RM) $(LIB)
+ - $(RM) $(HDR)
+ - $(RM) *.exe
+ - $(RM) *.pass