🐎 Run dnf-json tests in parallel

Run multiple dnf-json tests in parallel to speed up execution. The
total number of parallel tests is limited by the number of CPUs in
the machine that is running the tests.

Signed-off-by: Major Hayden <major@redhat.com>
This commit is contained in:
Major Hayden 2020-04-22 14:35:46 -05:00 committed by Ondřej Budai
parent d9cbdede41
commit 3dbfdc4ee6

View file

@ -57,6 +57,10 @@ func TestCrossArchDepsolve(t *testing.T) {
// NOTE: we can add RHEL, but don't make it hard requirement because it will fail outside of VPN
for _, distroStruct := range []distro.Distro{fedora30.New(), fedora31.New(), fedora32.New()} {
t.Run(distroStruct.Name(), func(t *testing.T) {
// Run tests in parallel to speed up run times.
t.Parallel()
repos, err := rpmmd.LoadRepositories([]string{repoDir}, distroStruct.Name())
require.NoErrorf(t, err, "Failed to LoadRepositories %v", distroStruct.Name())