wget/testenv/Makefile.am

129 lines
5.8 KiB
Makefile
Raw Normal View History

# Makefile for `wget' utility
2021-01-01 19:31:01 +08:00
# Copyright (C) 2013, 2015, 2018-2021 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with Wget. If not, see <http://www.gnu.org/licenses/>.
# Additional permission under GNU GPL version 3 section 7
# If you modify this program, or any covered work, by linking or
# combining it with the OpenSSL project's OpenSSL library (or a
# modified version of that library), containing parts covered by the
# terms of the OpenSSL or SSLeay licenses, the Free Software Foundation
# grants you additional permission to convey the resulting work.
# Corresponding Source for a non-source form of such a combination
# shall include the source code for the parts of OpenSSL used as well
# as that of the covered work.
if METALINK_IS_ENABLED
METALINK_TESTS = Test-metalink-http.py \
Test-metalink-http-quoted.py \
Test-metalink-http-baddigest.py \
Test-metalink-http-xml.py \
Test-metalink-http-xml-trust.py \
Test-metalink-http-xml-trust-name.py \
New: --metalink-over-http Content-Type/Disposition Metalink/XML processing * src/http.c (metalink_from_http): Process the Content-Type header. Add an application/metalink4+xml URL as metalink metaurl. If the option opt.content_disposition is true, the Content-Disposition's filename is the metaurl's name * doc/wget.texi: Update --content-disposition and --metalink-over-http * doc/metalink-standard.txt: Update doc. Content-Type/Disposition processing through --metalink-over-http. Update download naming system about --trust-server-names and --content-disposition * testenv/Makefile.am: Add new files * testenv/Test-metalink-http-xml-type.py: New file. Metalink/HTTP Content-Type/Disposition header automated Metalink/XML tests * testenv/Test-metalink-http-xml-type-trust.py: New file. Metalink/HTTP Content-Type/Disposition header with --trust-server-names automated Metalink/XML tests * testenv/Test-metalink-http-xml-type-content.py: New file. Metalink/HTTP Content-Type/Disposition header with --content-disposition automated Metalink/XML tests * testenv/Test-metalink-http-xml-type-trust-content.py: New file. Metalink/HTTP Content-Type/Disposition header with --trust-server-names and --content-disposition automated Metalink/XML tests Process the Content-Type header, identify an application/metalink4+xml file. The Content-Disposition could provide an alternate name through the "filename" field for the metalink xml file. Respectively, the cli options --metalink-over-http and --content-disposition are required. When Metalink/XML auto-processing, to use the Content-Disposition's filename, the cli option --trust-server-names is also required.
2016-08-30 02:59:35 +08:00
Test-metalink-http-xml-type.py \
Test-metalink-http-xml-type-trust.py \
Test-metalink-http-xml-type-content.py \
Test-metalink-http-xml-type-trust-content.py \
Test-metalink-xml.py \
Test-metalink-xml-continue.py \
Test-metalink-xml-relpath.py \
Test-metalink-xml-abspath.py \
New: Metalink/XML and Metalink/HTTP file naming safety rules * NEWS: Mention the effect of --trust-server-names over Metalink * src/metalink.h: Add declaration of function append_suffix_number() * src/metalink.c: Add function append_suffix_number() append number to string * src/metalink.c (retrieve_from_metalink): Safer Metalink/XML and Metalink/HTTP download naming system, opt.trustservernames based * doc/metalink-standard.txt: Update doc. Explain new Metalink/XML and Metalin/HTTP download naming system and --trust-server-names role * testenv/Makefile.am: Add new files * testenv/Test-metalink-xml-continue.py: Update test. Metalink/XML continue/keep existing files (HTTP 416) with --continue tests * testenv/Test-metalink-xml.py: Update test. Metalink/XML naming tests * testenv/Test-metalink-xml-trust.py: New file. Metalink/XML naming tests with --trust-server-names * testenv/Test-metalink-xml-abspath.py: Update test. Metalink/XML absolute path tests * testenv/Test-metalink-xml-abspath-trust.py: New file. Metalink/XML absolute path tests with --trust-server-names * testenv/Test-metalink-xml-relpath.py: Update test. Metalink/XML relative path tests * testenv/Test-metalink-xml-relpath-trust.py: New file. Metalink/XML relative path tests with --trust-server-names * testenv/Test-metalink-xml-homepath.py: Update test. Metalink/XML home path and ~ (tilde) tests * testenv/Test-metalink-xml-homepath-trust.py: New file. Metalink/XML home path and ~ (tilde) tests with --trust-server-names * testenv/Test-metalink-xml-prefix.py: New file. Metalink/XML naming tests with --directory-prefix * testenv/Test-metalink-xml-prefix-trust.py: New file. Metalink/XML naming tests with --directory-prefix and --trust-server-names * testenv/Test-metalink-xml-absprefix.py: New file. Metalink/XML absolute --directory-prefix tests * testenv/Test-metalink-xml-absprefix-trust.py: New file. Metalink/XML absolute --directory-prefix tests with --trust-server-names * testenv/Test-metalink-xml-relprefix.py: New file. Metalink/XML relative --directory-prefix tests * testenv/Test-metalink-xml-relprefix-trust.py: New file. Metalink/XML relative --directory-prefix tests with --trust-server-names * testenv/Test-metalink-xml-homeprefix.py: New file. Metalink/XML home --directory-prefix tests * testenv/Test-metalink-xml-homeprefix-trust.py: New file. Metalink/XML home --directory-prefix tests with --trust-server-names The option --trust-server-names allows to use the file names parsed from a Metalink/XML file. Without --trust-server-names, the safety mechanism provides secure and predictable file names.
2016-08-22 00:45:09 +08:00
Test-metalink-xml-homepath.py \
Test-metalink-xml-trust.py \
Test-metalink-xml-relpath-trust.py \
Test-metalink-xml-abspath-trust.py \
Test-metalink-xml-homepath-trust.py \
Test-metalink-xml-prefix.py \
Test-metalink-xml-relprefix.py \
Test-metalink-xml-absprefix.py \
Test-metalink-xml-homeprefix.py \
Test-metalink-xml-prefix-trust.py \
Test-metalink-xml-relprefix-trust.py \
Test-metalink-xml-absprefix-trust.py \
Test-metalink-xml-homeprefix-trust.py \
Test-metalink-xml-emptyprefix-trust.py \
Test-metalink-xml-size.py \
Test-metalink-xml-nohash.py \
Test-metalink-xml-nourls.py \
Test-metalink-xml-urlbreak.py
else
METALINK_TESTS =
endif
AUTOMAKE_OPTIONS = parallel-tests
AM_TESTS_ENVIRONMENT = export WGETRC=/dev/null; MAKE_CHECK=True; export MAKE_CHECK;\
export PYTHONPATH=$$PYTHONPATH:$(srcdir); export VALGRIND_TESTS="@VALGRIND_TESTS@";
if WITH_SSL
AM_TESTS_ENVIRONMENT += export SSL_TESTS=1;
endif
if HAVE_PYTHON3
TESTS = Test-504.py \
Test-416.py \
Test-auth-basic-fail.py \
Test-auth-basic.py \
Test-auth-basic-netrc.py \
Test-auth-basic-netrc-user-given.py \
Test-auth-basic-netrc-pass-given.py \
Test-auth-basic-no-netrc-fail.py \
Test-auth-both.py \
Test-auth-digest.py \
Test-auth-no-challenge.py \
Test-auth-no-challenge-url.py \
Test-auth-retcode.py \
Test-auth-with-content-disposition.py \
Test-c-full.py \
Test-condget.py \
Test-Content-disposition-2.py \
Test-Content-disposition.py \
Test--convert-links--content-on-error.py \
Test-cookie-401.py \
Test-cookie-domain-mismatch.py \
Test-cookie-expires.py \
Test-cookie.py \
Test-Head.py \
Test-hsts.py \
Enhancements in testsuite engine + new HSTS test. * testenv/Makefile.am: added new test 'Test-hsts.py'. * testenv/Test-hsts.py: new test for HSTS. * testenv/conf/domains.py: new hook to override domain list. * testenv/test/base_test.py: (__init__): new optional parameter for tests 'req_protocols'. (get_domain_addr): set the instance variables 'addr' and 'port'. Return address as an array (domain, port) instead of string. (gen_cmd_line): take into account domain and port. * testenv/test/http_test.py (__init__): new optional parameter 'req_protocols'. (setup): new function. Call to server_setup() decoupled from begin() and moved here. (begin): call to superclass to maintain backward compatibility. Removed call to server_setup(). This patch adds a new parameter to the test suite called 'req_protocols', and a new function called 'setup'. The ability for tests to be able to set some extra parameters such as the actual requested protocols (with 'req_protocols') became obvious when support for HSTS was added to Wget, where the requested URI and the actual executed URI do not have to be the same. This new parameter is optional and if not specified, the test suite behaves as before. Also, the new function 'setup' is provided as a means to start the test HTTP server, but not launch the test yet (this is done when calling 'begin', as usual), in case we want to query the address and port in which the test server listens. If 'setup' is not called, it is automatically invoked when calling 'begin'. With these measures, we preserve backward-compatibility with existing tests.
2015-07-06 02:04:42 +08:00
Test--https.py \
Test--https-crl.py \
Test-missing-scheme-retval.py \
Test-O.py \
Test-pinnedpubkey-der-https.py \
Test-pinnedpubkey-der-no-check-https.py \
Test-pinnedpubkey-hash-https.py \
Test-pinnedpubkey-hash-no-check-fail-https.py \
Test-pinnedpubkey-pem-fail-https.py \
Test-pinnedpubkey-pem-https.py \
Test-Post.py \
Test-recursive-basic.py \
Test-recursive-include.py \
Test-recursive-redirect.py \
Test-redirect.py \
Test-redirect-crash.py \
Test--rejected-log.py \
Test-reserved-chars.py \
Test--spider-r.py \
Test-no_proxy-env.py \
$(METALINK_TESTS)
endif
EXTRA_DIST = certs conf exc misc server test README $(TESTS)
2013-10-07 01:33:19 +08:00
2014-10-08 19:17:21 +08:00
TEST_EXTENSIONS = .py
PY_LOG_COMPILER = python3
AM_PY_LOG_FLAGS = -O