[release, am2cmake] Fixes not traversing directories listed in SUBDIRS after test.
(cherry picked from commit 4120a7f37e36f58e8b6b0bf0185351009053493b)

Signed-off-by: Markus Blatt <markus@dr-blatt.de>
[release,cmake] Use uppercase for CMake type in variables.
(cherry picked from commit 6a2cf7daa10b734ed1e84ab0f15e9e968ae19275)

Signed-off-by: Markus Blatt <markus@dr-blatt.de>