diff --git a/src/common/libsubprocess/Makefile.am b/src/common/libsubprocess/Makefile.am index 3e731d3b8962..0b9c1bef35dd 100644 --- a/src/common/libsubprocess/Makefile.am +++ b/src/common/libsubprocess/Makefile.am @@ -41,7 +41,9 @@ libsubprocess_la_SOURCES = \ fbuf.h \ fbuf.c \ fbuf_watcher.h \ - fbuf_watcher.c + fbuf_watcher.c \ + bulk-exec.h \ + bulk-exec.c fluxcoreinclude_HEADERS = \ command.h \ @@ -63,7 +65,8 @@ check_PROGRAMS = \ test_echo \ test_multi_echo \ test_fork_sleep \ - test_fdcopy + test_fdcopy \ + bulk-exec check_LTLIBRARIES = test/libutil.la @@ -91,6 +94,14 @@ test_libutil_la_SOURCES = \ test/rcmdsrv.h \ test/rcmdsrv.c +bulk_exec_SOURCES = test/bulk-exec.c +bulk_exec_CPPFLAGS = $(test_cppflags) +bulk_exec_LDADD = \ + $(test_ldadd) \ + $(top_builddir)/src/common/libflux-optparse.la + +bulk_exec_LDFLAGS = $(test_ldflags) + test_command_t_SOURCES = test/command.c test_command_t_CPPFLAGS = $(test_cppflags) test_command_t_LDADD = $(test_ldadd) diff --git a/src/modules/job-exec/bulk-exec.c b/src/common/libsubprocess/bulk-exec.c similarity index 100% rename from src/modules/job-exec/bulk-exec.c rename to src/common/libsubprocess/bulk-exec.c diff --git a/src/modules/job-exec/bulk-exec.h b/src/common/libsubprocess/bulk-exec.h similarity index 99% rename from src/modules/job-exec/bulk-exec.h rename to src/common/libsubprocess/bulk-exec.h index 0442a789bd3e..63fcfee380f7 100644 --- a/src/modules/job-exec/bulk-exec.h +++ b/src/common/libsubprocess/bulk-exec.h @@ -14,6 +14,7 @@ #define HAVE_JOB_EXEC_BULK_EXEC_H 1 #include +#include struct bulk_exec; diff --git a/src/modules/job-exec/test/bulk-exec.c b/src/common/libsubprocess/test/bulk-exec.c similarity index 100% rename from src/modules/job-exec/test/bulk-exec.c rename to src/common/libsubprocess/test/bulk-exec.c diff --git a/src/modules/Makefile.am b/src/modules/Makefile.am index 3dd5a3628ceb..eabed0b50a9e 100644 --- a/src/modules/Makefile.am +++ b/src/modules/Makefile.am @@ -152,7 +152,6 @@ job_archive_la_LDFLAGS = $(fluxmod_ldflags) -module job_exec_la_SOURCES = job_exec_la_LIBADD = \ $(builddir)/job-exec/libjob-exec.la \ - $(builddir)/job-exec/libbulk-exec.la \ $(top_builddir)/src/common/libjob/libjob.la \ $(top_builddir)/src/common/libsubprocess/libsubprocess.la \ $(top_builddir)/src/common/libflux-internal.la \ diff --git a/src/modules/job-exec/Makefile.am b/src/modules/job-exec/Makefile.am index 51222e74d684..b07827ebc22b 100644 --- a/src/modules/job-exec/Makefile.am +++ b/src/modules/job-exec/Makefile.am @@ -13,11 +13,7 @@ AM_CPPFLAGS = \ $(JANSSON_CFLAGS) noinst_LTLIBRARIES = \ - libjob-exec.la \ - libbulk-exec.la - -noinst_PROGRAMS = \ - bulk-exec + libjob-exec.la libjob_exec_la_SOURCES = \ job-exec.h \ @@ -31,21 +27,6 @@ libjob_exec_la_SOURCES = \ testexec.c \ exec.c -libbulk_exec_la_SOURCES = \ - bulk-exec.h \ - bulk-exec.c - -bulk_exec_SOURCES = \ - test/bulk-exec.c - -bulk_exec_LDADD = \ - libbulk-exec.la \ - $(top_builddir)/src/common/libflux-internal.la \ - $(top_builddir)/src/common/libflux-core.la \ - $(top_builddir)/src/common/libflux-idset.la \ - $(top_builddir)/src/common/libflux-optparse.la \ - $(top_builddir)/src/common/libutil/libutil.la - test_ldadd = \ $(builddir)/libjob-exec.la \ $(top_builddir)/src/common/libtap/libtap.la \ diff --git a/src/modules/job-exec/exec.c b/src/modules/job-exec/exec.c index 53f38e4301ac..afd7d3959d83 100644 --- a/src/modules/job-exec/exec.c +++ b/src/modules/job-exec/exec.c @@ -39,10 +39,10 @@ #include "ccan/str/str.h" #include "src/common/libutil/errprintf.h" #include "src/common/libutil/errno_safe.h" +#include "src/common/libsubprocess/bulk-exec.h" #include "job-exec.h" #include "exec_config.h" -#include "bulk-exec.h" #include "rset.h" /* Numeric severity used for a non-fatal, critical job exception: