Skip to content

Improve python tracing process #2662

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Oct 26, 2023
Merged

Improve python tracing process #2662

merged 17 commits into from
Oct 26, 2023

Conversation

tamarinvs19
Copy link
Collaborator

@tamarinvs19 tamarinvs19 commented Oct 20, 2023

Description

Coverage

Supported new coverage measurement mode for python with uses instructions.
Current methods:

  • use lines coverage (previous)
  • use instructions coverage (by default now)

Added new option to change coverage output format:

  • lines (default)
  • instructions

Added new option to switch off sending coverage continuously during execution. If you use this option execution process will be faster but in case unexpected failure of execution we will lose coverage info. By default this option is inactive.

Modifications in utbot-framework

Make class Instruction open and inherited class PyInstruction. (See here)

All of this options you can set in python-cli:

  • --coverage-measure-mode (LINES/INSTRUCTIONS)
  • --do-not-send-coverage-continuously
  • --coverage-output-format (LINES/INSTRUCTIONS)

Other

  • Added progress bar for script run_tests.py
  • Updated target values in test_configuration.json
  • Used python instructions in python fuzzing

How to test

Automated tests

Run utbot-python/samples/run_tests_all.sh and check coverage results.

Manual tests

Run python-cli with new arguments

Self-check list

Check off the item if the statement is true. Hint: [x] is a marked item.

Please do not delete the list or its items.

  • I've set the proper labels for my PR (at least, for category and component).
  • PR title and description are clear and intelligible.
  • I've added enough comments to my code, particularly in hard-to-understand areas.
  • The functionality I've repaired, changed or added is covered with automated tests.
  • Manual tests have been provided optionally.
  • The documentation for the functionality I've been working on is up-to-date.

@tamarinvs19 tamarinvs19 added ctg-refactoring Issue related to refactoring process lang-python Issue is related to python support labels Oct 20, 2023
@tamarinvs19 tamarinvs19 self-assigned this Oct 20, 2023
@tamarinvs19 tamarinvs19 marked this pull request as ready for review October 20, 2023 12:59
Copy link
Member

@tochilinak tochilinak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Problems with conversion from PyInstruction to UtInstruction (and probably they shouldn't be different classes, this logic is too complex).

@tochilinak
Copy link
Member

utbot-executor==1.8.0 not published on pypi

@tamarinvs19
Copy link
Collaborator Author

utbot-executor==1.8.0 not published on pypi

Fixed

@tamarinvs19 tamarinvs19 merged commit 6a87097 into main Oct 26, 2023
@tamarinvs19 tamarinvs19 deleted the tamarinvs19/python-todos branch October 26, 2023 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ctg-refactoring Issue related to refactoring process lang-python Issue is related to python support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants