To define a host-side python test that can be run by fx, CI and CQ:
fx
group("tests")
python_host_test
($host_toolchain)
Here is an example BUILD.gn.