This is an updated version of https://reviews.llvm.org/D22144 by @jlpeyton. The patch was accepted but not landed. This is useful functionality and I would like to use this to enable lit tests for environment variable behaviour. Differential Revision: https://reviews.llvm.org/D36403 llvm-svn: 311180
9 lines
146 B
Python
9 lines
146 B
Python
#!/usr/bin/env python
|
|
|
|
import os
|
|
|
|
sorted_environment = sorted(os.environ.items())
|
|
|
|
for name,value in sorted_environment:
|
|
print name,'=',value
|