#!/bin/sh
ul=`ulimit -s`
if ( [ "$ul" = "unlimited" ] || [ $ul -gt 4096 ] ) ; then
  ulimit -s 1024 && ul=true || ul=false ;
else
  ul=true;
fi

if $ul; then
  ${program} > ${output} 2>&1;
else
  # The test is not actually run
  # We thus tell ocamltest the test output is equal to the reference file
  # so that the comparison between reference and output will still succeed
  echo output="${reference}" > ${ocamltest_response}
fi
