fix unit test for all operating systems
use some self-defined env var
Differential Revision: https://phabricator.kde.org/D21861