mirror of
https://github.com/lammertb/libhttp.git
synced 2025-12-22 04:02:04 +03:00
move travis tests to ci/ from test/ci_tests
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -247,5 +247,5 @@ tags
|
|||||||
##########################
|
##########################
|
||||||
## Travis Build Dir
|
## Travis Build Dir
|
||||||
##########################
|
##########################
|
||||||
.travis/lua
|
ci/lua
|
||||||
|
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ compiler:
|
|||||||
install: make WITH_LUA=1 WITH_DEBUG=1 WITH_IPV6=1 WITH_WEBSOCKET=1
|
install: make WITH_LUA=1 WITH_DEBUG=1 WITH_IPV6=1 WITH_WEBSOCKET=1
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- .travis/setup_lua.sh
|
- ci/travis/setup_lua.sh
|
||||||
- .travis/install_rocks.sh
|
- ci/travis/install_rocks.sh
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- .travis/run_ci_tests.sh
|
- ci/travis/run_ci_tests.sh
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -ev
|
|
||||||
|
|
||||||
source .travis/lua_env.sh
|
|
||||||
busted -o TAP test/ci_tests/
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
civet = require "test/ci_tests/civet"
|
civet = require "ci/test/civet"
|
||||||
local curl = require "cURL"
|
local curl = require "cURL"
|
||||||
|
|
||||||
describe("civetweb basic", function()
|
describe("civetweb basic", function()
|
||||||
@@ -2,13 +2,14 @@ socket = require "socket"
|
|||||||
|
|
||||||
local civet = {}
|
local civet = {}
|
||||||
|
|
||||||
|
-- default params
|
||||||
civet.port=12345
|
civet.port=12345
|
||||||
civet.max_retry=100
|
civet.max_retry=100
|
||||||
civet.start_delay=0.1
|
civet.start_delay=0.1
|
||||||
|
|
||||||
function civet.start(docroot)
|
function civet.start(docroot)
|
||||||
-- TODO: use a property
|
-- 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'
|
assert(io.popen('./civetweb'
|
||||||
.. " -listening_ports " .. civet.port
|
.. " -listening_ports " .. civet.port
|
||||||
.. " -document_root " .. docroot
|
.. " -document_root " .. docroot
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -ev
|
set -ev
|
||||||
|
|
||||||
source .travis/lua_env.sh
|
source ci/travis/lua_env.sh
|
||||||
|
|
||||||
# add any rocks required for ci_tests to this list
|
# add any rocks required for ci_tests to this list
|
||||||
# lua-curl depends on a libcurl development package (i.e. libcurl4-openssl-dev)
|
# lua-curl depends on a libcurl development package (i.e. libcurl4-openssl-dev)
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
LUAROCKS=.travis/lua/bin/luarocks
|
LUAROCKS=ci/lua/bin/luarocks
|
||||||
eval $($LUAROCKS path --bin)
|
eval $($LUAROCKS path --bin)
|
||||||
|
|
||||||
7
ci/travis/run_ci_tests.sh
Executable file
7
ci/travis/run_ci_tests.sh
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -ev
|
||||||
|
|
||||||
|
source ci/travis/lua_env.sh
|
||||||
|
busted -o TAP ci/test/
|
||||||
|
|
||||||
|
|
||||||
@@ -8,7 +8,7 @@ set -ev
|
|||||||
# After this script is finished, you can configure your environment to
|
# After this script is finished, you can configure your environment to
|
||||||
# use it by sourcing lua_env.sh
|
# use it by sourcing lua_env.sh
|
||||||
|
|
||||||
source .travis/platform.sh
|
source ci/travis/platform.sh
|
||||||
|
|
||||||
# The current versions when this script was written
|
# The current versions when this script was written
|
||||||
LUA_VERSION=5.2.4
|
LUA_VERSION=5.2.4
|
||||||
@@ -18,7 +18,7 @@ LUAROCKS_VERSION=2.2.2
|
|||||||
SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||||
|
|
||||||
# civetweb base dir
|
# civetweb base dir
|
||||||
PROJECT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )"/.. && pwd )
|
PROJECT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )"/../.. && pwd )
|
||||||
|
|
||||||
# fetch and unpack lua src
|
# fetch and unpack lua src
|
||||||
cd $SCRIPT_DIR
|
cd $SCRIPT_DIR
|
||||||
@@ -32,7 +32,7 @@ make $PLATFORM
|
|||||||
make local
|
make local
|
||||||
|
|
||||||
# mv built lua install to target Lua dir
|
# mv built lua install to target Lua dir
|
||||||
LUA_DIR=$SCRIPT_DIR/lua
|
LUA_DIR=$PROJECT_DIR/ci/lua
|
||||||
rm -rf $LUA_DIR
|
rm -rf $LUA_DIR
|
||||||
mv $SCRIPT_DIR/$LUA_BASE/install $LUA_DIR
|
mv $SCRIPT_DIR/$LUA_BASE/install $LUA_DIR
|
||||||
|
|
||||||
Reference in New Issue
Block a user