aboutsummaryrefslogtreecommitdiff
ModeNameSize
-rw-r--r--.gitattributes20logplainabout
d---------.github81logplain
-rw-r--r--.gitignore35logplainabout
-rw-r--r--CONTRIBUTING.md1552logplainabout
-rw-r--r--LICENSE1348logplainabout
-rw-r--r--README.md47126logplainabout
d---------bin36logplain
d---------lib418logplain
-rw-r--r--package.json1068logplainabout
d---------test546logplain
d---------tools190logplain
ss='add'>+ $(HYDRILLA_INFO)
TEST_ROOT_DIR = "/tmp/$$(pwd | sed 's|/|!|g')!!test-root"
-all: | container-runner.touchfile log
+all: | container-runner.touchfile log sample-malcontent
$(KOSZKO_ORG_WEBSITE_INFO):
$(MAKE) -C subrepos/koszko-org-website dist
$(HYDRILLA_WEBSITE_INFO):
$(MAKE) -C subrepos/hydrilla-website dist
+$(HYDRILLA_INFO):
+ $(MAKE) -C subrepos/hydrilla dist
-container-runner: | container.scm \
- $(KOSZKO_ORG_WEBSITE_INFO) \
- $(HYDRILLA_WEBSITE_INFO)
- $(GUIX_SYS_CONTAINER) container.scm -r container-runner
- touch container-runner.touchfile
+container-runner: | container.scm $(ALL_EGG_INFOS) hydrilla-wsgi.py
+container-runner.touchfile: container.scm $(ALL_EGG_INFOS) hydrilla-wsgi.py
-container-runner.touchfile: container.scm \
- $(KOSZKO_ORG_WEBSITE_INFO) \
- $(HYDRILLA_WEBSITE_INFO)
+container-runner container-runner.touchfile:
$(MAKE) clean-runner
- $(MAKE) container-runner
+ $(GUIX_SYS_CONTAINER) container.scm -r container-runner
+ touch container-runner.touchfile
hosts: hosts-extra /etc/hosts
cat $^ > $@
@@ -54,9 +59,16 @@ hosts: hosts-extra /etc/hosts
log:
ln -sf $(TEST_ROOT_DIR)/var/log/guix-container $@
+sample-malcontent:
+ mkdir $@
+ printf 'hydrilla-builder -s tests/source-package-example/ -d %s' \
+ "$$(realpath $@)" | \
+ make -C subrepos/hydrilla shell-with-haketilo
+
HYDRILLA_WEBSITE_ETC_DIR = $(TEST_ROOT_DIR)/etc/guix-container/hydrilla-website
+MALCONTENT_DIR = $(TEST_ROOT_DIR)/var/lib/hydrilla/malcontent_dirs
-prepare-test-root:
+prepare-test-root: sample-malcontent
rm -rf $(TEST_ROOT_DIR)
@# Prepare replacement `/var/www`
mkdir -p $(TEST_ROOT_DIR)/var/www/koszko.org/html
@@ -68,6 +80,10 @@ prepare-test-root:
printf 'test non-secret\n' > $(HYDRILLA_WEBSITE_ETC_DIR)/secret.txt
chgrp -R 133 $(HYDRILLA_WEBSITE_ETC_DIR)
chmod 640 $(HYDRILLA_WEBSITE_ETC_DIR)/secret.txt
+ @# Prepare replacement `/var/lib/hydrilla`
+ mkdir -p $(MALCONTENT_DIR)/api_v2
+ ln -sf api_v2 $(MALCONTENT_DIR)/api_v1
+ cp -r $</* $(MALCONTENT_DIR)/api_v2/
GUIX_CONTAINER_FLAGS = -e ./container-runner -p ./pidfile -r $(TEST_ROOT_DIR)
@@ -101,12 +117,15 @@ reinstall:
rm -rf /usr/local/bin/guix-container
$(MAKE) install
+build-hydrilla-json-schemas:
+ $(GUIX_TM) build -L ./guix-module-dir/ hydrilla-json-schemas
+
clean-runner:
rm -rf container-runner container-runner.touchfile
clean: clean-runner
$(MAKE) -C subrepos/koszko-org-website clean
- rm -rf log hosts
+ rm -rf log hosts schemas sample-malcontent
.PHONY: all \
clean-runner clean \
@@ -114,4 +133,4 @@ clean: clean-runner
start-container stop-container restart-container \
enter-container fake-client \
install reinstall \
- sdists koszko-org-wesite-sdist
+ build-hydrilla-json-schemas