From a5138aacb2d7b0cf08e6ac9d5ddb8d2841ae2c30 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Sat, 20 Jul 2013 21:11:08 +0000 Subject: [PATCH] fix parallel build of ipc tests (for make -jN) --- Makefile | 8 ++++++-- src/functional/ipc_msg.c | 2 +- src/functional/ipc_sem.c | 2 +- src/functional/ipc_shm.c | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index a1c91fc..96cc89a 100644 --- 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: diff --git a/src/functional/ipc_msg.c b/src/functional/ipc_msg.c index 477a3f4..c387362 100644 --- a/src/functional/ipc_msg.c +++ b/src/functional/ipc_msg.c @@ -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) \ diff --git a/src/functional/ipc_sem.c b/src/functional/ipc_sem.c index 5a08b88..7c979f4 100644 --- a/src/functional/ipc_sem.c +++ b/src/functional/ipc_sem.c @@ -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) \ diff --git a/src/functional/ipc_shm.c b/src/functional/ipc_shm.c index 6863ad5..2c87e2c 100644 --- a/src/functional/ipc_shm.c +++ b/src/functional/ipc_shm.c @@ -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) \ -- 2.20.1