Changed placeholder for automatic generated mocks

This commit is contained in:
slush0 2016-09-27 16:47:30 +02:00 committed by Pavol Rusnak
parent 76d8be3395
commit d87e4e683d
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
1 changed files with 3 additions and 3 deletions

View File

@ -36,7 +36,7 @@ def store_to_file(dest, parts):
if not os.path.exists(dir_path):
os.makedirs(dir_path)
open(os.path.join(dir_path, '__init__.py'), 'w').close()
open(os.path.join(dir_path, '.mock'), 'w').close()
open(os.path.join(dir_path, '.mock-generated'), 'w').close()
f = open(os.path.join(dir_path, filename + '.py'), 'a')
f.write(line)
@ -63,7 +63,7 @@ def build_directory(dir, dest):
def clear_directory(top_dir):
print("Clearing up directory", top_dir)
for root, dirs, files in os.walk(top_dir, topdown=False):
if '.mock' not in files:
if '.mock-generated' not in files:
#print("Not a mock directory", root)
continue
for name in files:
@ -80,4 +80,4 @@ def clear_directory(top_dir):
if __name__ == '__main__':
clear_directory('../mocks')
build_directory('../extmod', '../mocks')
build_directory('../extmod', '../mocks')