#!/bin/sh
set -e

Konclude=${KONCLUDE:-Konclude}

$Konclude owllinkfile -i Tests/test-request.xml -o test-response.xml
$Konclude owllinkfile -c Configs/default-config.xml -i Tests/test-request.xml -o test-response-cfg.xml
$Konclude owllinkserver -w 2 -c Configs/default-config.xml -p 8080 &
sleep 2
# FIXME: apparently broken
#curl --upload-file Tests/test-request.xml http://localhost:8080
pkill Konclude
$Konclude satisfiability -i Tests/galen.owl.xml -x 'http://ex.test/galen#ExternalIliacVein'
$Konclude classification -w AUTO -i Tests/roberts-family-full-D.owl.xml -o test-response-class.xml
$Konclude realization -w AUTO -i Tests/roberts-family-full-D.owl.xml -o test-response-real.xml
# TODO: check sanity of output files
