Skip to content

Comments

unittest fix/workaround - remove CPU options and disable control_server#22

Open
brpollock wants to merge 1 commit intojtauber:masterfrom
brpollock:brian/fixtests
Open

unittest fix/workaround - remove CPU options and disable control_server#22
brpollock wants to merge 1 commit intojtauber:masterfrom
brpollock:brian/fixtests

Conversation

@brpollock
Copy link

There were two problems with test.py:

1, No options argument passed to CPU.__init__()

  • CPU options were only used to pass 'pc'. Rather than adding another
    get_options/Options to tests,py, replacing options with a pc argument
    removes CPU's dependency on command-line options.
  1. Failed to init control_server due to Address already in use
  • As a workaround for 'Address already in use', control_server is now
    enabled/disabled by memory.use_bus (which is False in unit tests).

With these changes, all 59 tests pass:

...........................................................
----------------------------------------------------------------------
Ran 59 tests in 0.336s

OK

- CPU options were only used to pass 'pc'. Rather than adding another
  get_options/Options to tests,py, replacing options with a pc argument
  removes CPU's dependency on command-line options.

- As a workaround for 'Address already in use', control_server is now
  enabled/disabled by memory.use_bus (which is False in unit tests).
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.

1 participant