SCons/scons

Some of the msvs tests don't run due to a logic flaw

Closed this issue · 0 comments

As discovered by @jcbrill and mentioned in #4608, some of the tests of building a Visual Studio project file don't run as expected. The tests are

/test/MSVS/vs-files.py
/test/MSVS/vs-scc-files.py
/test/MSVS/vs-scc-legacy-files.py
/test/MSVS/vs-variant_dir.py

In PR #3409, these were made to wrap multiple similar versions to avoid duplicating test code.

The loop that runs these tests ends with test.pass_test(), which quits the running test at that point, as a result only the first pass through the loop actually runs (the current expected list is ['8.0', '9.0', '10.0', '11.0', '12.0', '14.0', '14.1', '14.2', '14.3'], so it misses quite a bit).

In one of the above tests, /test/MSVS/vs-files.py each time through the loop also sets something intentionally strange in os.environ['PYTHON_ROOT'], so that also needs to be reset before proceeding or the next pass through the loop will fail.