Sign in
qemu
/
meson
/
7b43a2e19613f3702935872b21b1020f7d8c6a9b
/
.
/
test cases
/
common
/
274 environment
/
testenv.py
blob: 1a59b8237c52ab05852481ecaeb0e504073de1c1 [
file
] [
log
] [
blame
]
#!/usr/bin/env python3
import
os
import
sys
key
=
sys
.
argv
[
1
]
expected
=
sys
.
argv
[
2
]
if
len
(
sys
.
argv
)
>
2
else
None
if
os
.
environ
.
get
(
key
)
==
expected
:
sys
.
exit
(
0
)
sys
.
exit
(
f
'Expected {expected!r}, was {os.environ.get(key)!r}'
)