unittest: the tweaked appMain.c could be used as the unittesting execution