Skip to content

Commit

Permalink
Catch up and add a little helper script.
Browse files Browse the repository at this point in the history
  • Loading branch information
brettviren committed Jul 12, 2015
1 parent eb698c9 commit 8e73c1e
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 5 deletions.
2 changes: 1 addition & 1 deletion data
2 changes: 1 addition & 1 deletion iface
Submodule iface updated from 24f145 to 38ccc1
38 changes: 38 additions & 0 deletions run_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash

# A little helper to run an individual test without requiring a full
# install. It runs the test from the build directory.
#
# You problably want to do:
# cd wire-cell && alias run_test=`pwd`/run_test.sh

usage () {
echo "run_test.sh testname [package]"
echo "if run from a package directory last arg isn't needed"
exit 1;
}


tst="$1" ; shift
pkg="$1" ; shift
if [ -z "$pkg" ] ; then
pkg=$(basename $(pwd))
fi

top=$(dirname $(readlink -f $BASH_SOURCE))

dir="$top/build/$pkg"
if [ ! -d $dir ] ; then
echo "No build directory: $dir"
usage
fi

exe="$dir/test_$tst"
if [ ! -x $exe ] ; then
echo "Test $tst not built"
usage
fi

LD_LIBRARY_PATH=$dir:$LD_LIBRARY_PATH $exe


2 changes: 1 addition & 1 deletion util
Submodule util updated from 3a6240 to d112c7
3 changes: 2 additions & 1 deletion wscript
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ def configure(cfg):
def build(bld):
bld.load('find_package', tooldir='waf-tools')

subdirs = [str(sd.parent) for sd in bld.path.ant_glob('*/wscript_build')]
#subdirs = [str(sd.parent) for sd in bld.path.ant_glob('*/wscript_build')]
subdirs = 'util iface nav'.split()
print subdirs

bld.recurse(subdirs)
Expand Down

0 comments on commit 8e73c1e

Please sign in to comment.