patch-tests_bigauto_py 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. $OpenBSD: patch-tests_bigauto_py,v 1.2 2014/09/27 21:46:32 naddy Exp $
  2. --- tests/bigauto.py.orig Thu Apr 27 01:16:04 2000
  3. +++ tests/bigauto.py Sat Sep 27 22:57:00 2014
  4. @@ -1,6 +1,6 @@
  5. #!/usr/bin/env python
  6. -# Copyright © 1997, 1999, 2000 Progiciels Bourbeau-Pinard inc.
  7. -# François Pinard <pinard@iro.umontreal.ca>, 1997.
  8. +# Copyright (c) 1997, 1999, 2000 Progiciels Bourbeau-Pinard inc.
  9. +# Francois Pinard <pinard@iro.umontreal.ca>, 1997.
  10. """\
  11. Produce statistics from the results of the bigauto check.
  12. @@ -48,7 +48,7 @@ def create_data(name, recode_options, charset_options)
  13. charsets = []
  14. for line in os.popen('recode -l').readlines():
  15. charset = string.split(line)[0]
  16. - if charset[0] in ':/':
  17. + if charset[0] in ':/' or charset == 'data' or charset == 'tree':
  18. continue
  19. charsets.append(charset)
  20. # Do the work, calling a subshell once per `before' value.
  21. @@ -81,16 +81,20 @@ class Report:
  22. lensep = len(os.linesep)
  23. line = readline()
  24. while line:
  25. - type, request = string.split(line[:-lensep], ':', 1)
  26. + split = string.split(line[:-lensep], ':', 1)
  27. + type = split[0]
  28. if type == 'Request':
  29. + request = split[1]
  30. steps = self.get_steps(request)
  31. self.count_original_request(steps, request)
  32. line = readline()
  33. if line:
  34. if len(string.split(line[:-lensep], ':', 1)) != 2:
  35. print '*', line,
  36. - type, shrunk_to = string.split(line[:-lensep], ':', 1)
  37. + split = string.split(line[:-lensep], ':', 1)
  38. + type = split[0]
  39. if type == 'Shrunk to':
  40. + shrunk_to = split[1]
  41. steps = self.get_steps(shrunk_to)
  42. self.count_shrunk_request(steps, shrunk_to)
  43. line = readline()