Fix error when using simulator test with pre-defined environment variable
authorPascal Merz <pascal.merz@me.com>
Wed, 11 Nov 2020 23:38:46 +0000 (16:38 -0700)
committerPascal Merz <pascal.merz@me.com>
Wed, 2 Dec 2020 08:10:44 +0000 (08:10 +0000)
commitd570ffa4dc2ad5871249beee0bbcccdc9dc9a3e2
treea5577b0b985ef044bdf1949b1129462cf82277f2
parent05f02ab8256df8ad3bc3e8464e709f42962c9e9e
Fix error when using simulator test with pre-defined environment variable

The simulator test compares the results of functionality implemented in
both the legacy and the modular simulator by running two simulations using
the environment variables GMX_DISABLE_MODULAR_SIMULATOR and
GMX_USE_MODULAR_SIMULATOR to cover both code paths. If one of these
variables was already present in the test sytem, the tests would fail with
an error.

This change backs up the current state of both variables, disables them,
runs the tests, and resets them to their previous state (if any).
src/programs/mdrun/tests/simulator.cpp