#!/bin/sh
set -ex

ARCH=`dpkg --print-architecture`
if [ "$ARCH" = "amd64" -o "$ARCH" = "arm64" -o "$ARCH" = "ppc64el" -o "$ARCH" = "s390x" ]
then
	# bug 1629376 prevents juju from working in this scenario
	# juju will not bootstrap published versions of juju on unknown series
	echo "SKIP: Juju won't bootstrap unknown without published agent (LP:1629376)"
	exit 0

	if [ ! -d /run/systemd/system ]; then
		echo "SKIP: non-systemd series are not valid future series."
		exit 0
	fi
	if ! apt-cache show juju-mongodb3.2 >/dev/null 2>&1; then
		echo "SKIP: 32-bit state servers not supported in future series."
		exit 0
	fi

	sh debian/tests/fake-future.sh
	sh debian/tests/normal-user.sh debian/tests/manual-provider
else
	echo "SKIP: Unsupported Architecture"
	exit 0
fi
