The Meson Build System
http://mesonbuild.com/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
557 B
26 lines
557 B
4 years ago
|
#!/usr/bin/env python3
|
||
|
|
||
|
import argparse
|
||
|
import subprocess
|
||
|
import sys
|
||
|
|
||
|
|
||
|
def main() -> None:
|
||
|
parser = argparse.ArgumentParser()
|
||
|
parser.add_argument('command')
|
||
|
parser.add_argument('expected')
|
||
|
args = parser.parse_args()
|
||
|
|
||
|
out = subprocess.run(args.command, stdout=subprocess.PIPE)
|
||
|
actual = out.stdout.decode().strip()
|
||
|
|
||
|
if args.expected != actual:
|
||
|
print('expected:', args.expected, file=sys.stderr)
|
||
|
print('actual: ', actual, file=sys.stderr)
|
||
|
sys.exit(1)
|
||
|
sys.exit(0)
|
||
|
|
||
|
|
||
|
if __name__ == "__main__":
|
||
|
main()
|