various test fixes and improvements
Merge pull request #2664 from sebv/master

Various test fixes and improvements
ci gappium branch for build #4599.5