Sha256: 4d55338f9671e1ecf66bfc1b6c692a7dc53cf22ec79af0c81b5c6301f7d3f7c4

Contents?: true

Size: 1.1 KB

Versions: 56

Compression:

Stored size: 1.1 KB

Contents

#!/bin/bash

# Usage: $0 [Options]
#   Specify project
#     [-m]  # main project
#     [-c]  # core project
#   Test skip option
#     [--skip-main]
#     [--skip-core]

set -e
BASE_DIR=$(cd $(dirname $0); pwd)

#### Parse option

TEST_MODE="skip" # skip or specify
for OPT in $*
do
    case $OPT in
        -m) TEST_MODE='specify'; SPECIFY_M=1; shift;;
        -c) TEST_MODE='specify'; SPECIFY_C=1; shift;;
        --skip-main) TEST_MODE='skip'; SKIP_M=1; shift;;
        --skip-core) TEST_MODE='skip'; SKIP_C=1; shift;;
    esac
done

if [ "$TEST_MODE" = 'skip' ]; then
    if [ "$SKIP_M" = "" ]; then SPECIFY_M=1; fi
    if [ "$SKIP_C" = "" ]; then SPECIFY_C=1; fi
fi

#### Test functions

# Test flydata-agent library (flydata-agent/lib, flydata-agent/spec)
test_main() {
    cd $BASE_DIR
    bundle exec rake compile
    bundle install
    bundle exec rspec
}

# Test flydata-core (flydata-core/lib, flydata-core/spec)
test_core() {
    cd $BASE_DIR/flydata-core
    bundle install
    bundle exec rspec
}

#### Main

if [ "$SPECIFY_C" = '1' ]; then
    test_core
fi

if [ "$SPECIFY_M" = '1' ]; then
    test_main
fi

Version data entries

56 entries across 56 versions & 1 rubygems

Version Path
flydata-0.6.8 test-suite.sh
flydata-0.6.7 test-suite.sh
flydata-0.6.6 test-suite.sh
flydata-0.6.5 test-suite.sh
flydata-0.6.4 test-suite.sh
flydata-0.6.3 test-suite.sh
flydata-0.6.2 test-suite.sh
flydata-0.6.1 test-suite.sh
flydata-0.6.0 test-suite.sh
flydata-0.5.21 test-suite.sh
flydata-0.5.20 test-suite.sh
flydata-0.5.17 test-suite.sh
flydata-0.5.16 test-suite.sh
flydata-0.5.15 test-suite.sh
flydata-0.5.14 test-suite.sh
flydata-0.5.13 test-suite.sh