Updated build.sh
Add functional tests