tests: Convert do-if.sh test to use Autotest.