runtest/test_suite-cache.shtest test assumes the order of cmake
arguments but some of these are stored in the same dictionary which does
not guarantee any specific ordering. This causes the test to fail on
Python 3.
In particular, CMAKE_C_COMPILER and CMAKE_CXX_COMPILER must come first
but can be in any particular order between each other, then cmake cache
option is expected to come next followed by other option in any
particular order. Since there is no good reason to have arguments in a
given group of option sorted, this commit adapts the testcase to accept
any order by testing each group of argument in a separate FileCheck
invocation.
My reading from this
is that we may still want to check that the compilers and the cache appear in the specific order (right after the cmake).
The other ones, whose order is unpredictable, (-DFOO=BAR, -DBAR=BAZ) we do want to check them individually,
Does this make sense?