From 5b2a7a61fd5cf9982f105a3081c2ed7a298b71df Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Sat, 27 Nov 2021 13:14:28 +0100 Subject: add Selenium- and Python-based test system --- Makefile.in | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'Makefile.in') 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 -- cgit v1.2.3