cmake: refactor cmake testing path.

Signed-off-by: Emmanuel Roullit <emmanuel.roullit@gmail.com>