changeset 49616:d5b722ce9864 stable

make: add a target for building pyoxidizer tests on macOS The resources seem to be embedded inside the binary, but for some reasons they aren't read there. And since they are embedded, they aren't staged by the build in the `lib` directory like on Windows. So copy them from the repo. We can figure out what's going wrong later.
author Matt Harbison <matt_harbison@yahoo.com>
date Mon, 05 Dec 2022 11:46:00 -0500
parents bc59c1e5dd01
children 9a4c76cc8fe6
files Makefile
diffstat 1 files changed, 18 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Mon Jan 02 11:38:20 2023 -0500
+++ b/Makefile	Mon Dec 05 11:46:00 2022 -0500
@@ -260,10 +260,9 @@
 	$(PYOXIDIZER) build --path ./rust/hgcli --release
 
 
-PYOX_DIR=build/pyoxidizer/x86_64-pc-windows-msvc/release/app
-
 # a temporary target to setup all we need for run-tests.py --pyoxidizer
 # (should go away as the run-tests implementation improves
+pyoxidizer-windows-tests: PYOX_DIR=build/pyoxidizer/x86_64-pc-windows-msvc/release/app
 pyoxidizer-windows-tests: pyoxidizer
 	rm -rf $(PYOX_DIR)/templates
 	cp -ar $(PYOX_DIR)/lib/mercurial/templates $(PYOX_DIR)/templates
@@ -277,9 +276,25 @@
 	cp -ar doc $(PYOX_DIR)/doc
 
 
+# a temporary target to setup all we need for run-tests.py --pyoxidizer
+# (should go away as the run-tests implementation improves
+pyoxidizer-macos-tests: PYOX_DIR=build/pyoxidizer/x86_64-apple-darwin/release/app
+pyoxidizer-macos-tests: pyoxidizer
+	rm -rf $(PYOX_DIR)/templates
+	cp -a mercurial/templates $(PYOX_DIR)/templates
+	rm -rf $(PYOX_DIR)/helptext
+	cp -a mercurial/helptext $(PYOX_DIR)/helptext
+	rm -rf $(PYOX_DIR)/defaultrc
+	cp -a mercurial/defaultrc $(PYOX_DIR)/defaultrc
+	rm -rf $(PYOX_DIR)/contrib
+	cp -a contrib $(PYOX_DIR)/contrib
+	rm -rf $(PYOX_DIR)/doc
+	cp -a doc $(PYOX_DIR)/doc
+
+
 .PHONY: help all local build doc cleanbutpackages clean install install-bin \
 	install-doc install-home install-home-bin install-home-doc \
 	dist dist-notests check tests rust-tests check-code format-c \
-	update-pot pyoxidizer pyoxidizer-windows-tests \
+	update-pot pyoxidizer pyoxidizer-windows-tests pyoxidizer-macos-tests \
 	$(packaging_targets) \
 	osx