github.com/camronlevanger/libcompose@v0.4.1-0.20180423130544-6bb86d53fa21/hack/test-acceptance (about)

     1  #!/bin/bash
     2  set -e
     3  
     4  export SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
     5  export DEST=.
     6  
     7  # Temporarly only test on DEFAULT_DOCKER_VERSION
     8  export DOCKER_DAEMON_VERSION="${DEFAULT_DOCKER_VERSION}"
     9  
    10  bundle .integration-daemon-start
    11  
    12  cp bundles/libcompose-cli venv/bin/docker-compose
    13  . venv/bin/activate
    14  
    15  docker-compose --version
    16  cd venv/compose
    17  
    18  # if the tests fail, we still want to execute a few cleanup commands
    19  # so we save the result for the exit command at the end.
    20  # the "or" ensures that return code isn't trapped by the parent script.
    21  timeout --foreground 15m py.test -vs --tb=short $ACCEPTANCE_TEST_ARGS tests/acceptance || result=$?
    22  
    23  cd -
    24  bundle .integration-daemon-stop
    25  
    26  # TODO: exit with $result status when tests are more stable.
    27  return 0