MyRocks 5.6.35 and 8.0.28 adds the unittest directory based on the value of WITH_EMBEDDED_SERVER.
It should do this based on the value of WITH_UNIT_TESTS. See how storage/perfschema does this for 5.6 and for 8.0.
In contrast to what MyRocks does in 5.6 and in 8.0.