when test, just remove #[main] attr
Merge pull request #4497 from ILyoan/i4488

When building a test runner, don't remove the main function