fixed test suite script and added logic to figure out env