Skip to content

Commit

Permalink
Enable tests for missing debug packages
Browse files Browse the repository at this point in the history
  • Loading branch information
j-mracek committed Jul 2, 2024
1 parent 914025a commit 5e5a94c
Showing 1 changed file with 15 additions and 48 deletions.
63 changes: 15 additions & 48 deletions dnf-behave-tests/dnf/plugins-core/debuginfo-install.feature
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
@dnf5
Feature: Tests for the debuginfo-install plugin

Background:
Given I use repository "debuginfo-install"

@dnf5
@bz1585137
Scenario: reports an error for a non-existent package
When I execute dnf with args "debuginfo-install non-existent-package"
Expand All @@ -16,21 +16,15 @@ Scenario: reports an error for a non-existent package
--skip-unavailable to skip unavailable packages
"""


Scenario: reports an error for a package without debuginfo
When I execute dnf with args "debuginfo-install nodebug"
Then the exit code is 0
And stdout is
And stderr is
"""
<REPOSYNC>
Could not find debuginfo package for the following available packages: nodebug-1.0-1
Could not find debugsource package for the following available packages: nodebug-1.0-1
Dependencies resolved.
Nothing to do.
Complete!
Could not find debuginfo package for the following packages resolved from the argument 'nodebug': nodebug-0:1.0-1.x86_64
Could not find debugsource package for the following packages resolved from the argument 'nodebug': nodebug-0:1.0-1.x86_64
"""

@dnf5
Scenario: installs latest version debuginfo for a not-installed package
When I execute dnf with args "debuginfo-install foo"
Then the exit code is 0
Expand All @@ -39,7 +33,6 @@ Scenario: installs latest version debuginfo for a not-installed package
| install | foo-debuginfo-0:2.0-1.x86_64 |
| install | foo-debugsource-0:2.0-1.x86_64 |

@dnf5
@bz1586059 @bz1629412
Scenario: installs the same version of debuginfo for an installed package
Given I successfully execute dnf with args "install foo-1.0"
Expand All @@ -50,7 +43,6 @@ Given I successfully execute dnf with args "install foo-1.0"
| install | foo-debuginfo-0:1.0-1.x86_64 |
| install | foo-debugsource-0:1.0-1.x86_64 |

@dnf5
Scenario: with a -debugsource (or -debuginfo) package as an argument, installed version is not respected
Given I successfully execute dnf with args "install foo-1.0"
When I execute dnf with args "debuginfo-install foo-debugsource"
Expand All @@ -59,7 +51,6 @@ Given I successfully execute dnf with args "install foo-1.0"
| Action | Package |
| install | foo-debugsource-0:2.0-1.x86_64 |

@dnf5
@bz1586059 @bz1629412
Scenario: installs the requested version of debuginfo even if a different base package is installed
Given I successfully execute dnf with args "install foo-2.0"
Expand All @@ -70,7 +61,6 @@ Given I successfully execute dnf with args "install foo-2.0"
| install | foo-debuginfo-0:1.0-1.x86_64 |
| install | foo-debugsource-0:1.0-1.x86_64 |

@dnf5
@bz1586059 @bz1629412
Scenario: installs the requested version of debuginfo (through a provide) even if a different base package is installed
Given I successfully execute dnf with args "install baz-1.0"
Expand All @@ -81,7 +71,6 @@ Given I successfully execute dnf with args "install baz-1.0"
| install | baz-debuginfo-0:2.0-1.x86_64 |
| install | baz-debugsource-0:2.0-1.x86_64 |

@dnf5
Scenario: installs debuginfo when a -debuginfo package is provided
When I execute dnf with args "debuginfo-install foo-debuginfo"
Then the exit code is 0
Expand All @@ -90,37 +79,26 @@ Scenario: installs debuginfo when a -debuginfo package is provided
| install | foo-debuginfo-0:2.0-1.x86_64 |
| install-weak | foo-debugsource-0:2.0-1.x86_64 |


@bz1586059 @bz1629412
Scenario: can't find the version of debuginfo for an installed package
Given I successfully execute dnf with args "install bar-2.0"
When I execute dnf with args "debuginfo-install bar"
Then the exit code is 0
And stdout is
And stderr is
"""
<REPOSYNC>
Could not find debuginfo package for the following installed packages: bar-2.0-1.x86_64
Could not find debugsource package for the following installed packages: bar-2.0-1.x86_64
Dependencies resolved.
Nothing to do.
Complete!
Could not find debuginfo package for the following packages resolved from the argument 'bar': bar-0:2.0-1.x86_64
Could not find debugsource package for the following packages resolved from the argument 'bar': bar-0:2.0-1.x86_64
"""


Scenario: can't find the requested version of debuginfo (multilib package, architectures can be mixed up)
When I execute dnf with args "debuginfo-install baz-1.0"
Then the exit code is 0
And stdout is
And stderr is
"""
<REPOSYNC>
Could not find debuginfo package for the following available packages: baz-1.0-1
Could not find debugsource package for the following available packages: baz-1.0-1
Dependencies resolved.
Nothing to do.
Complete!
Could not find debuginfo package for the following packages resolved from the argument 'baz-1.0': baz-0:1.0-1.i686, baz-0:1.0-1.x86_64
Could not find debugsource package for the following packages resolved from the argument 'baz-1.0': baz-0:1.0-1.i686, baz-0:1.0-1.x86_64
"""

@dnf5
Scenario: installs debuginfo with the same (secondary) architecture as the installed package
Given I successfully execute dnf with args "install baz.i686"
When I execute dnf with args "debuginfo-install baz"
Expand All @@ -130,7 +108,6 @@ Given I successfully execute dnf with args "install baz.i686"
| install | baz-debuginfo-0:2.0-1.i686 |
| install | baz-debugsource-0:2.0-1.i686 |

@dnf5
Scenario: installs debuginfo for multiple installed architectures
Given I successfully execute dnf with args "install baz.i686 baz.x86_64"
When I execute dnf with args "debuginfo-install baz"
Expand All @@ -142,7 +119,6 @@ Given I successfully execute dnf with args "install baz.i686 baz.x86_64"
| install | baz-debugsource-0:2.0-1.i686 |
| install | baz-debugsource-0:2.0-1.x86_64 |

@dnf5
Scenario: installs debuginfo for the latest version of multiple install-only packages
Given I successfully execute dnf with args "install kernel-1.0 kernel-2.0"
When I execute dnf with args "debuginfo-install kernel"
Expand All @@ -152,23 +128,21 @@ Given I successfully execute dnf with args "install kernel-1.0 kernel-2.0"
| install | kernel-debuginfo-0:2.0-1.x86_64 |
| install | kernel-debugsource-0:2.0-1.x86_64 |


Scenario: multiple packages, a glob that doesn't find debuginfo for the installed version
Given I successfully execute dnf with args "install foo-1.0 bar-2.0"
When I execute dnf with args "debuginfo-install foo ba* nodebug"
Then the exit code is 0
And stdout contains "Could not find debuginfo package for the following installed packages: bar-2.0-1.x86_64"
And stdout contains "Could not find debugsource package for the following installed packages: bar-2.0-1.x86_64"
And stdout contains "Could not find debuginfo package for the following available packages: nodebug-1.0-1"
And stdout contains "Could not find debugsource package for the following available packages: nodebug-1.0-1"
And stderr contains "Could not find debuginfo package for the following packages resolved from the argument 'ba\*': bar-0:2\.0-1\.x86_64"
And stderr contains "Could not find debugsource package for the following packages resolved from the argument 'ba\*': bar-0:2\.0-1\.x86_64"
And stderr contains "Could not find debuginfo package for the following packages resolved from the argument 'nodebug': nodebug-0:1\.0-1\.x86_64"
And stderr contains "Could not find debugsource package for the following packages resolved from the argument 'nodebug': nodebug-0:1\.0-1\.x86_64"
And Transaction is following
| Action | Package |
| install | baz-debuginfo-0:2.0-1.x86_64 |
| install | baz-debugsource-0:2.0-1.x86_64 |
| install | foo-debuginfo-0:1.0-1.x86_64 |
| install | foo-debugsource-0:1.0-1.x86_64 |

@dnf5
Scenario: a glob with version that overrides what is installed
Given I successfully execute dnf with args "install foo-1.0 bar-2.0"
When I execute dnf with args "debuginfo-install foo ba*-1.0"
Expand All @@ -180,7 +154,6 @@ Given I successfully execute dnf with args "install foo-1.0 bar-2.0"
| install | foo-debuginfo-0:1.0-1.x86_64 |
| install | foo-debugsource-0:1.0-1.x86_64 |

@dnf5
Scenario: a package with a glob in version that overrides what is installed
Given I successfully execute dnf with args "install bar-2.0"
When I execute dnf with args "debuginfo-install bar-1.*"
Expand All @@ -190,7 +163,6 @@ Given I successfully execute dnf with args "install bar-2.0"
| install | bar-debuginfo-0:1.0-1.x86_64 |
| install | bar-debugsource-0:1.0-1.x86_64 |

@dnf5
@bz1586084
Scenario: packages are upgraded according to the installed version of the base package
Given I successfully execute dnf with args "install bar-1.0"
Expand All @@ -207,7 +179,6 @@ Given I successfully execute dnf with args "install bar-3.0"
| upgrade | bar-debuginfo-0:3.0-1.x86_64 |
| upgrade | bar-debugsource-0:3.0-1.x86_64 |


@bz1586084
Scenario: debuginfo is upgraded according to the installed version of the base package, debugsource is not found
Given I successfully execute dnf with args "install bar-1.0"
Expand All @@ -219,12 +190,11 @@ Given I successfully execute dnf with args "debuginfo-install bar"
Given I successfully execute dnf with args "install bar-4.0"
When I execute dnf with args "debuginfo-install bar"
Then the exit code is 0
And stdout contains "Could not find debugsource package for the following installed packages: bar-4.0-1.x86_64"
And stderr contains "Could not find debugsource package for the following packages resolved from the argument 'bar': bar-0:4.0-1.x86_64"
And Transaction is following
| Action | Package |
| upgrade | bar-debuginfo-0:4.0-1.x86_64 |

@dnf5
@bz1532378
Scenario: debugsource is installed even if debuginfo is present on the system
Given I successfully execute dnf with args "install --setopt=install_weak_deps=False foo-debuginfo"
Expand All @@ -234,7 +204,6 @@ Given I successfully execute dnf with args "install --setopt=install_weak_deps=F
| Action | Package |
| install | foo-debugsource-0:2.0-1.x86_64 |

@dnf5
Scenario: installs latest version debuginfo of parent package for a subpackage
When I execute dnf with args "debuginfo-install foo-subpackage"
Then the exit code is 0
Expand All @@ -243,7 +212,6 @@ Scenario: installs latest version debuginfo of parent package for a subpackage
| install | foo-debuginfo-0:2.0-1.x86_64 |
| install | foo-debugsource-0:2.0-1.x86_64 |

@dnf5
@bz1586059 @bz1629412
Scenario: installs version of debuginfo for parent package of an installed subpackage
Given I successfully execute dnf with args "install foo-subpackage-1.0"
Expand All @@ -254,7 +222,6 @@ Given I successfully execute dnf with args "install foo-subpackage-1.0"
| install | foo-debuginfo-0:1.0-1.x86_64 |
| install | foo-debugsource-0:1.0-1.x86_64 |

@dnf5
@bz1586059 @bz1629412
Scenario: installs version of debuginfo for parent package of an installed subpackage
Given I successfully execute dnf with args "install foo-subpackage-1.0"
Expand Down

0 comments on commit 5e5a94c

Please sign in to comment.