mirror of
https://github.com/dimitri/pgloader.git
synced 2026-02-05 06:21:40 +01:00
Yet another round of fixes for the test setup.
Including some Makefile hacks where test doesn't depend on the main pgloader binary anymore because I coulnd't stop the binary to get being built again even if it's been done already...
This commit is contained in:
parent
5868a80717
commit
9fd0bbabe2
25
Makefile
25
Makefile
@ -4,6 +4,11 @@ POMO_PATCH = $(realpath patches/postmodern-send-copy-done.patch)
|
||||
ASDF_CONFD = ~/.config/common-lisp/source-registry.conf.d
|
||||
ASDF_CONF = $(ASDF_CONFD)/projects.conf
|
||||
|
||||
LIBS = build/libs.stamp
|
||||
BUILDAPP = build/buildapp
|
||||
MANIFEST = build/manifest.ql
|
||||
PGLOADER = build/pgloader.exe
|
||||
|
||||
docs:
|
||||
pandoc pgloader.1.md -o pgloader.1
|
||||
pandoc pgloader.1.md -o pgloader.html
|
||||
@ -34,24 +39,26 @@ $(ASDF_CONF):
|
||||
|
||||
asdf-config: $(ASDF_CONF) ;
|
||||
|
||||
libs: quicklisp $(ASDF_CONF) postmodern cl-csv
|
||||
# Quicklisp Install needed Common Lisp libs
|
||||
$(LIBS): quicklisp $(ASDF_CONF) postmodern cl-csv
|
||||
sbcl --load ~/quicklisp/setup.lisp \
|
||||
--eval '(ql:quickload "pgloader")' \
|
||||
--eval '(quit)'
|
||||
touch $@
|
||||
|
||||
./build/manifest.ql: libs
|
||||
libs: $(LIBS) ;
|
||||
|
||||
$(MANIFEST): libs
|
||||
sbcl --load ~/quicklisp/setup.lisp \
|
||||
--eval '(ql:write-asdf-manifest-file "./build/manifest.ql")' \
|
||||
--eval '(quit)'
|
||||
|
||||
./build/buildapp: quicklisp
|
||||
$(BUILDAPP): quicklisp
|
||||
sbcl --load ~/quicklisp/setup.lisp \
|
||||
--eval '(ql:quickload "buildapp")' \
|
||||
--eval '(buildapp:build-buildapp "./build/buildapp")' \
|
||||
--eval '(quit)'
|
||||
|
||||
./build/pgloader.exe: ./build/buildapp ./build/manifest.ql
|
||||
$(PGLOADER): $(MANIFEST) $(BUILDAPP)
|
||||
./build/buildapp --logfile /tmp/build.log \
|
||||
--asdf-tree ~/quicklisp/local-projects \
|
||||
--manifest-file ./build/manifest.ql \
|
||||
@ -63,7 +70,11 @@ libs: quicklisp $(ASDF_CONF) postmodern cl-csv
|
||||
--compress-core \
|
||||
--output build/pgloader.exe
|
||||
|
||||
test: ./build/pgloader.exe
|
||||
$(MAKE) PGLOADER=$(realpath ./build/pgloader.exe) -C test all
|
||||
pgloader: $(PGLOADER) ;
|
||||
|
||||
test:
|
||||
$(MAKE) PGLOADER=$(realpath $(PGLOADER)) -C test all
|
||||
|
||||
check: test ;
|
||||
|
||||
.PHONY: test
|
||||
|
||||
@ -18,7 +18,9 @@ echo "local all all trust" | sudo tee $HBA
|
||||
echo "host all all 127.0.0.1/32 trust" | sudo tee -a $HBA
|
||||
|
||||
sudo pg_ctlcluster 9.3 main reload
|
||||
sudo createuser -U postgres -SdR `whoami`
|
||||
sudo createdb -U postgres -O `whoami` pgloader
|
||||
createuser -U postgres -SdR `whoami`
|
||||
createdb -U postgres -O `whoami` pgloader
|
||||
psql -U postgres -d pgloader -c 'create extension ip4r'
|
||||
|
||||
make -C /vagrant pgloader
|
||||
make -C /vagrant test
|
||||
|
||||
@ -2,7 +2,6 @@ TESTS = $(wildcard *.load)
|
||||
OUT = $(TESTS:.load=.out)
|
||||
|
||||
all: $(OUT)
|
||||
echo $(OUT)
|
||||
|
||||
%.out: %.load
|
||||
$(PGLOADER) --verbose $<
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user