summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2017-08-28 17:19:12 -0400
committerKali Kaneko <kali@leap.se>2017-08-30 16:18:50 -0400
commitb9fff80022e15560151f523015cb5bf73bd3cff1 (patch)
treee9c770266003d47b77244f8588c6c2ccf8dc8390 /Makefile
parent04bce963c2314dc9b21bd86224e75c22aae39d70 (diff)
[tests] do not fail if helper installed in debian path
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 9 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 41b0b5c0..49236ec5 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,11 @@
DIST=dist/bitmask
NEXT_VERSION = $(shell cat pkg/next-version)
DIST_VERSION = dist/bitmask-$(NEXT_VERSION)/
+
+BITMASK_ROOT = src/leap/bitmask/vpn/helpers/linux/bitmask-root
+POLKIT_POLICY = src/leap/bitmask/vpn/helpers/linux/se.leap.bitmask.policy
+SUDO = /usr/bin/sudo
+
include pkg/bundles/build.mk
include pkg/thirdparty/openvpn/build.mk
@@ -45,6 +50,7 @@ test_functional_setup:
pip install -U behave selenium
test_functional: install_helpers
+ test -f /usr/bin/lxpolkit && lkpolkit &
xvfb-run --server-args="-screen 0 1280x1024x24" behave --tags ~@wip --tags @smoke tests/functional/features -k --no-capture -D host=localhost
test_functional_graphical:
@@ -54,8 +60,9 @@ test_functional_graphical_wip:
behave --tags @wip tests/functional/features -k --no-capture -D host=localhost
install_helpers:
- sudo cp src/leap/bitmask/vpn/helpers/linux/bitmask-root /usr/local/sbin/
- sudo cp src/leap/bitmask/vpn/helpers/linux/se.leap.bitmask.policy /usr/share/polkit-1/actions/
+ # if there's no sudo, assumming this is running as root by the CI
+ test -f $(SUDO) && sudo cp $(BITMASK_ROOT) /usr/local/sbin/ || cp $(BITMASK_ROOT) /usr/local/sbin/
+ test -f $(SUDO) && sudo cp $(POLKIT_POLICY) /usr/share/polkit-1/actions/se.bitmask.bundle.policy || cp $(POLKIT_POLICY) /usr/share/polkit-1/actions/se.bitmask.bundle.policy
install_pixelated:
pip install leap.pixelated leap.pixelated-www