Browse Source

Merge pull request #155 from PQClean/diff-duplicate-consistency

Make diffs in dup_consistency files part of scheme
master
Thom Wiggers 5 years ago
committed by GitHub
parent
commit
cf0a4dcd54
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      test/helpers.py

+ 5
- 1
test/helpers.py View File

@@ -173,13 +173,17 @@ def permit_test(testname, thing, *args, **kwargs):
for diff_line in diff_result.stdout.decode('utf-8').splitlines():
# don't skip test if there are any changes outside schemes
if (not diff_line.startswith('crypto_kem') and
not diff_line.startswith('crypto_sign')):
not diff_line.startswith('crypto_sign') and
not diff_line.startswith(os.path.join('test', 'duplicate_consistency'))):
logging.info("Running all tests as there are changes "
"outside of schemes")
return True
# do test if the scheme in question has been changed
if diff_line.startswith(thing.path(base='')):
return True
# do test if the scheme's duplicate_consistency files have been changed
if diff_line.startswith(os.path.join('test', 'duplicate_consistency', scheme.name.lower())):
return True
# there were no changes outside schemes, and the scheme in question had no diffs
return False



Loading…
Cancel
Save