Skip to content
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

adding dryrun trace test and expected app trace #161

Merged
merged 13 commits into from
Mar 21, 2022
Merged

Conversation

barnjamin
Copy link
Contributor

@barnjamin barnjamin commented Feb 5, 2022

Copy link
Contributor

@tzaffi tzaffi left a comment

Choose a reason for hiding this comment

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

suggesting another test case

features/unit/dryrun_trace.feature Outdated Show resolved Hide resolved
Copy link
Contributor

@tzaffi tzaffi left a comment

Choose a reason for hiding this comment

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

A couple of suggestions around naming conventions and removing a step that seems a bit redundant.

A possible future improvement -but not worth holding up this PR for- is to do one of the following (or even both):

  • add the possibility of CSV output (with no truncation). So would add example files and a step such as:
    • Then calling app trace CSV produces "<app-trace-csv-file>"
  • add the possibility of non-truncated output. So would add example files and a step such as:
    • Then calling app trace no-truncation produces "<app-trace-notrunc-file>"

Copy link
Contributor

@tzaffi tzaffi left a comment

Choose a reason for hiding this comment

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

LGTM

For future reference, recommend opening an issue for possible improvements cited above (CSV + no truncation).

Also new issue that cropped up: handling errors in the trace. EG:

348 |    43 |   25 | swap                   |           | [21, 2432902008176640000, 21]
349 |    45 |   26 | store 0                | 0->21     | [21, 2432902008176640000]
350 |    45 |   26 | * overflowed           |           | [21, 2432902008176640000]

Which we can get from a switch that looks like this:

def line_or_err(i, ln):
    line = lines[ln - 1]
    err = trace[i].get("error")
    return err if err else line

@unit
Feature: Dryrun Trace

@unit.dryrun.trace.application
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add this to the table in the README then we can merge it in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants