Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python3
- # Script to update buildstream tests in the ./tests/cachekey/project
- # directory.
- #
- # First, run:
- #
- # bst show target.bst --format "%{name} %{full-key}"
- #
- # And copy the output to a file named 'changes'.
- #
- # Next run this script and all the .expected files will be updated.
- import os
- for line in open('changes').readlines():
- element, cachekey = line.strip().split(' ', 2)
- expected = os.path.splitext(element)[0] + '.expected'
- with open(expected, 'w') as f:
- f.write(cachekey + '\n')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement