Skip to content

Unable to run cpp_standalone in multiple test files #905

Open
@zifeo

Description

@zifeo

I have multiple test files, each containing one single network that is explicitly build:

set_device('cpp_standalone')
# ...
net = Network()
net.add(...)
net.run(1 * s)

When the tests are run individually (pytest), everything is fine. However when running the whole folder I am getting the following, even though they are separated networks:

RuntimeError: The network has already been built and run before. Use set_device with build_on_run=False and an explicit device.build call to use multiple run statements with this device.

Is there a way of resetting the global shared state? Moreover is there a way of getting rid of the output folder that is created (codegen) when we get a crash (or a test failure), maybe using a flag?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions