tests: build some tests depending on the used backend
Build a test only when the backend used for it (e.g. fakehw, hal) is built. Otherwise, the test always fails.