#!/bin/sh

test_dir=$(mktemp -d)

cleanup() {
    rm -rf $test_dir ;
}
trap cleanup 1 2 3 13 15

cp -r /usr/share/doc/plplot-doc/examples $test_dir
QT_QPA_PLATFORM=offscreen xvfb-run make -C $test_dir/examples test_noninteractive

cleanup
