Extra newline characters in test case results
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
UTAH |
Fix Released
|
Low
|
Javier Collado |
Bug Description
When running test cases through the utah client, extra newline characters are appended to the output in the report. For example instead of:
INFO: Opening file '/tmp/a' for writing...
INFO: Checking if the file opened...
INFO: Writing 'a' to '/tmp/a'...
INFO: Closing file...
INFO: Opening file '/tmp/a' for reading...
INFO: Checking if the file opened...
INFO: Reading file contents...
INFO: Closing file...
.
-------
Ran 1 test in 0.001s
OK
the output in the report is:
stderr: 'INFO: Opening file ''/tmp/a'' for writing...
INFO: Checking if the file opened...
INFO: Writing ''a'' to ''/tmp/a''...
INFO: Closing file...
INFO: Opening file ''/tmp/a'' for reading...
INFO: Checking if the file opened...
INFO: Reading file contents...
INFO: Closing file...
.
---
Ran 1 test in 0.000s
OK
'
The expected result would be to get the same output as when the test case script is executed in a terminal.
Related branches
- Joe Talbott (community): Approve
- UTAH Dev: Pending requested
-
Diff: 43 lines (+29/-2)1 file modifiedutah/client/result.py (+29/-2)
- Max Brustkern: Pending requested
-
Diff: 10666 lines (+6316/-1397)85 files modifiedCOPYING (+674/-0)
Makefile (+1/-1)
client-Makefile (+4/-1)
client.py (+15/-0)
conf/utah/uqt-vm-tools.conf (+1/-1)
debian/changelog (+101/-0)
debian/control (+17/-3)
debian/rules (+21/-2)
debian/utah.install (+2/-0)
debian/utah.postinst (+10/-2)
distribute_setup.py (+3/-1)
docs/source/conf.py (+42/-23)
docs/source/reference.rst (+17/-0)
examples/run_install_test.py (+43/-18)
examples/run_test_bamboo_feeder.py (+123/-0)
examples/run_test_cobbler.py (+55/-25)
examples/run_test_vm.py (+38/-14)
examples/run_utah_tests.py (+51/-31)
examples/utah_logs.sh (+3/-1)
examples/utah_syslog.sh (+1/-1)
setup.py (+20/-6)
tests/test_parser.py (+60/-0)
tests/test_preseed.py (+476/-33)
utah/__init__.py (+15/-0)
utah/client/__init__.py (+15/-0)
utah/client/common.py (+70/-32)
utah/client/examples/test_state_partial_all_failed.yaml (+90/-0)
utah/client/examples/test_state_partial_inprogress.yaml (+90/-0)
utah/client/examples/test_state_partial_run_all.yaml (+90/-0)
utah/client/exceptions.py (+15/-0)
utah/client/phoenix.py (+40/-25)
utah/client/result.py (+48/-22)
utah/client/runner.py (+66/-58)
utah/client/state_agent.py (+15/-0)
utah/client/testcase.py (+73/-51)
utah/client/tests/__init__.py (+14/-0)
utah/client/tests/common.py (+43/-0)
utah/client/tests/manual_privileges.py (+17/-2)
utah/client/tests/test_common.py (+22/-7)
utah/client/tests/test_jsonschema.py (+21/-49)
utah/client/tests/test_misc.py (+15/-0)
utah/client/tests/test_phoenix.py (+25/-10)
utah/client/tests/test_result.py (+22/-5)
utah/client/tests/test_runner.py (+22/-7)
utah/client/tests/test_state_agent.py (+134/-68)
utah/client/tests/test_testcase.py (+46/-31)
utah/client/tests/test_testsuite.py (+45/-23)
utah/client/tests/test_vcs_bzr.py (+15/-0)
utah/client/tests/test_vcs_dev.py (+15/-0)
utah/client/tests/test_vcs_git.py (+15/-0)
utah/client/tests/test_yaml.py (+51/-36)
utah/client/testsuite.py (+31/-13)
utah/commandstr.py (+15/-0)
utah/config.py (+192/-18)
utah/exceptions.py (+15/-12)
utah/group.py (+15/-0)
utah/iso.py (+277/-118)
utah/isotest/data/file_list_di (+23/-23)
utah/isotest/data/file_list_ubiquity (+21/-21)
utah/isotest/iso_static_validation.py (+85/-60)
utah/orderedcollections.py (+90/-0)
utah/parser.py (+211/-0)
utah/preseed.py (+669/-119)
utah/process.py (+20/-5)
utah/provisioning/__init__.py (+15/-0)
utah/provisioning/baremetal/__init__.py (+15/-0)
utah/provisioning/baremetal/bamboofeeder.py (+301/-0)
utah/provisioning/baremetal/cobbler.py (+124/-130)
utah/provisioning/baremetal/exceptions.py (+15/-0)
utah/provisioning/baremetal/power.py (+90/-0)
utah/provisioning/exceptions.py (+15/-0)
utah/provisioning/inventory/__init__.py (+15/-0)
utah/provisioning/inventory/exceptions.py (+15/-0)
utah/provisioning/inventory/inventory.py (+20/-5)
utah/provisioning/inventory/sqlite.py (+87/-52)
utah/provisioning/provisioning.py (+337/-107)
utah/provisioning/vm/__init__.py (+15/-0)
utah/provisioning/vm/exceptions.py (+15/-0)
utah/provisioning/vm/libvirtvm.py (+124/-70)
utah/provisioning/vm/vm.py (+16/-0)
utah/publish.py (+146/-0)
utah/retry.py (+15/-0)
utah/run.py (+142/-34)
utah/timeout.py (+21/-4)
utah/url.py (+182/-17)
Changed in utah: | |
status: | New → Triaged |
importance: | Undecided → Low |
assignee: | nobody → Javier Collado (javier.collado) |
status: | Triaged → In Progress |
Changed in utah: | |
status: | In Progress → Fix Committed |
status: | Fix Committed → Fix Released |
This is an issue related to the way long strings are encoded in yaml.
One good solution would be to work on the to print literal blocks as explained here: stackoverflow. com/q/6432605/ 183066
http://