Commit Graph

53 Commits

Author SHA1 Message Date
af702340a1 Merge remote-tracking branch 'origin/master' into parallel-wget
Conflicts:
	src/http.c
	testenv/Makefile.am
	testenv/Test--https.py
	testenv/Test--spider-r.py
	testenv/Test-Content-disposition-2.py
	testenv/Test-Content-disposition.py
	testenv/Test-Head.py
	testenv/Test-O.py
	testenv/Test-Parallel-Proto.py
	testenv/Test-Post.py
	testenv/Test-Proto.py
	testenv/Test-auth-basic-fail.py
	testenv/Test-auth-basic.py
	testenv/Test-auth-both.py
	testenv/Test-auth-digest.py
	testenv/Test-auth-no-challenge-url.py
	testenv/Test-auth-no-challenge.py
	testenv/Test-auth-retcode.py
	testenv/Test-auth-with-content-disposition.py
	testenv/Test-c-full.py
	testenv/Test-cookie-401.py
	testenv/Test-cookie-domain-mismatch.py
	testenv/Test-cookie-expires.py
	testenv/Test-cookie.py
	testenv/conf/__init__.py
	testenv/conf/authentication.py
	testenv/conf/expect_header.py
	testenv/conf/expected_files.py
	testenv/conf/expected_ret_code.py
	testenv/conf/files_crawled.py
	testenv/conf/hook_sample.py
	testenv/conf/local_files.py
	testenv/conf/reject_header.py
	testenv/conf/response.py
	testenv/conf/send_header.py
	testenv/conf/server_files.py
	testenv/conf/urls.py
	testenv/conf/wget_commands.py
	testenv/misc/colour_terminal.py
	testenv/server/http/http_server.py
	testenv/test/base_test.py
	testenv/test/http_test.py
2014-09-14 16:57:15 +05:30
f8e9a64ec7 Documentation and code cleanup in test suite
Add (lots) of documentation for various parts of the test suite in the
form of Python docstrings. Also, clean up some of the redundant code and
fix indentation issues.
2014-08-08 17:38:11 +05:30
5753ed4a72 Minor cleanup in the test suite
The server_conf hook and the server_sett() methods were no longer
required. The server configuration is currently being done by
server_conf() method in the server.
2014-08-04 20:03:59 +05:30
03f8babefe Group common switches in test suite together
Some command line switches are passed to Wget unconditionally. These
switches should exist in a single place instead of being redundantly
defined in each test file. We add the following two switches by default
here:
1. --debug: This causes wget to be most verbose and output a lot of
   debugging information. Hence, if a test fails, the test log should
   provide valuable information.
2. --no-config: Users may have their own wgetrc files on the system.
   However, for the tests, we want Wget to run with vanilla settings.
   Hence, disbale loading any config files.
2014-08-04 19:51:35 +05:30
be78cba9e5 Support running tests through valgrind 2014-07-24 16:51:58 +05:30
6cb857502f Document SERVER_WAIT 2014-07-24 16:51:58 +05:30
65fc59aefa Fix crash in test suite 2014-07-24 16:51:58 +05:30
8b83306d54 Refactor the Python based test suite
This is a squashed commit of the following from parallel-wget:
ecd6977 Refactor mainly the test cases classes
d26c8eb Create package test for test case classes
507383d Move server classes to package server.protocol
195393b Create package conf where rules and hooks are put
42e482a Create package exc and move TestFailed to exc
82f44f3 Fix a typo in Test-Proto.py
31e5f33 From WgetTest.py move WgetFile to misc
422171d Create package misc, move ColourTerm.py to misc
2014-07-24 16:51:58 +05:30
b89cda0a77 More features to Python based test suite
Squashed Commit from parallel-wget of:
b31e6e4 Add support for HTTPS Servers
b828a6e Sleep for n seconds before calling Wget Executable
7effa90 Support programatically setting Handler class variables
7e1f4c1 Correct the call to stop_HTTP_Server
f616192 Improve error handling when wget executable isn't available
31868fe Split large function to improve readability and extensibility
2014-07-24 16:51:58 +05:30
0606f1a133 testenv: Remove Test--spider-r.py from XFAIL_TESTS 2014-07-24 16:51:58 +05:30
c443399ab1 testenv: fix make dist 2014-07-24 16:51:58 +05:30
7cbe8141d1 Introducing Python based Test Environment
Squashed Commit, of the following commits:

7743384 Update documentation to reflect changes in code
b703633 Add feature that allows to ensure that Wget correctly crawls the website in recursive mode
0758f47 Add new test for recursive spider mode
43bb61b Smartly guess content type header
d4d0e63 Support substring replace in File Contents too
f578500 Compatibility fix with multiple servers
8b1a9b6 Extend Functionality to support spawning multiple servers
e84192a Use the provided calls to shutdown server instead of rewriting it
99659f3 Improve Documentation
cb94e52 Slight code cleanup. Remove unused code
886ac1a Shift to new Threading Model from Multiprocessing model
e74c2ec Add new test for POST Requests
48644f1 Print diff when file contents don't match
b6f9efe Add tests for Cookie support
4c9e6b4 Document pending work
e13bc90 Add new test to ensure Content Disposition and Auth work together
60d1f4d Add new Test for Continue command
738b299 Add test, Test-Head
9b9d16b Edit non-unique TEST_NAME variable
ae958db Minor optimizations to the way Server Rules are executed
50b4f0c The rules need not be a defaultdict.
dccc154 Introducing Python based Test Environment
2014-07-24 16:51:58 +05:30
6140b1b6e3 Support running tests through valgrind 2014-07-23 18:42:43 +05:30
c22b806ee0 Document SERVER_WAIT 2014-07-22 12:49:46 +05:30
825716399c Fix crash in test suite 2014-06-22 01:06:08 +05:30
ecd69778bf Refactor mainly the test cases classes
Files that were refactored are WgetTest.py, some conf
scripts and some test case file. The purpose of the
refactoring of the test cases classes is to provide
a better interface for the incoming FTP test
counterpart.
2014-06-07 16:34:39 +02:00
d26c8ebb16 Create package test for test case classes
delete mode 100644 testenv/WgetTest.py
 create mode 100644 testenv/test/__init__.py
 create mode 100644 testenv/test/base_test.py
 create mode 100644 testenv/test/http_test.py
2014-06-07 16:34:39 +02:00
507383df07 Move server classes to package server.protocol
delete mode 100644 testenv/FTPServer.py
 delete mode 100644 testenv/HTTPServer.py
 create mode 100644 testenv/server/__init__.py
 create mode 100644 testenv/server/ftp/__init__.py
 create mode 100644 testenv/server/ftp/ftp_server.py
 create mode 100644 testenv/server/http/__init__.py
 create mode 100644 testenv/server/http/http_server.py
2014-06-07 16:34:39 +02:00
195393bf41 Create package conf where rules and hooks are put
create mode 100644 testenv/conf/__init__.py
 create mode 100644 testenv/conf/authentication.py
 create mode 100644 testenv/conf/expect_header.py
 create mode 100644 testenv/conf/expected_files.py
 create mode 100644 testenv/conf/expected_ret_code.py
 create mode 100644 testenv/conf/files_crawled.py
 create mode 100644 testenv/conf/hook_sample.py
 create mode 100644 testenv/conf/local_files.py
 create mode 100644 testenv/conf/reject_header.py
 create mode 100644 testenv/conf/response.py
 create mode 100644 testenv/conf/rule_sample.py
 create mode 100644 testenv/conf/send_header.py
 create mode 100644 testenv/conf/server_conf.py
 create mode 100644 testenv/conf/server_files.py
 create mode 100644 testenv/conf/urls.py
 create mode 100644 testenv/conf/wget_commands.py
2014-06-07 16:34:39 +02:00
42e482ad99 Create package exc and move TestFailed to exc
create mode 100644 testenv/exc/__init__.py
 create mode 100644 testenv/exc/test_failed.py
2014-06-07 16:34:39 +02:00
82f44f303a Fix a typo in Test-Proto.py 2014-06-07 16:34:39 +02:00
31e5f33b5e From WgetTest.py move WgetFile to misc
create mode 100644 testenv/misc/wget_file.py
2014-06-07 16:34:39 +02:00
422171da81 Create package misc, move ColourTerm.py to misc
delete mode 100644 testenv/ColourTerm.py
 create mode 100644 testenv/misc/__init__.py
 create mode 100644 testenv/misc/colour_terminal.py
2014-06-07 16:34:38 +02:00
b31e6e4674 Add support for HTTPS Servers 2014-01-03 20:32:06 +01:00
b828a6e4a7 Sleep for n seconds before calling Wget Executable
This commit adds support for a new Environment Variable, SERVER_WAIT
which if set will cause the script to sleep for SERVER_WAIT seconds
before calling the wget executable. During this period, the custom
HTTP/HTTPS/FTP servers are all set up and running and can be used
for any other purposes. This feature is often used when a separate
executable must be used for testing apart from the one at src/wget
2014-01-03 20:32:06 +01:00
7effa90359 Support programatically setting Handler class variables 2014-01-03 20:32:06 +01:00
7e1f4c1abc Correct the call to stop_HTTP_Server 2014-01-03 20:32:06 +01:00
f616192dfd Improve error handling when wget executable isn't available 2014-01-03 20:32:06 +01:00
31868fed6c Split large function to improve readability and extensibility 2014-01-03 20:32:06 +01:00
59a03f15dd Add new configure option, --enable-race-checking
This commit adds a new configure option, --enable-race-checking
which is to be used exclusively for debugging. Also, conditionally
add tests to XFAIL_TESTS when Race Checking is enabled.
2013-12-04 20:45:44 +01:00
d9f1cd05c1 testenv: Remove Test--spider-r.py from XFAIL_TESTS 2013-10-14 00:23:41 +02:00
89024dda4f testenv: fix make dist 2013-10-06 19:33:19 +02:00
7743384820 Update documentation to reflect changes in code 2013-09-17 03:15:01 +05:30
b703633715 Add feature that allows to ensure that Wget correctly crawls the website in recursive mode 2013-09-16 21:06:20 +05:30
0758f47954 Add new test for recursive spider mode 2013-09-16 21:06:20 +05:30
43bb61b4e3 Smartly guess content type header 2013-09-16 21:06:20 +05:30
d4d0e6378c Support substring replace in File Contents too 2013-09-16 21:06:20 +05:30
8b1a9b6de7 Extend Functionality to support spawning multiple servers 2013-09-16 21:06:20 +05:30
e84192a8d3 Use the provided calls to shutdown server instead of rewriting it 2013-09-10 12:27:00 +05:30
99659f3295 Improve Documentation 2013-09-10 12:26:34 +05:30
cb94e52d0f Slight code cleanup. Remove unused code 2013-09-07 17:33:54 +05:30
886ac1a89b Shift to new Threading Model from Multiprocessing model
This eliminated the use of Global Variables from the HTTPServer module
and uses the more correct threading.Threads module to spawn a new
server. However, on multi-core systems, the performance may deteriorate
when too many servers are launched due to CPython implementation of GIL.

Many artefacts from the old model still remain, sometimes as commenst,
else as executable code. These will be cleaned up soon
2013-09-07 17:33:54 +05:30
e74c2ec25e Add new test for POST Requests 2013-09-07 17:33:54 +05:30
48644f174e Print diff when file contents don't match 2013-09-07 17:33:53 +05:30
b6f9efe7b5 Add tests for Cookie support 2013-09-07 17:33:53 +05:30
4c9e6b4f71 Document pending work 2013-09-07 17:33:53 +05:30
e13bc90211 Add new test to ensure Content Disposition and Auth work together 2013-09-07 17:33:53 +05:30
60d1f4d1ad Add new Test for Continue command 2013-09-07 17:33:53 +05:30
738b299419 Add test, Test-Head 2013-09-07 17:33:53 +05:30
9b9d16b2f3 Edit non-unique TEST_NAME variable 2013-09-07 17:33:53 +05:30