File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,12 @@ def pytest_addoption(parser):
38
38
type = str ,
39
39
help = "When provided this url will be used instead of the backend listed in the benchmark json files." ,
40
40
)
41
+ parser .addoption (
42
+ "--backend-filter" ,
43
+ action = "store" ,
44
+ type = str ,
45
+ help = "A regex patter to filter the available scenarios by backend." ,
46
+ )
41
47
42
48
43
49
def pytest_ignore_collect (collection_path , config ):
Original file line number Diff line number Diff line change 1
1
import logging
2
+ import re
2
3
from pathlib import Path
3
4
4
5
import openeo
@@ -36,6 +37,10 @@ def test_run_benchmark(
36
37
track_metric ("scenario_id" , scenario .id )
37
38
# Check if a backend override has been provided via cli options.
38
39
override_backend = request .config .getoption ("--override-backend" )
40
+ backend_filter = request .config .getoption ("--backend_filter" )
41
+ if backend_filter and not re .match (backend_filter , scenario .backend ):
42
+ #TODO apply filter during scenario retrieval, but seems to be hard to retrieve cli param
43
+ pytest .skip (f"skipping scenario { scenario .id } because backend { scenario .backend } does not match filter { backend_filter !r} " )
39
44
backend = scenario .backend
40
45
if override_backend :
41
46
_log .info (f"Overriding backend URL with { override_backend !r} " )
You can’t perform that action at this time.
0 commit comments