* always run with a clean cache
* in the future we should structure the tests so they run twice, once with a clean cache and then again with a populated one, but for now a clean cache should catch more bugs
* stop requiring a file cache path for tests; just use
* fix exit codes to match documentation at the top of the file: 1 is a test failure, 2 is bad args
Squash-merge of my #198.
We are going to need some nginx-specific system tests, and this seemed like a
good place to start. This adds two tests, as well as some infrastructure. With
Squash-merge of my #194 and #195
Makes sure we use the LoopbackRouteFetcher, and also wires up AddHeadersFetcher.
Note that this pulls in loopback_route_fetcher.cc from svn revision r2649
The LoopbackRouteFetcher is applied unconditionally, while in mod_pagespeed it
is not applied when one of these configuration settings is true:
* disable_loopback_routing
* slurping_enabled, or
* test_proxy is set
I added a TODO for that.
(Sqash-merge of Otto's #193.)
This wires up cleanup code shared memory segments.
It uses slightly modified copies of pthread_shared_mem.cc/h, containing a change
proposal to support our ordering of events during a configuration reload.
It can be tested and reviewed through this branch.
I did some extensive tests, it seems segment cleanup is not perfect yet
(segments for named locks, per vhost statistics segments). I think we need to
fix that in the trunk-tracking branch or in a separate pull though. It seems the
current trunk of psol has improvements that may fix this, and fixing it in this
pull will make it larger and more complex then I would like it to be.
Squash-merge of Otto's #179.
This allows viewing the last few messages written to the SharedCircularBuffer in
NgxMessageHandler through url /ngx_pagespeed_message
Related issue: https://github.com/pagespeed/ngx_pagespeed/issues/153
Squash-merge of Otto's #180.
This adds /ngx_pagespeed_statistics. It also uses SharedMemoryStatistics instead
of the SimpleStatistics currently used, and sets them as the default. It also
adds support for tracking per server{} statistics.
Cleaning up of shared segments is disabled, because the current psol version we
link in has a problem with the ordering of nginx's events during a configuration
reload.
The referrer statistics will be ported in a separate pull.
Related to issue #133
Squash-merge of Otto's work in #176.
This adds an NgxMessageHandler, that uses ngx_log_error to output messages. It
is heavily based on apache_message_handler from mod_pagespeed.
It falls back to an internal GoogleMessageHandler if the required initialisation
has not been performed yet.
It can also install a crash handler, that will try to log a backtrace upon
receiving certain signals. In preparation of us porting /ngx_pagespeed_messages,
it also keeps the last few messages in a SharedCircularBuffer
(Squash-merge of Otto's #163)