Created
January 4, 2018 16:01
-
-
Save fredkingham/6089a7f62dc592c84a95e954cac7913a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Compare | |
| """ | |
| test = [[c for c in p.split(' ') if c] for p in open('test.pkg', 'r').readlines() if p != '\n'] | |
| prod = [[c for c in p.split(' ') if c] for p in open('prod.pkg', 'r').readlines() if p != '\n'] | |
| prodversions = {} | |
| for p in prod: | |
| prodversions[p[1]] = p[2] | |
| versionbreaks = [] | |
| missing = [] | |
| for p in test: | |
| if p[1] in prodversions: | |
| if p[2] != prodversions[p[1]]: | |
| versionbreaks.append((p[1], prodversions[p[1]], p[2])) | |
| else: | |
| missing.append((p[1], p[2])) | |
| if len(missing) > 0: | |
| print '*' * 80 | |
| print '*' * 80 | |
| print '*' * 80 | |
| print 'Packages on elCIDT not on ELCIDL:' | |
| print '(packagename, testversion)' | |
| print '*' * 80 | |
| print '*' * 80 | |
| print '*' * 80 | |
| for p in missing: | |
| print p | |
| if len(versionbreaks) > 0: | |
| print '*' * 80 | |
| print '*' * 80 | |
| print '*' * 80 | |
| print 'Packages with differing versions, elCIDl vs. elCIDT' | |
| print '(packagename, prodversion, testversion)' | |
| print '*' * 80 | |
| print '*' * 80 | |
| print '*' * 80 | |
| for p in versionbreaks: | |
| print p | |
| print '*' * 80 | |
| print '*' * 80 | |
| print '*' * 80 | |
| print len(missing), 'missing packages' | |
| print len(versionbreaks), 'packages with differing versions' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment