#!/bin/sh
# Smoke test: build the S4U tutorial project against the installed packages
# Please keep debian/tests/smoke-s4u/ in sync with https://framagit.org/simgrid/simgrid-template-s4u
set -e

HERE="$(cd "$(dirname "$0")" && pwd)"
BUILDDIR="${AUTOPKGTEST_TMP:-$(mktemp -d)}/smoke-s4u"

cp -r "$HERE/smoke-s4u" "$BUILDDIR"
cd "$BUILDDIR"

cmake .
make VERBOSE=1

./master-workers small_platform.xml master-workers_d.xml
./ping-pong cluster_platform.xml
python3 master-workers.py small_platform.xml master-workers_d.xml
