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

Various test fixes and improvements
ci android branch for build #4599.3