blob: 53d428cc3d6f08d119760ed03d9e6dca475a6d99 [file] [log] [blame]
#!/usr/bin/env python
# Copyright (c) 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Tests for
It tests
import argparse
import os
import sys
def CompareFiles(file1, file2):
return file(file1, 'r').read() == file(file2, 'r').read()
def TouchStamp(stamp_path):
dir_name = os.path.dirname(stamp_path)
if not os.path.isdir(dir_name):
with open(stamp_path, 'a'):
os.utime(stamp_path, None)
def main():
parser = argparse.ArgumentParser()
help='Path to touch on success.')
parser.add_argument('files', nargs='+',
help='Files to compare.')
args = parser.parse_args()
passed = True
for i, j in zip(args.files[::2], args.files[1::2]):
passed = passed and CompareFiles(i, j)
if passed and args.stamp:
return not passed
if __name__ == '__main__':