Add COMPONENT_TEST_DIR variable (Merge from upstream).