aboutsummaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2021-11-27 13:14:28 +0100
committerWojtek Kosior <koszko@koszko.org>2021-11-27 13:15:33 +0100
commit5b2a7a61fd5cf9982f105a3081c2ed7a298b71df (patch)
treea53b200722278e7cc9793ecd6f2ea134a609cead /Makefile.in
parent96068ada37bfa1d7e6485551138ba36600664caf (diff)
downloadbrowser-extension-5b2a7a61fd5cf9982f105a3081c2ed7a298b71df.tar.gz
browser-extension-5b2a7a61fd5cf9982f105a3081c2ed7a298b71df.zip
add Selenium- and Python-based test system
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in22
1 files changed, 21 insertions, 1 deletions
diff --git a/Makefile.in b/Makefile.in
index b65fd9a..5a376e1 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,6 +1,7 @@
# This file is part of Haketilo
#
# Copyright (C) 2021, jahoti
+# Copyright (C) 2021, Wojtek Kosior
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the CC0 1.0 Universal License as published by
@@ -30,7 +31,8 @@ default: $(default_target)
all all-unpacked default unpacked \
install install-html install-dvi install-pdf install-ps uninstall \
install-strip clean distclean mostlyclean maintainer-clean TAGS info \
- dvi html pdf ps dist check installcheck installdirs
+ dvi html pdf ps dist check installcheck installdirs \
+ test test-environment
# core files
icons/haketilo16.png: icons/haketilo.svg
@@ -57,12 +59,30 @@ uninstall:
%-build.zip: %-unpacked
cd $< && zip -q -r ../$@ *
+test/certs/:
+ mkdir $@
+
+test/certs/%.key: | test/certs/
+ openssl genrsa -out $@ 2048
+
+test/certs/rootCA.pem: test/certs/rootCA.key
+ openssl req -x509 -new -nodes -key $< -days 1024 -out $@ \
+ -subj "/CN=Haketilo Test"
+
+test: test/certs/rootCA.pem test/certs/site.key
+ MOZ_HEADLESS=whatever pytest
+
+test-environment: test/certs/rootCA.pem test/certs/site.key
+ python3 -m test
# helper targets
clean mostlyclean:
rm -rf mozilla-unpacked chromium-unpacked haketilo-$(version)
rm -f mozilla-build.zip chromium-build.zip haketilo-$(version).tar.gz \
haketilo-$(version).tar
+ rm -rf test/certs
+ rm -rf $$(find . -name geckodriver.log)
+ rm -rf $$(find . -type d -name __pycache__)
distclean: clean
rm -f Makefile config.status record.conf