~markwright/scalestack/zeromq

« back to all changes in this revision

Viewing changes to test_run.sh

  • Committer: Eric Day
  • Date: 2010-02-21 10:36:03 UTC
  • Revision ID: eday@oddments.org-20100221103603-u0agc1fsduqhl728
Initial commit with build system and basic module loading.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
#
 
3
# Scale Stack
 
4
#
 
5
# Copyright (C) 2010 Eric Day (eday@oddments.org)
 
6
# All rights reserved.
 
7
#
 
8
# Use and distribution licensed under the BSD license. See the
 
9
# COPYING file in the root project directory for full text.
 
10
#
 
11
 
 
12
# Get filename we want to run without path
 
13
name=`echo $1 | sed 's/.*\/\(ScaleStack\/.*[^\/]*\)$/\1/'`
 
14
 
 
15
ext=`echo $name | sed 's/.*\.\([^.]*$\)/\1/'`
 
16
if [ "x$ext" = "x$name" ]
 
17
then
 
18
  ext=""
 
19
fi
 
20
 
 
21
if [ ! "x$ext" = "xsh" ]
 
22
then
 
23
  libtool_prefix="libtool --mode=execute"
 
24
fi
 
25
 
 
26
# Set prefix if it was given through environment
 
27
if [ -n "$SCALESTACK_TEST_PREFIX" ]
 
28
then
 
29
  if [ -n "$SCALESTACK_TEST_FILTER" ]
 
30
  then
 
31
    # If filter variable is set, only apply prefix to those that match
 
32
    for x in $SCALESTACK_TEST_FILTER
 
33
    do
 
34
      if [ "x$x" = "x$name" ]
 
35
      then
 
36
        prefix="$libtool_prefix $SCALESTACK_TEST_PREFIX"
 
37
        with=" (with prefix after filter)"
 
38
        break
 
39
      fi
 
40
    done
 
41
  else
 
42
    prefix="$libtool_prefix $SCALESTACK_TEST_PREFIX"
 
43
    with=" (with prefix)"
 
44
  fi
 
45
fi
 
46
 
 
47
# Set this to fix broken libtool test
 
48
ECHO=`which echo`
 
49
export ECHO
 
50
 
 
51
$prefix $1 $SCALESTACK_TEST_ARGS