Extract common RPM test builder steps to macro