From c90a72e14db2250f35e3f8ad4658426f02cb079e Mon Sep 17 00:00:00 2001 From: Marcus Hoffmann Date: Sun, 30 Aug 2020 20:06:00 +0200 Subject: [PATCH] scanner: check for `test` in path relative to build dir This was degrading scanner errors to warnings whenever the path from the current running install of fdroidserver contained test, as has been happening in the CI image builder: https://gitlab.com/fdroid/ci-images-server/-/blob/master/test#L6 --- fdroidserver/scanner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fdroidserver/scanner.py b/fdroidserver/scanner.py index 4b0c4be0..8b1a31cf 100644 --- a/fdroidserver/scanner.py +++ b/fdroidserver/scanner.py @@ -234,7 +234,7 @@ def scan_source(build_dir, build=metadata.Build()): return ignoreproblem(what, path_in_build_dir) if todelete(path_in_build_dir): return removeproblem(what, path_in_build_dir, filepath) - if 'src/test' in filepath or '/test/' in filepath: + if 'src/test' in filepath or '/test/' in path_in_build_dir: return warnproblem(what, path_in_build_dir) if options and 'json' in vars(options) and options.json: json_per_build['errors'].append([what, path_in_build_dir])