[BUG #8618] migrated xml and variant optimization tests and added 'variants' optimization to build-all job