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
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
4ea4df
    # Pretend to install the group, but all we really want is the solver debug data
4ea4df
    dnf --installroot=/tmp group --releasever $centos_ver install --assumeno --debugsolver $GROUP >/dev/null
4ea4df
4ea4df
    # Check the solver results to see if there are problems
4ea4df
    grep -qw '^problem' debugdata/rpms/solver.result
4ea4df
    RES=$?
4ea4df
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