Infrastructure for per-phase tests, with inline source as a string.