]> sourceware.org Git - libabigail.git/commitdiff
Report change locations in leaf reports
authorDodji Seketeli <dodji@redhat.com>
Fri, 16 Mar 2018 13:43:14 +0000 (14:43 +0100)
committerDodji Seketeli <dodji@redhat.com>
Fri, 16 Mar 2018 14:00:03 +0000 (15:00 +0100)
While working on something else, I noticed that in the leaf report,
source locations of changed ABI artifacts are not reported, even when
they should.

This patch fixes that.

* src/abg-leaf-reporter.cc (report_diffs): Report the source
location of the diff.
* tests/data/test-diff-filter/test42-leaf-report-output-0.txt:
Update test reference output.
* tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-3.txt:
Likewise.
* tests/data/test-diff-suppr/test35-leaf-report-0.txt: Likewise.
* tests/data/test-diff-suppr/test36-leaf-report-0.txt: Likewise.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
src/abg-leaf-reporter.cc
tests/data/test-diff-filter/test42-leaf-report-output-0.txt
tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-3.txt
tests/data/test-diff-suppr/test35-leaf-report-0.txt
tests/data/test-diff-suppr/test36-leaf-report-0.txt

index 81bdeb32733ced8c16eac03358a3b6cd4b24cfbd..bff7df356b701ad33a5b7222716734649990b32e 100644 (file)
@@ -74,7 +74,14 @@ report_diffs(const reporter_base& r,
            out << "\n\n";
 
          string n = i->second->first_subject()->get_pretty_representation();
-         out << indent << "'" << n << "' changed:\n";
+
+         out << indent << "'" << n ;
+
+         report_loc_info(i->second->first_subject(),
+                         *i->second->context(), out);
+
+         out << "' changed:\n";
+
          i->second->get_canonical_diff()->report(out, indent + "  ");
          out << "\n";
          started_to_emit = true;
index c1f806b317121f9fe31ccb9472683a38d5809e7a..16f5ce03194fd98ac2e0902ffaada5d08e2ecaaa 100644 (file)
@@ -2,7 +2,7 @@ Leaf changes summary: 1 artifact changed
 Added/removed functions summary: 0 Removed, 0 Added function
 Added/removed variables summary: 0 Removed, 0 Added variable
 
-'struct leaf' changed:
+'struct leaf at test42-leaf-report-v0.cc:4:1' changed:
   type size changed from 32 to 64 bits
   1 data member insertion:
     'char leaf::m1', at offset 32 (in bits) at test42-leaf-report-v1.cc:7:1
index d157e4249d87de83ef51812b7b4c0c51fefb3bca..f06af83a6ea4c4389a0bb72afe38975060266af5 100644 (file)
@@ -18,7 +18,7 @@ Leaf changes summary: 2 artifacts changed (7 filtered out)
     [A] 'function void spice_server_set_playback_rate(SpicePlaybackInstance*, uint32_t)'    {spice_server_set_playback_rate@@SPICE_SERVER_0.12.5}
     [A] 'function void spice_server_set_record_rate(SpiceRecordInstance*, uint32_t)'    {spice_server_set_record_rate@@SPICE_SERVER_0.12.5}
 
-  'enum __anonymous_enum__' changed:
+  'enum __anonymous_enum__ at spice.h:471:1' changed:
     type size hasn't changed
     7 enumerator deletions:
       '__anonymous_enum__::SPICE_IMAGE_COMPRESS_INVALID' value '0'
@@ -43,7 +43,7 @@ Leaf changes summary: 2 artifacts changed (7 filtered out)
     2 impacted interfaces:
       function spice_image_compression_t spice_server_get_image_compression(SpiceServer*)
       function int spice_server_set_image_compression(SpiceServer*, spice_image_compression_t)
-  'typedef spice_image_compression_t' changed:
+  'typedef spice_image_compression_t at spice.h:479:1' changed:
     typedef name changed from spice_image_compression_t to SpiceImageCompression at enums.h:197:1
 
     2 impacted interfaces:
index 4bcf686e2f638334982a79346990d3a74729da37..877a3444baf5dd7d4058266834cbcf6f9a0c8d5b 100644 (file)
@@ -2,7 +2,7 @@ Leaf changes summary: 1 artifact changed (1 filtered out)
 Added/removed functions summary: 0 Removed, 0 Added function
 Added/removed variables summary: 0 Removed, 0 Added variable
 
-'struct leaf' changed:
+'struct leaf at test35-leaf-v0.cc:5:1' changed:
   type size changed from 32 to 64 bits
   1 data member insertion:
     'char leaf::m1', at offset 32 (in bits) at test35-leaf-v1.cc:8:1
index a9d682a27100ed5386a2cd51cd42750e112e353f..52c818312b73ebad7723eb31c67a249c9b71c4c4 100644 (file)
@@ -2,7 +2,7 @@ Leaf changes summary: 2 artifacts changed
 Added/removed functions summary: 0 Removed, 0 Added function
 Added/removed variables summary: 0 Removed, 0 Added variable
 
-'struct leaf2' changed:
+'struct leaf2 at test36-leaf-v0.cc:9:1' changed:
   type size changed from 64 to 96 bits
   there are data member changes:
    'leaf1 leaf2::member0' size changed from 32 to 64 (in bits) (by +32 bits)
@@ -14,7 +14,7 @@ Added/removed variables summary: 0 Removed, 0 Added variable
     function void interface3(struct_type**)
 
 
-'struct leaf1' changed:
+'struct leaf1 at test36-leaf-v0.cc:4:1' changed:
   type size changed from 32 to 64 bits
   1 data member insertion:
     'char leaf1::m1', at offset 32 (in bits) at test36-leaf-v1.cc:7:1
This page took 0.041587 seconds and 5 git commands to generate.