Skip to content

Commit

Permalink
Merge xapi-stdext as a vendored project
Browse files Browse the repository at this point in the history
xapi-stdext uses dune-project to generate its opam files,
but this means we can't merge its opam files into the root because xapi is not using
that feature for its own opam files yet (and turning this feature on is all or nothing).
It'd be desirable to move xapi's opam files to be auto-generated, but separately from this PR.

For now declare stdext as a vendored project in dune, which allows keeping
the nested dune-project and the opam files in the subdir.

This means that dune won't expand aliases, so we need to add a separate
invocation of runtest and set --root otherwise the tests won't run at all.

Signed-off-by: Edwin Török <[email protected]>
  • Loading branch information
edwintorok committed Jan 22, 2024
1 parent cc6e280 commit 5ead558
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ lint:
TEST_TIMEOUT=600
TEST_TIMEOUT2=1200
test:
(cd ocaml/libs/xapi-stdext \
&& dune runtest --profile=$(PROFILE) --error-reporting=twice -j $(JOBS) --root .)
ulimit -S -t $(TEST_TIMEOUT); \
(sleep $(TEST_TIMEOUT) && ps -ewwlyF --forest)& \
PSTREE_SLEEP_PID=$$!; \
Expand Down Expand Up @@ -244,7 +246,8 @@ install: build doc sdk doc-json
message-switch message-switch-async message-switch-cli message-switch-core message-switch-lwt \
message-switch-unix xapi-idl forkexec xapi-forkexecd xapi-storage xapi-storage-script xapi-storage-cli \
xapi-nbd varstored-guard xapi-log xapi-open-uri xapi-tracing xapi-expiry-alerts cohttp-posix xapi-inventory \
xapi-rrd
xapi-rrd \
xapi-stdext-date xapi-stdext-encodings xapi-stdext-pervasives xapi-stdext-std xapi-stdext-threads xapi-stdext-unix xapi-stdext-zerocheck xapi-stdex
# docs
mkdir -p $(DESTDIR)$(DOCDIR)
cp -r $(XAPIDOC)/jekyll $(DESTDIR)$(DOCDIR)
Expand All @@ -265,7 +268,8 @@ uninstall:
message-switch message-switch-async message-switch-cli message-switch-core message-switch-lwt \
message-switch-unix xapi-idl forkexec xapi-forkexecd xapi-storage xapi-storage-script xapi-log \
xapi-open-uri xapi-tracing xapi-expiry-alerts cohttp-posix xapi-inventory \
xapi-rrd
xapi-rrd \
xapi-stdext-date xapi-stdext-encodings xapi-stdext-pervasives xapi-stdext-std xapi-stdext-threads xapi-stdext-unix xapi-stdext-zerocheck xapi-stdext

compile_flags.txt: Makefile
(ocamlc -config-var ocamlc_cflags;\
Expand Down
1 change: 1 addition & 0 deletions ocaml/libs/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(vendored_dirs xapi-stdext)

0 comments on commit 5ead558

Please sign in to comment.