test-abidiff-exit: Do not use debuginfo dir when its empty

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>
This commit is contained in:
Dodji Seketeli 2023-09-26 09:35:53 +02:00
parent 727452167e
commit 528ed9fe55
1 changed files with 6 additions and 2 deletions

View File

@ -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();