From ab7390a72754aa8be51b51122da8433c206bcf65 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 27 Feb 2021 10:54:18 +0100 Subject: [PATCH] Add a README for the tests based on the curl test suite (cts) Contains improvements made after feedback from Roland. Sponsored by: Privoxy project funds collected at SPI --- tests/cts/README | 52 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 tests/cts/README diff --git a/tests/cts/README b/tests/cts/README new file mode 100644 index 00000000..831f37ab --- /dev/null +++ b/tests/cts/README @@ -0,0 +1,52 @@ +This directory contains tests that leverage curl's test suite (cts). + +For details about curl see: https://curl.se/ + +Some temporary hints are below: + +From the parent directory of the directory with the +Privoxy sources do: + + git clone https://github.com/curl/curl.git + + cd curl + git checkout -b before-cts-regressions 073268a6de3 + + # Build curl as described in GIT-INFO. Note that the configure + # call needs to explicitly choose a TLS library. For example + # by adding "--with-openssl". + + # Install stunnel + + # Test that curl's tests are working without Privoxy + make test + +You can then cd back into privoxy/tests/cts and execute the +tests by running: + + run-privoxy-tests.sh + +The script takes care of starting Privoxy with a configuration expected +by the tests. Note that unlike privoxy-regression-test.pl it currently +does not automatically check that Privoxy has been built with all the +features required for the tests to work and simply tries to execute +all tests. + +The tests are divided into multiple test scenarios. + +Each test scenario has its own subdirectory with a Privoxy +configuration file called privoxy.conf and a data directory +containing the test files. + +The tests are written using the "curl test suite file format" +described at: +https://github.com/curl/curl/blob/master/tests/FILEFORMAT.md + +One extension made is that a section is supported +which will be used when checking the test results instead of using +the section that would be used otherwise. + +This extension is supported by loading a custom perl library +(privoxy-runtests.pm) when running runtests.pl. Loading the library +is done with runtests-wrapper.sh which also sets a couple of other +required options and is normally called through run-privoxy-tests.sh. -- 2.39.2