1#! /bin/bash
2#
3# This Source Code Form is subject to the terms of the Mozilla Public
4# License, v. 2.0. If a copy of the MPL was not distributed with this
5# file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7mpi_init()
8{
9  SCRIPTNAME="mpi.sh"
10  if [ -z "${INIT_SOURCED}" -o "${INIT_SOURCED}" != "TRUE" ] ; then
11      cd ../common
12      . ./init.sh
13  fi
14  SCRIPTNAME="mpi.sh"
15  html_head "MPI tests"
16}
17
18mpi_cleanup()
19{
20  html "</TABLE><BR>"
21  cd ${QADIR}
22  . common/cleanup.sh
23}
24
25mpi_init
26tests=($(mpi_tests list | awk '{print $1}'))
27for test in "${tests[@]}"
28do
29  OUT=$(mpi_tests $test 2>&1)
30  [ ! -z "$OUT" ] && echo "$OUT"
31  OUT=`echo $OUT | grep -i 'error\|Assertion failure'`
32
33  if [ -n "$OUT" ] ; then
34    html_failed "mpi $test test"
35  else
36    html_passed "mpi $test test"
37  fi
38done
39
40mpi_cleanup
41