Skip to content

Commit

Permalink
Move test and test-all to a bin dir and adjust paths appropriately. I…
Browse files Browse the repository at this point in the history
…ncluded a few vars for easier future maintenance
  • Loading branch information
Dan Mosedale committed Jul 12, 2012
1 parent ec92282 commit 32b33ea
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
8 changes: 6 additions & 2 deletions test → bin/test
@@ -1,5 +1,9 @@
#!/bin/sh

# assumes execution from the top-level dir
TOP=.
BINDIR=${TOP}/bin

if [ -z "$1" ]; then
echo "Usage: $0 <template-name>"
exit
Expand All @@ -11,9 +15,9 @@ tmplName="$1"
rm -fr built
mkdir built

./build "$tmplName" built/$tmplName >/dev/null
./build "$tmplName" $TOP/built/$tmplName >/dev/null

diff -uwr ref/$tmplName built/$tmplName
diff -uwr $TOP/ref/$tmplName $TOP/built/$tmplName
diffExit=$?

if [ "$diffExit" -eq 0 ]; then
Expand Down
13 changes: 13 additions & 0 deletions bin/test-all
@@ -0,0 +1,13 @@
#!/bin/sh

# assumes execution from the top-level dir
TOP=.
BINDIR=${TOP}/bin

for d in ${TOP}/templates/*
do
e=`basename $d`
[ $e = "default" ] && continue
${BINDIR}/test $e
done

9 changes: 0 additions & 9 deletions test-all

This file was deleted.

0 comments on commit 32b33ea

Please sign in to comment.