Backport improvements to updatecodeTest