Fix incorrect variable name for turning off building tests

Variable name that was being checked didn't match variable name being set to control building tests