patch-testsuite_driver_testlib_py 1.6 KB

12345678910111213141516171819202122232425262728293031323334
  1. $OpenBSD: patch-testsuite_driver_testlib_py,v 1.7 2015/09/19 07:42:57 kili Exp $
  2. --- testsuite/driver/testlib.py.orig Tue Jul 21 15:52:50 2015
  3. +++ testsuite/driver/testlib.py Sun Aug 9 17:35:53 2015
  4. @@ -1634,6 +1634,13 @@ def compare_outputs( kind, normaliser, expected_file,
  5. actual_raw = read_no_crs(actual_file)
  6. actual_str = normaliser(actual_raw)
  7. + # Strip OpenBSDs linker warnings about strcpy(3) & friends.
  8. + if config.os == 'openbsd':
  9. + actual_str = re.sub('.*: In function .*:\n+(.*:[0-9]+:[0-9]+:\n)?:? *warning: .* is .* misused, please use .*\n',
  10. + '', actual_str)
  11. + actual_str = re.sub('.*/libgmp\.so\.[0-9]*\.[0-9]*: warning: .* is .* misused, please use .*\n',
  12. + '', actual_str)
  13. +
  14. if expected_str == actual_str:
  15. return 1
  16. else:
  17. @@ -1657,13 +1664,13 @@ def compare_outputs( kind, normaliser, expected_file,
  18. # This does mean that the diff might contain changes that
  19. # would be normalised away.
  20. if (config.verbose >= 1):
  21. - r = os.system( 'diff -uw ' + expected_file_for_diff + \
  22. + r = os.system( 'diff -auw ' + expected_file_for_diff + \
  23. ' ' + actual_file )
  24. # If for some reason there were no non-whitespace differences,
  25. # then do a full diff
  26. if r == 0:
  27. - r = os.system( 'diff -u ' + expected_file_for_diff + \
  28. + r = os.system( 'diff -au ' + expected_file_for_diff + \
  29. ' ' + actual_file )
  30. if config.accept: