Split executeShTest into two parts so that it can be better leveraged by libc++