|
|
| 754 |
path_cmd = os.path.join (NS3_BUILDDIR, shell_command) |
754 |
path_cmd = os.path.join (NS3_BUILDDIR, shell_command) |
| 755 |
|
755 |
|
| 756 |
if valgrind: |
756 |
if valgrind: |
| 757 |
cmd = "valgrind --suppressions=%s --leak-check=full --show-reachable=yes --error-exitcode=2 %s" % (suppressions_path, |
757 |
cmd = "valgrind --suppressions=%s --leak-check=full --show-reachable=yes --error-exitcode=2 --errors-for-leak-kinds=all %s" % (suppressions_path, |
| 758 |
path_cmd) |
758 |
path_cmd) |
| 759 |
else: |
759 |
else: |
| 760 |
cmd = path_cmd |
760 |
cmd = path_cmd |
|
|
| 781 |
print(stderr_results) |
781 |
print(stderr_results) |
| 782 |
retval = 1 |
782 |
retval = 1 |
| 783 |
|
783 |
|
| 784 |
# |
|
|
| 785 |
# valgrind sometimes has its own idea about what kind of memory management |
| 786 |
# errors are important. We want to detect *any* leaks, so the way to do |
| 787 |
# that is to look for the presence of a valgrind leak summary section. |
| 788 |
# |
| 789 |
# If another error has occurred (like a test suite has failed), we don't |
| 790 |
# want to trump that error, so only do the valgrind output scan if the |
| 791 |
# test has otherwise passed (return code was zero). |
| 792 |
# |
| 793 |
if valgrind and retval == 0 and "== LEAK SUMMARY:" in stderr_results: |
| 794 |
retval = 2 |
| 795 |
|
| 796 |
if options.verbose: |
784 |
if options.verbose: |
| 797 |
print("Return code = ", retval) |
785 |
print("Return code = ", retval) |
| 798 |
print("stderr = ", stderr_results) |
786 |
print("stderr = ", stderr_results) |