added test mode flag in shared.h