Skip to content
Snippets Groups Projects
Commit e89cc876 authored by Marek Vavruša's avatar Marek Vavruša
Browse files

tests: added block module to tests

parent 271cf75d
No related branches found
No related tags found
No related merge requests found
......@@ -91,7 +91,7 @@ if [ "${TRAVIS_OS_NAME}" == "osx" ]; then
fi
if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
pkg cwrap ${CWRAP_URL} ${CWRAP_TAG} lib/pkgconfig/socket_wrapper.pc
pip install --user ${USER} -r ${PIP_PKGS}
pip install --user ${USER} -r ${PIP_PKGS} || true
rm ${HOME}/.cache/pip/log/debug.log || true
fi
......@@ -113,7 +113,7 @@ pkg cmocka ${CMOCKA_URL} ${CMOCKA_TAG} include/cmocka.h
# libuv
pkg libuv ${LIBUV_URL} ${LIBUV_TAG} include/uv.h --disable-static
# luajit
pkg lua ${LUA_URL} ${LUA_TAG} include/lua.h install LDFLAGS=-lm PREFIX=${PREFIX}
pkg lua ${LUA_URL} ${LUA_TAG} lib/pkgconfig/luajit.pc install LDFLAGS=-lm PREFIX=${PREFIX}
# remove on successful build
rm -rf ${BUILD_DIR}
net.listen('{{SELF_ADDR}}',53)
cache.size = 10*MB
modules = {'hints'}
modules = {'block','hints'}
hints.root({['k.root-servers.net'] = '{{ROOT_ADDR}}'})
option('NO_MINIMIZE', {{NO_MINIMIZE}})
option('ALLOW_LOCAL', true)
......
#!/usr/bin/env python
import traceback
class Test:
""" Small library to imitate CMocka output. """
......@@ -25,7 +26,7 @@ class Test:
passed += 1
print('[ OK ] %s' % name)
except Exception as e:
print('[ FAIL ] %s (%s)' % (name, str(e)))
print('[ FAIL ] %s (%s) at %s' % (name, str(e), traceback.print_exc()[0]))
# Clear test set
self.tests = []
......@@ -35,4 +36,4 @@ class Test:
return 0
else:
print('[ FAILED ] %d test(s).' % (planned - passed))
return 1
\ No newline at end of file
return 1
......@@ -245,8 +245,6 @@ def play_object(path, binary_name, config_name, j2template, binary_additional_pa
server.start()
try:
server.play()
except Exception as e:
print('... scenario "%s" crashed, logs in "%s"' % (os.path.basename(path), TMPDIR))
finally:
server.stop()
daemon_proc.terminate()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment