summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorkali kaneko (leap communications) <kali@leap.se>2020-06-18 20:42:29 +0200
committerkali kaneko (leap communications) <kali@leap.se>2020-06-26 12:17:30 +0200
commitcdb42f0d6b47a60ceb647e3ac6a6ce66352dbae4 (patch)
tree40f76de30181eb1036d44516e5dd05488c8c31dc /Makefile
parent4de5748e25678dce9c5a344afc5fd40508c0860f (diff)
[test] minimal qml tests
just a minimal boilerplate. the idea is to import the qml files and assert that the states/widgets change accordingly if we mock the backend status. - Closes: #300
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 11 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 28d009c..7d284b4 100644
--- a/Makefile
+++ b/Makefile
@@ -14,8 +14,8 @@ VERSION ?= $(shell git describe)
# go paths
GOPATH = $(shell go env GOPATH)
-SYSTRAY = 0xacab.org/leap/bitmask-vpn
-GOSYSTRAY = ${GOPATH}/src/${SYSTRAY}
+TARGET_GOLIB=lib/libgoshim.a
+SOURCE_GOLIB=gui/backend.go
# detect OS, we use it for dependencies
UNAME = $(shell uname -s)
@@ -81,6 +81,15 @@ build_%:
test:
@go test -tags "integration $(TAGS)" ./...
+golib:
+ CGO_ENABLED=1 go build -buildmode=c-archive -o ${TARGET_GOLIB} ${SOURCE_GOLIB}
+
+test_ui: golib
+ @qmake -o tests/Makefile test.pro
+ @make -C tests clean
+ @make -C tests
+ @./tests/build/test_ui
+
build_win:
powershell -Command '$$version=git describe --tags; go build -ldflags "-H windowsgui -X main.version=$$version" ./cmd/*'