From cdb42f0d6b47a60ceb647e3ac6a6ce66352dbae4 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Thu, 18 Jun 2020 20:42:29 +0200 Subject: [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 --- Makefile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'Makefile') 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/*' -- cgit v1.2.3