#!/bin/sh

set -eu

. /usr/share/geordi/_functions

Echo_info "Running test binary"

Echo_debug "Copying libs for test binary"
Copy_libs_for_binary "${RT}/t"

Echo_debug "Overwriting libstdc++.so.6"
cp "$(${GXX} -print-file-name=libstdc++.so.6)" "${RT}/usr/lib"

Echo_debug "Checking output of test binary"
if [ "$(chroot "${RT}" /t)" != "9" ]
then
	Echo_error "Test binary '${RT}/t' did not return '9'"
	exit 1
fi
