Factory print does not show override

I am performing a factory override in the my test using set_type_override. I am overriding a driver with a new driver extended from the old driver, similar to the following:

my_test extends uvm_test;
  `uvm_component_utils(my_test)

  virtual function void build_phase(uvm_phase phase);
    // set factory override
    old_driver#(<paramters>)::type_id::set_type_override(new_driver#(<parameters>)::get_type());
  endfunction : build_phase

  function void end_of_elaboration_phase(uvm_phase phase);
    factory.print();
  endfunction

endclass

However, the simulation log shows the factory override did not work:

#### Factory Configuration (*)
#
# No instance overrides are registered with this factory
#
# Type Overrides:
#
#   Requested Type  Override Type
#   --------------  -------------
#   <unknown>       <unknown>

Is there a correct phase the factory information should be printed?

It is showing you that there is a type override. The problem is when using the `uvm_component_param_utils macros, no string name gets registered with the factory and it just prints <unknown> for the name. You might want to read Parameterized Classes, Static Members and the Factory Macros - Verification Horizons.

If the type override is not working for you, check that the parameters in the old_driver#(<paramters>)::type_id::set_type_override match the ones in old_driver#(<paramters>)::type_id::create()

I found that the type override is working because I used distinctive uvm_info messages. So, the override is working.

It would be helpful to allow string names for parameterized classes to be registered with the factory. A simple print of the factory can confirm the override has taken place. Is there a work-around for this?

Check the link I gave in my previous response.