- update source.
[platform/framework/web/crosswalk.git] / src / native_client / tests / spec2k / 300.twolf / run.ref.sh
1 #!/bin/bash
2 # Copyright (c) 2011 The Native Client Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 set -o nounset
7 set -o errexit
8
9 PREFIX=${PREFIX:-}
10 VERIFY=${VERIFY:-yes}
11 EMU_HACK=${EMU_HACK:-yes}
12
13 python ../prepare_input.py --config $(basename $(pwd)) ref
14
15 LIST="ref.out ref.twf ref.pl1 ref.pl2 ref.pin"
16
17 if [[ "${EMU_HACK}" != "no" ]] ; then
18   touch  ${LIST}
19   touch  ref.tmp
20   touch  ref.sav
21   touch  ref.sv2
22 fi
23
24 ${PREFIX} $1 ${DASHDASH} ref >stdout.out 2>stderr.out
25
26 if [[ "${VERIFY}" != "no" ]] ; then
27   echo "VERIFY"
28   ../specdiff.sh -o stdout.out data/ref/output/ref.stdout
29   for i in ${LIST}; do
30     ../specdiff.sh -o $i data/ref/output/$i
31   done
32 fi
33 echo "OK"
34