Advertisement
Guest User

Untitled

a guest
Nov 2nd, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. #!/usr/bin/env python3
  2.  
  3. # Script to update buildstream tests in the ./tests/cachekey/project
  4. # directory.
  5. #
  6. # First, run:
  7. #
  8. # bst show target.bst --format "%{name} %{full-key}"
  9. #
  10. # And copy the output to a file named 'changes'.
  11. #
  12. # Next run this script and all the .expected files will be updated.
  13.  
  14. import os
  15. for line in open('changes').readlines():
  16. element, cachekey = line.strip().split(' ', 2)
  17. expected = os.path.splitext(element)[0] + '.expected'
  18.  
  19. with open(expected, 'w') as f:
  20. f.write(cachekey + '\n')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement