LPS-51439 Refactor compile-test-cmd as a macro

Backport pull at https://github.com/brianchandotcom/liferay-portal-ee/pull/7701

compile-test-cmd is already a macro in plugins, no need to change for it.