fix parallel build of ipc tests (for make -jN)
authorSzabolcs Nagy <nsz@port70.net>
Sat, 20 Jul 2013 21:11:08 +0000 (21:11 +0000)
committerSzabolcs Nagy <nsz@port70.net>
Sat, 20 Jul 2013 21:11:08 +0000 (21:11 +0000)
Makefile
src/functional/ipc_msg.c
src/functional/ipc_sem.c
src/functional/ipc_shm.c

index a1c91fc..96cc89a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -18,13 +18,15 @@ N:=$(1)
 -include $(1).mk
 $(1) $(1)-static: $$($(1).OBJS)
 $(1).so: $$($(1).LOBJS)
+# make sure dynamic and static binaries are not run parallel (matters for some tests eg ipc)
+$(1)-static.err: $(1).err
 endef
 
 $(foreach n,$(filter-out $(SPEC_PATTERNS),$(NAMES)),$(eval $(call template,$(n))))
 
 MBINS:=$(filter src/math/%,$(NAMES))
 BINS:=$(foreach n,$(NAMES),$($(n).BINS)) src/api/main $(MBINS)
-LIBS:=$(foreach n,$(NAMES),$($(n).LIBS)) src/common/libtest.a
+LIBS:=$(foreach n,$(NAMES),$($(n).LIBS))
 ERRS:=$(BINS:%=%.err)
 
 define target_template
@@ -39,9 +41,11 @@ endef
 
 $(foreach d,$(DIRS),$(eval $(call target_template,$(d))))
 
+src/common/all: src/common/libtest.a
+
 all:REPORT
 clean:
-       rm -f $(OBJS) $(BINS) $(LIBS) src/*/*.err
+       rm -f $(OBJS) $(BINS) $(LIBS) src/common/libtest.a src/*/*.err
 cleanall: clean
        rm -f REPORT src/*/REPORT
 REPORT:
index 477a3f4..c387362 100644 (file)
@@ -12,7 +12,7 @@
 #include "test.h"
 
 static const char path[] = ".";
-static const int id = 'x';
+static const int id = 'm';
 
 #define T(f) do{ \
        if ((f)+1 == 0) \
index 5a08b88..7c979f4 100644 (file)
@@ -12,7 +12,7 @@
 #include "test.h"
 
 static const char path[] = ".";
-static const int id = 'x';
+static const int id = 's';
 
 #define T(f) do{ \
        if ((f)+1 == 0) \
index 6863ad5..2c87e2c 100644 (file)
@@ -12,7 +12,7 @@
 #include "test.h"
 
 static const char path[] = ".";
-static const int id = 'x';
+static const int id = 'h';
 
 #define T(f) do{ \
        if ((f)+1 == 0) \