Skip to content

missing log in only_generate mode #230

Description

@weixlu

Hi maintainer,

I think fuzz test for CPython is a great idea! For example, multi-threading related bugs are quite hard to catch with regular tests (although we have buildbot to track this), and fuzz testing or stress testing can be very effective approaches.

I'm learning how Fusil generates code (it’s amazing to see test code be automatically generated!), so I run it in --only-generate mode. During this I noticed an issue: even though the console prints:

[0][session 1] Fusil log written into python-1/project.log

the file does not actually exist. I need to manually enable --keep-sessions to keep this file.

I have two suggestions:

  1. If --keep-sessions is not enabled, we probably should not print Fusil log written into xxx, which seems confusing.
  2. More generally, I suggest that --only-generate mode should enable --keep-sessions by default.

The fix I propose is to return True in both ProjectDirectory.keepDirectory() and SessionDirectory.checkKeepDirectory():

if application.options.only_generate:
    return True

What do you think about this? I’d be happy to open a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions