move travis tests to ci/ from test/ci_tests

This commit is contained in:
Nick Hildebrant 2015-05-02 00:02:42 +02:00
parent 93fbcb33b1
commit bfba8d105d
13 changed files with 19 additions and 18 deletions

2
.gitignore vendored
View File

@ -247,5 +247,5 @@ tags
##########################
## Travis Build Dir
##########################
.travis/lua
ci/lua

View File

@ -8,8 +8,8 @@ compiler:
install: make WITH_LUA=1 WITH_DEBUG=1 WITH_IPV6=1 WITH_WEBSOCKET=1
before_script:
- .travis/setup_lua.sh
- .travis/install_rocks.sh
- ci/travis/setup_lua.sh
- ci/travis/install_rocks.sh
script:
- .travis/run_ci_tests.sh
- ci/travis/run_ci_tests.sh

View File

@ -1,7 +0,0 @@
#!/bin/bash
set -ev
source .travis/lua_env.sh
busted -o TAP test/ci_tests/

View File

@ -1,4 +1,4 @@
civet = require "test/ci_tests/civet"
civet = require "ci/test/civet"
local curl = require "cURL"
describe("civetweb basic", function()

View File

@ -2,13 +2,14 @@ socket = require "socket"
local civet = {}
-- default params
civet.port=12345
civet.max_retry=100
civet.start_delay=0.1
function civet.start(docroot)
-- TODO: use a property
docroot = docroot or 'test/ci_tests/01_basic/docroot'
docroot = docroot or 'ci/test/01_basic/docroot'
assert(io.popen('./civetweb'
.. " -listening_ports " .. civet.port
.. " -document_root " .. docroot

View File

@ -1,7 +1,7 @@
#!/bin/bash
set -ev
source .travis/lua_env.sh
source ci/travis/lua_env.sh
# add any rocks required for ci_tests to this list
# lua-curl depends on a libcurl development package (i.e. libcurl4-openssl-dev)

View File

@ -1,5 +1,5 @@
#!/bin/bash
LUAROCKS=.travis/lua/bin/luarocks
LUAROCKS=ci/lua/bin/luarocks
eval $($LUAROCKS path --bin)

7
ci/travis/run_ci_tests.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash
set -ev
source ci/travis/lua_env.sh
busted -o TAP ci/test/

View File

@ -8,7 +8,7 @@ set -ev
# After this script is finished, you can configure your environment to
# use it by sourcing lua_env.sh
source .travis/platform.sh
source ci/travis/platform.sh
# The current versions when this script was written
LUA_VERSION=5.2.4
@ -18,7 +18,7 @@ LUAROCKS_VERSION=2.2.2
SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
# civetweb base dir
PROJECT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )"/.. && pwd )
PROJECT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )"/../.. && pwd )
# fetch and unpack lua src
cd $SCRIPT_DIR
@ -32,7 +32,7 @@ make $PLATFORM
make local
# mv built lua install to target Lua dir
LUA_DIR=$SCRIPT_DIR/lua
LUA_DIR=$PROJECT_DIR/ci/lua
rm -rf $LUA_DIR
mv $SCRIPT_DIR/$LUA_BASE/install $LUA_DIR