]> git.openstreetmap.org Git - nominatim.git/commitdiff
collect coverage for /website directory as well
authorSarah Hoffmann <lonvia@denofr.de>
Fri, 15 Jan 2021 19:27:14 +0000 (20:27 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Fri, 15 Jan 2021 19:27:14 +0000 (20:27 +0100)
test/bdd/steps/cgi-with-coverage.php
test/bdd/steps/steps_api_queries.py

index 47d3cc9ac6760c248cda6a0f56a33f726b302a90..80f898a3f400430dc4d5bdf4792a1ee356d52bae 100644 (file)
@@ -10,7 +10,8 @@ function coverage_shutdown($oCoverage)
 }
 
 $covfilter = new SebastianBergmann\CodeCoverage\Filter();
-$covfilter->addDirectoryToWhitelist($_SERVER['COV_PHP_DIR']);
+$covfilter->addDirectoryToWhitelist($_SERVER['COV_PHP_DIR'].'/lib');
+$covfilter->addDirectoryToWhitelist($_SERVER['COV_PHP_DIR'].'/website');
 $coverage = new SebastianBergmann\CodeCoverage\CodeCoverage(null, $covfilter);
 $coverage->start($_SERVER['COV_TEST_NAME']);
 
index a56081c03109765272bc234fc1364a622f0d0c65..fd263af72c5564581f1f46fe56dc462c16c19fa1 100644 (file)
@@ -105,7 +105,7 @@ def send_api_query(endpoint, params, fmt, context):
     cmd = ['/usr/bin/env', 'php-cgi', '-f']
     if context.nominatim.code_coverage_path:
         env['COV_SCRIPT_FILENAME'] = env['SCRIPT_FILENAME']
-        env['COV_PHP_DIR'] = os.path.join(context.nominatim.src_dir, "lib")
+        env['COV_PHP_DIR'] = context.nominatim.src_dir
         env['COV_TEST_NAME'] = '%s:%s' % (context.scenario.filename, context.scenario.line)
         env['SCRIPT_FILENAME'] = \
                 os.path.join(os.path.split(__file__)[0], 'cgi-with-coverage.php')