Blame tests/0_common/50_test_comps.sh

4ea4df
#!/bin/bash
4ea4df
# Author: Alex Iribarren <Alex.Iribarren@cern.ch>
4ea4df
4ea4df
t_Log "Running $0 - testing comps.xml groups"
4ea4df
40b4c8
if [ "$CONTAINERTEST" -eq "1" ]; then
40b4c8
    t_Log "Running in container -> SKIP"
40b4c8
    exit 0
40b4c8
fi
40b4c8
6a5f99
if [ "$centos_ver" -eq "7" ]; then
6a5f99
    t_Log "CentOS $centos_ver -> SKIP"
6a5f99
    exit 0
6a5f99
fi
6a5f99
4ea4df
# Get **all** the group IDs
4ea4df
ALL_GROUPS=`dnf group list -v --hidden | grep '^   ' | sed 's/.*(\(.*\))$/\1/'`
4ea4df
4ea4df
for GROUP in $ALL_GROUPS; do
4ea4df
    t_Log " - testing group $GROUP"
4ea4df
    # Pretend to install the group, but all we really want is the solver debug data
40b4c8
    dnf --installroot=/tmp group --releasever $centos_ver install --assumeno --debugsolver $GROUP
40b4c8
    pwd
40b4c8
    ls
4ea4df
    # Check the solver results to see if there are problems
40b4c8
    grep '^problem' debugdata/rpms/solver.result
4ea4df
    RES=$?
4ea4df
    # Clean up the debugdata
4ea4df
    rm -rf debugdata/
4ea4df
4ea4df
    # If 'problem' was not found in the results, grep returns 1 and we're happy
4ea4df
    if [[ $RES -eq 1 ]]; then
4ea4df
        t_CheckExitStatus 0
4ea4df
    else
4ea4df
        t_CheckExitStatus 1
4ea4df
    fi
4ea4df
done