task_test is only needed for test targets

Change-Id: Ib2e348f858c5ebba91cba2bf781cdb02f0120c46
(cherry picked from commit f20ab7b594cb59a0e356a30478fead8b69b88db8)
Merge "task_test is only needed for test targets" into R1.10