#! @TESTSHELL@

. @testlib_sh_LIBS@

cd @abs_top_builddir@/tests

trap "rm -f $$-*" EXIT

exe="@abs_top_builddir@/sysarch/sysarch"
expdir=@abs_top_srcdir@/tests
host=$(hostname)

pwd=$(pwd)

test_initialize

test_set_hook result test_result_hook_save_output_on_failure

test_begin_subtests

$exe -sh > $$-${test_id}.out 2>&1
test_ok $? "run sysarch"

if [ ! -f $expdir/$host.exp ] ; then
  echo "First time testing on $host; test will succeed"
  test_set make_cmp_copy 1

fi

test_file_is  $$-${test_id}.out $expdir/$host.exp $host

test_end_subtests

test_summary
test_exit
