Change order of dependencies for runtests target.
Move regression test.py body into a main() function to avoid pytest picking it up during collection if run from test/.
Move a few more test.py bodies into main functions.
Move the rest of test/ .py file bodies into main functions.