extract main from test, one for all files.