#!/bin/bash

set -e
set +x

echo "TEST: pwd=`pwd`"
echo "TEST: dir: `ls`"

$PREFIX/bin/sby test/demo3.sby > output 2>&1

passed=`grep 'Status: passed' output | wc -l`

if test $passed -ne 1; then
  echo "Error: test failed"
  cat output
  exit 1
fi


#!/bin/bash

set -e
set +x

echo "TEST: pwd=`pwd`"
echo "TEST: dir: `ls`"

# `|| true` is needed because of the `set -e` option.
$PREFIX/bin/sby test/demo3.sby > output 2>&1 || true

passed=`grep 'Status: passed' output | wc -l`

if test $passed -ne 1; then
  echo "Error: test failed"
  cat output
  exit 1
fi


Fix printing output if testing has failed
symbiyosys: Fix printing output if testing has failed

It seems the log has never been printed after the `sby` command had
returned a nonzero value because the `set -e` option is used in this
script.
