Fix conditional execution of unit tests