Skip to content

Commit

Permalink
add x11 for tests (#300)
Browse files Browse the repository at this point in the history
* add x11 for tests

* update

* update

* fix
  • Loading branch information
Uunnamed authored Aug 20, 2020
1 parent 2c9d4ba commit ab57525
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,22 @@ IMAGE := etaoin
docker-build:
docker build -t ${IMAGE}:latest .

.PHONY: check-host
check-host:
ifndef HOST
$(error The HOST variable is not set, please do `export HOST=$$HOST` first)
endif

# works only on mac + quartz
.PHONY: docker-test-display
docker-test-display: check-host
xhost +
docker run --rm \
-v ${CURDIR}:/etaoin \
-v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$(HOST):0 \
-w /etaoin ${IMAGE}:latest \
lein test || \
xhost -

.PHONY: docker-test
docker-test:
Expand Down

0 comments on commit ab57525

Please sign in to comment.