- update source.
[platform/framework/web/crosswalk.git] / src / native_client / tests / spec2k / 300.twolf / run.train.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)) train
14
15 LIST="train.out train.twf train.pl1 train.pl2  train.pin "
16
17 if [[ "${EMU_HACK}" != "no" ]] ; then
18   touch  ${LIST}
19   touch  train.tmp
20   touch  train.cel
21   touch  train.sav
22   touch  train.sv2
23 fi
24
25 ${PREFIX} $1 ${DASHDASH} train >stdout.out 2>stderr.out
26
27 if [[ "${VERIFY}" != "no" ]] ; then
28   echo "VERIFY"
29   ../specdiff.sh -o stdout.out data/train/output/train.stdout
30   for i in ${LIST}; do
31     ../specdiff.sh -o $i data/train/output/$i
32   done
33 fi
34 echo "OK"
35