#!/bin/bash

. run_profile.txt
. $base_dir/plans/commands/common.fns

# Check needed vars from run_profile.txt
[ ! -d "$run_dir" ] && echo "ERROR: $run_dir does not exist" && exit -10

SUT=`hostname -s`
log_dir="$run_dir/test_output"
mkdir -p $log_dir

cwd=`/bin/pwd`
rcfile="$cwd/postmark.rc"

# use $IOFILES for postmark files
IOFILES=/root/tmp
mkdir -p $IOFILES
cd $IOFILES

echo "Running postmark on SUT: $SUT"
# postmark parameters: all in postmark.rc
runit="/usr/bin/time postmark $rcfile"

run_test "postmark" "$runit" "$log_dir" "postmark.log"

# maybe print some selective log output:
# $all_pkgs_dir/posixtestsuite/posixtest-summary.sh

exit 0
