Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test for multilib modules/packages #56

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ int main (int argc, char **argv)
ADD_TEST ("/require/positive", "positive");
ADD_TEST ("/require/empty", "empty");
ADD_TEST ("/require/alternatives", "alternatives");
ADD_TEST ("/require/multilib", "multilib");
ADD_TEST ("/module/empty", "empty-module");

g_test_add_func ("/fail/invalid-repo", test_invalid_repo);
Expand Down
8 changes: 8 additions & 0 deletions tests/multilib/expected
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module:C:master:2018:deadbeef.x86_64@yaml
module:D:compat:2018:deadbeef.i686@yaml
module:E:master:2018:deadbeef.noarch@yaml
*C-1-1.x86_64@repo
*D-1-1.i686@repo
*E-1-1.noarch@repo
bar-1-1.i686@repo
foo-1-1.x86_64@repo
1 change: 1 addition & 0 deletions tests/multilib/input
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module(C)
86 changes: 86 additions & 0 deletions tests/multilib/modules.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
---
document: modulemd
version: 2
data:
name: C
stream: master
version: 2018
context: deadbeef
arch: x86_64
artifacts:
rpms:
- C-0:1-1.x86_64
dependencies:
- requires:
D: [compat]
...
---
document: modulemd
version: 2
data:
name: D
stream: master
version: 2018
context: deadbeef
arch: x86_64
artifacts:
rpms:
- D-0:1-1.x86_64
dependencies:
- requires:
E: [master]
...
---
document: modulemd
version: 2
data:
name: D
stream: compat
version: 2018
context: deadbeef
arch: i686
artifacts:
rpms:
- D-0:1-1.i686
dependencies:
- requires:
E: [master]
...
---
document: modulemd
version: 2
data:
name: E
stream: master
version: 2018
context: deadbeef
arch: noarch
artifacts:
rpms:
- E-0:1-1.noarch
dependencies:
- requires:
platform: [f29]
...
---
document: modulemd-defaults
version: 1
data:
module: C
stream: master
...
---
document: modulemd-defaults
version: 1
data:
module: D
stream: master
...
---
document: modulemd-defaults
version: 1
data:
module: E
stream: master
...

23 changes: 23 additions & 0 deletions tests/multilib/packages.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
=Ver: 2.0

# Belongs to module:C:master:2018:deadbeef.x86_64
=Pkg: C 1 1 x86_64
=Req: foo

# Belongs to module:D:master:2018:deadbeef.x86_64
=Pkg: D 1 1 x86_64
=Req: bar

# Belongs to module:D:compat:2018:deadbeef.i686
=Pkg: D 1 1 i686
=Req: bar

# Belongs to module:E:master:2018:deadbeef.noarch
=Pkg: E 1 1 noarch

# Ursine packages
=Pkg: foo 1 1 i686
=Pkg: foo 1 1 ppc64
=Pkg: foo 1 1 x86_64
=Pkg: bar 1 1 i686
=Pkg: bar 1 1 ppc64