test_beedeposource.sh
Go to the documentation of this file.
1 #!/bin/bash
2 
3 testdir="$(dirname $(realpath $BASH_SOURCE))"
4 
5 tmpdir=""
6 datadir="$1"
7 if [ -z "$datadir" ] ; then
8  tmpdir=$(mktemp -d)
9  echo "using temp dir: $tmpdir"
10  unzip -d $tmpdir $testdir/test_beedeposource.zip || exit 1
11  datadir="$tmpdir/data"
12 
13 fi
14 depofiles=$(for n in data/?/?-truthDepo.json; do echo -n '"'$n'"',; done)
15 
16 
17 wire-cell -L debug -l stdout -C "depofiles=["$depofiles"]" -c $testdir/test_beedeposource.jsonnet || exit 1
18 if [ -n "$tmpdir" ] ; then
19  rm -rf $tmpdir
20 fi