[18.09 backport] Makefile and test changes Upstream-commit: bad2185b9909c5083cdaf673d2d84a707d1927b9 Component: engine