Source the test-setup script instead of running it.
Remove swap files from failed tests.
Copy the .in file into the test directory.

This helps prevent issues while you're editing one of the test files.