t: implement similar tests with a function

Use a function to clean up, run `fcm make` to build a hello world
program and run the executable. Test the output of the executable.
Remove debug statements.