Optimizing Test to Enable Diagnosis-Driven Yield Analysis