#!/bin/sh
set -exfu

# we have to export PYTHONHASHSEED because otherwise networkx will create
# content with random output order
#   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=749710
#   https://github.com/networkx/networkx/issues/1181
export PYTHONHASHSEED=0
# to make the sort order in the tests locale independent
export LC_COLLATE=C
# because cross-problems outputs utf8 on standard output
export PYTHONIOENCODING=utf-8

rm -rf $ADTTMP/out $ADTTMP/tmp
mkdir -p $ADTTMP/out
cp tests/cross-ma.diff $ADTTMP/out/ma.diff
botch-cross --debug --verbose --output=$ADTTMP/out --tmp=$ADTTMP/tmp amd64 armhf tests/sid-amd64-packages-20140101T000000Z tests/sid-sources-20140101T000000Z
diff -ur tests/cross/tmp $ADTTMP/tmp
diff -ur tests/cross/out $ADTTMP/out
