gitweb/lib - Use locking to avoid 'cache miss stampede' problem
[git/jnareb-git.git] / t / t9505-gitweb-cache.sh
blob181577f42fd6c698c568cf996e09a788bdc6fb50
1 #!/bin/sh
3 # Copyright (c) 2010 Jakub Narebski
6 test_description='gitweb cache
8 This test checks GitwebCache::CacheOutput Perl module that is
9 responsible for capturing and caching gitweb output.'
11 # for now we are running only cache interface tests
12 . ./test-lib.sh
14 # this test is present in gitweb-lib.sh
15 if ! test_have_prereq PERL; then
16 skip_all='perl not available, skipping test'
17 test_done
20 "$PERL_PATH" -MTest::More -e 0 >/dev/null 2>&1 || {
21 skip_all='perl module Test::More unavailable, skipping test'
22 test_done
25 "$PERL_PATH" -MCapture::Tiny -e 0 >/dev/null 2>&1 || {
26 skip_all='perl module Capture::Tiny unavailable, skipping test'
27 test_done
30 # ----------------------------------------------------------------------
32 # The external test will outputs its own plan
33 test_external_has_tap=1
35 test_external \
36 'GitwebCache::CacheOutput Perl API (in gitweb/lib/)' \
37 "$PERL_PATH" "$TEST_DIRECTORY"/t9505/test_cache_output.pl
39 test_done