~markwright/scalestack/zeromq

1 by Eric Day
Initial commit with build system and basic module loading.
1
#!/bin/sh
2
#
3
# Scale Stack
4
#
62 by Eric Day
Changed to the Apache 2.0 license with the consent Chris Behrens (the only other contributor to date).
5
# Copyright 2010 Eric Day
6
#
7
# Licensed under the Apache License, Version 2.0 (the "License");
8
# you may not use this file except in compliance with the License.
9
# You may obtain a copy of the License at
10
#
11
#     http://www.apache.org/licenses/LICENSE-2.0
12
#
13
# Unless required by applicable law or agreed to in writing, software
14
# distributed under the License is distributed on an "AS IS" BASIS,
15
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
# See the License for the specific language governing permissions and
17
# limitations under the License.
1 by Eric Day
Initial commit with build system and basic module loading.
18
#
19
20
# Get filename we want to run without path
56.1.1 by Eric Day
Changed everything to be lowercase/underscore, no more camelCase.
21
name=`echo $1 | sed 's/.*\/\(scalestack\/.*[^\/]*\)$/\1/'`
1 by Eric Day
Initial commit with build system and basic module loading.
22
23
ext=`echo $name | sed 's/.*\.\([^.]*$\)/\1/'`
24
if [ "x$ext" = "x$name" ]
25
then
26
  ext=""
27
fi
28
29
if [ ! "x$ext" = "xsh" ]
30
then
31
  libtool_prefix="libtool --mode=execute"
32
fi
33
52 by Eric Day
Improved Event module test coverage.
34
# Only run tests in given list if needed
35
if [ -n "$SCALESTACK_TEST_ONLY" ]
36
then
37
  run="no"
38
  for x in $SCALESTACK_TEST_ONLY
39
  do
40
    if [ "x$x" = "x$name" ]
41
    then
42
      run="yes"
43
      break
44
    fi
45
  done
46
47
  if [ "x$run" = "xno" ]
48
  then
49
    echo "SKIP: $name"
50
    exit 0
51
  fi
52
fi
53
1 by Eric Day
Initial commit with build system and basic module loading.
54
# Set prefix if it was given through environment
55
if [ -n "$SCALESTACK_TEST_PREFIX" ]
56
then
57
  if [ -n "$SCALESTACK_TEST_FILTER" ]
58
  then
59
    # If filter variable is set, only apply prefix to those that match
60
    for x in $SCALESTACK_TEST_FILTER
61
    do
62
      if [ "x$x" = "x$name" ]
63
      then
64
        prefix="$libtool_prefix $SCALESTACK_TEST_PREFIX"
65
        with=" (with prefix after filter)"
66
        break
67
      fi
68
    done
69
  else
70
    prefix="$libtool_prefix $SCALESTACK_TEST_PREFIX"
71
    with=" (with prefix)"
72
  fi
73
fi
74
75
# Set this to fix broken libtool test
76
ECHO=`which echo`
77
export ECHO
78
34 by Eric Day
Updated test system, improved event handling, worked out echo server bugs, and added echo server test module.
79
# This needs to be set because of broken libtool on OSX
56.1.1 by Eric Day
Changed everything to be lowercase/underscore, no more camelCase.
80
DYLD_LIBRARY_PATH=scalestack/.libs
34 by Eric Day
Updated test system, improved event handling, worked out echo server bugs, and added echo server test module.
81
export DYLD_LIBRARY_PATH
82
62.1.26 by Eric Day
Rewrote the tests to use a proper base class instead of macros.
83
echo
84
echo "RUN:  $name"
1 by Eric Day
Initial commit with build system and basic module loading.
85
$prefix $1 $SCALESTACK_TEST_ARGS