Don't enter test subdirectories if BUILD_TESTING=OFF
Summary:
The proposed change to ECMAddTest was reverted because it led to failures
with subsequent calls depending on then nonexisting test targets. Instead,
just make the test subdirectories conditional on BUILD_TESTING.
Reviewers: Frameworks
Tags: Frameworks
Differential Revision: https://phabricator.kde.org/D7328