mirror of
https://github.com/clearml/wexpect-venv
synced 2025-03-04 02:57:38 +00:00
[ADD] dump logs
This commit is contained in:
parent
ee0b06f289
commit
557f759ff6
@ -19,10 +19,14 @@ install:
|
|||||||
test_script:
|
test_script:
|
||||||
- tox
|
- tox
|
||||||
|
|
||||||
|
on_failure:
|
||||||
|
- python dump_logs.py
|
||||||
|
|
||||||
after_test:
|
after_test:
|
||||||
# Upload code coverage results.
|
# Upload code coverage results.
|
||||||
# https://github.com/codecov/codecov-python/issues/158#issuecomment-514282362
|
# https://github.com/codecov/codecov-python/issues/158#issuecomment-514282362
|
||||||
- codecov --no-color -X gcov --file coverage.xml --required || (sleep 5 && codecov --no-color -X gcov --file coverage.xml --required) || (sleep 5 && codecov --no-color -X gcov --file coverage.xml --required) || (sleep 5 && codecov --no-color -X gcov --file coverage.xml --required) || (sleep 5 && codecov --no-color -X gcov --file coverage.xml --required)
|
- codecov --required || (sleep 5 && codecov --required) || (sleep 5 && codecov --required) || (sleep 5 && codecov --required) || (sleep 5 && codecov --required)
|
||||||
|
|
||||||
# fill .pypirc file.
|
# fill .pypirc file.
|
||||||
# pypi
|
# pypi
|
||||||
- cmd: "echo [pypi] > %USERPROFILE%\\.pypirc"
|
- cmd: "echo [pypi] > %USERPROFILE%\\.pypirc"
|
||||||
|
15
dump_logs.py
Normal file
15
dump_logs.py
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
import os
|
||||||
|
import glob
|
||||||
|
|
||||||
|
read_files = glob.glob(".wlog/*.log")
|
||||||
|
|
||||||
|
for f in read_files:
|
||||||
|
with open(f, "r") as infile:
|
||||||
|
print(infile.read())
|
||||||
|
|
||||||
|
|
||||||
|
read_files = glob.glob("tests/.wlog/*.log")
|
||||||
|
|
||||||
|
for f in read_files:
|
||||||
|
with open(f, "rb") as infile:
|
||||||
|
print(infile.read())
|
3
tox.ini
3
tox.ini
@ -6,10 +6,11 @@ envlist = py{37}-spawn_pipe
|
|||||||
[testenv]
|
[testenv]
|
||||||
description = Unit tests
|
description = Unit tests
|
||||||
setenv =
|
setenv =
|
||||||
|
WEXPECT_LOGGER_LEVEL = DEBUG
|
||||||
spawn_pipe: WEXPECT_SPAWN_CLASS=SpawnPipe
|
spawn_pipe: WEXPECT_SPAWN_CLASS=SpawnPipe
|
||||||
legacy_wexpect: WEXPECT_SPAWN_CLASS=legacy_wexpect
|
legacy_wexpect: WEXPECT_SPAWN_CLASS=legacy_wexpect
|
||||||
commands =
|
commands =
|
||||||
pip install .[test]
|
pip install .[test]
|
||||||
coverage run -m unittest tests.test_echo.EchoTestCase.testPath tests.test_expect.ExpectTestCase.test_before_after tests.test_long.TestCaseLong.test_long
|
coverage run -m unittest tests.test_echo.EchoTestCase.testPath tests.test_expect.ExpectTestCase.test_before_after
|
||||||
coverage report --omit tests/*
|
coverage report --omit tests/*
|
||||||
coverage xml --omit tests/*
|
coverage xml --omit tests/*
|
||||||
|
Loading…
Reference in New Issue
Block a user