change -all to -testall; add code for non-OSX use