#!/bin/bash
set -e

cp -r /usr/share/doc/cyclonedds-dev/examples/helloworld "$AUTOPKGTEST_TMP"
cd "$AUTOPKGTEST_TMP/helloworld"
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build .
timeout 20 ./HelloworldSubscriber > subscriber.log &
timeout 10 ./HelloworldPublisher
echo "==========================================="
cat subscriber.log

