2017-10-20 17:48:01 +02:00
|
|
|
#!/usr/bin/env python
|
|
|
|
"""Make sure the Azure requirements files match."""
|
2019-07-12 08:46:20 +02:00
|
|
|
from __future__ import (absolute_import, division, print_function)
|
|
|
|
__metaclass__ = type
|
2017-10-20 17:48:01 +02:00
|
|
|
|
|
|
|
import filecmp
|
2018-02-28 00:05:39 +01:00
|
|
|
import os
|
2017-10-20 17:48:01 +02:00
|
|
|
|
|
|
|
|
2018-02-28 00:05:39 +01:00
|
|
|
def main():
|
|
|
|
src = 'packaging/requirements/requirements-azure.txt'
|
2019-08-06 23:43:29 +02:00
|
|
|
dst = 'test/lib/ansible_test/_data/requirements/integration.cloud.azure.txt'
|
2018-02-28 00:05:39 +01:00
|
|
|
|
2018-02-28 09:50:00 +01:00
|
|
|
missing = [p for p in [src, dst] if not os.path.isfile(p)]
|
|
|
|
|
|
|
|
if missing:
|
|
|
|
for path in missing:
|
|
|
|
print('%s: missing required file' % path)
|
|
|
|
|
|
|
|
return
|
|
|
|
|
2018-02-28 00:05:39 +01:00
|
|
|
if not filecmp.cmp(src, dst):
|
|
|
|
print('%s: must be identical to `%s`' % (dst, src))
|
|
|
|
|
|
|
|
if os.path.islink(dst):
|
|
|
|
print('%s: must not be a symbolic link' % dst)
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
main()
|