I've reviewed testbuild.sh (the active document) as well as the related cibuild.sh script, and I've found a few significant issues. Here are the main problems with the code:
In tools/ci/cibuild.sh, the script claims to support all testbuild.sh options via the -* catch-all. However, the while loop completely breaks on any option that requires an argument (like -j 4 or -a appsdir).
# cibuild.sh
-* )