#!/bin/sh

set -e
set -u

export GNUSTEP_MAKEFILES=/usr/share/GNUstep/Makefiles

# Some tests require config.mak and GSConfig.h.
# Arguments to configure must be kept in sync with those in the
# override_dh_auto_configure target in debian/rules.
./configure ac_cv_lib_kvm_kvm_getenvv=no --disable-bfd  \
    || (cat config.log; exit 1)

if ! gnustep-tests Tests/base; then
    for i in $(find -name tests.log); do
        echo "====================== $i =================="
        cat $i
    done
    exit 0
fi

exit 0
