Yes, that technique will work, and switching to Python then opens you to the opportunity to write your tests in C or in Python using the Python ctypes library, and would allow you to use either "py.test" or "nose" to automatically discover, execute, and parallelize your tests.
Using that technique would also let you easily write the success / failure status of your tests in JUnit output format so that you could have "success", "unstable", and "failed" states for your builds, where "success"
means everything compiled and all tests passed, "unstable" means everything compiled and some tests failed, and "failed" means that compilation failed.
There is a "testing in python" mailing list which can help with questions about py.test and nose.
Mark Waite