mirror of
https://github.com/clearml/wexpect-venv
synced 2025-03-03 18:51:55 +00:00
[ADD] dump logs
This commit is contained in:
parent
ee0b06f289
commit
557f759ff6
@ -18,11 +18,15 @@ install:
|
||||
|
||||
test_script:
|
||||
- tox
|
||||
|
||||
on_failure:
|
||||
- python dump_logs.py
|
||||
|
||||
after_test:
|
||||
# Upload code coverage results.
|
||||
# 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.
|
||||
# pypi
|
||||
- cmd: "echo [pypi] > %USERPROFILE%\\.pypirc"
|
||||
@ -52,4 +56,4 @@ after_test:
|
||||
- IF %APPVEYOR_REPO_BRANCH%==test (
|
||||
twine upload -r testpypi dist\\wexpect*.tar.gz
|
||||
)
|
||||
|
||||
|
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]
|
||||
description = Unit tests
|
||||
setenv =
|
||||
WEXPECT_LOGGER_LEVEL = DEBUG
|
||||
spawn_pipe: WEXPECT_SPAWN_CLASS=SpawnPipe
|
||||
legacy_wexpect: WEXPECT_SPAWN_CLASS=legacy_wexpect
|
||||
commands =
|
||||
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 xml --omit tests/*
|
||||
|
Loading…
Reference in New Issue
Block a user