scons: Ensure dictionary iteration is sorted by key

This patch adds sorting based on the SimObject name or parameter name
for all situations where we iterate over dictionaries. This should
ensure a deterministic and consistent order across the host systems
and hopefully avoid regression results differing across python
versions.
This commit is contained in:
Andreas Hansson
2014-12-02 06:08:22 -05:00
parent 5d22250845
commit 966c3f4bc5
3 changed files with 9 additions and 9 deletions

View File

@@ -216,7 +216,7 @@ use_prefixes = [
]
use_env = {}
for key,val in os.environ.iteritems():
for key,val in sorted(os.environ.iteritems()):
if key in use_vars or \
any([key.startswith(prefix) for prefix in use_prefixes]):
use_env[key] = val