load("@rules_python//python:defs.bzl", "py_test") filegroup( name = "expected", srcs = glob( [ "data/**", "jsonchecker/**", ], exclude = ["**/*.json"], ), ) [py_test( name = "runjson_%s_test" % "_".join(f.split("/")), srcs = ["runjsontests.py"], args = [ "--with-json-checker", "$(location //src/jsontestrunner:jsontestrunner)", "$(location :%s)" % f, ], data = [ ":expected", "//src/jsontestrunner", ":%s" % f, ], main = "runjsontests.py", tags = ["no-sandbox"], ) for f in glob(["**/*.json"])]