public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [PATCH, applied] test-abidiff-exit: Do not use debuginfo dir when its empty
@ 2023-10-03  9:40 Dodji Seketeli
  0 siblings, 0 replies; only message in thread
From: Dodji Seketeli @ 2023-10-03  9:40 UTC (permalink / raw)
  To: libabigail

From 528ed9fe557ec73e11a7d5c0c9a396cc0c972b1d Mon Sep 17 00:00:00 2001
From: Dodji Seketeli <dodji@redhat.com>
Date: Tue, 26 Sep 2023 09:35:53 +0200
Subject: 

If the debug info dir is empty in the input test specifier, the abidiff
command should not add any --debug-info-dir{1,2} option.  Fixed thus.

	* tests/test-abidiff-exit.cc (main): If debug info dir is empty in
	the input test specifier, do not try to use it in the abidiff
	command.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
Applied to master.
---
 tests/test-abidiff-exit.cc | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tests/test-abidiff-exit.cc b/tests/test-abidiff-exit.cc
index a6d54e5c..e539242a 100644
--- a/tests/test-abidiff-exit.cc
+++ b/tests/test-abidiff-exit.cc
@@ -1092,8 +1092,12 @@ main()
 	bool is_ok = true;
 	in_elfv0_path = source_dir_prefix + s->in_elfv0_path;
 	in_elfv1_path = source_dir_prefix + s->in_elfv1_path;
-	in_elfv0_debug_dir = source_dir_prefix + s->in_elfv0_debug_dir;
-	in_elfv1_debug_dir = source_dir_prefix + s->in_elfv1_debug_dir;
+	in_elfv0_debug_dir.clear();
+	in_elfv1_debug_dir.clear();
+	if (s->in_elfv0_debug_dir && strcmp(s->in_elfv0_debug_dir, ""))
+	  in_elfv0_debug_dir = source_dir_prefix + s->in_elfv0_debug_dir;
+	if (s->in_elfv1_debug_dir && strcmp(s->in_elfv1_debug_dir, ""))
+	  in_elfv1_debug_dir = source_dir_prefix + s->in_elfv1_debug_dir;
 	in_elfv0_headers_dirs.clear();
 	in_elfv1_headers_dirs.clear();
 	in_elfv0_added_bins_dir.clear();
-- 
2.39.3


-- 
		Dodji


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-10-03  9:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-03  9:40 [PATCH, applied] test-abidiff-exit: Do not use debuginfo dir when its empty Dodji Seketeli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).