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

Introduce support for CMake-based ns-3 versions and fix tests #62

Merged
merged 26 commits into from
Jan 27, 2023

Conversation

pagmatt
Copy link
Member

@pagmatt pagmatt commented Jan 20, 2023

This PR completes the support for the newer, CMake-based versions of ns-3.

The main changes are:

  • Updated CI workflow checkout action from v2 to v3 to solve a related warning.
  • Switched to ns-3 mainline repository for the examples/ns-3 submodule. In order to test SEM with both the CMake and the waf versions of ns-3, in this case the repo is checked out at release ns-3.35
  • When merging TinyDB tables, re-assign document IDs (which must be unique for each entry) in order to prevent errors. In this regard, the additional import of Document from tinydb.table has been added in cli.py
  • Introduced support for platform-dependent build status filename in ns-3.36+
  • In the configure_and_build function, do not redirect to PIPE stderr when calling subprocess.Popen ().
    When compiling, you can now get a mix of stdout and stderr output when compilation errors and/or warnings arise. This was causing a race condition between stdout.readline () and subprocess.poll () which caused get_build_output to never return.
    It is actually suggested to use subprocess.communicate () as a safer alternative; however, this would not allow us to retrieve the compilation progress. Thus, the proposed solution of missing out on stderr, while at least capturing stdout.
  • Prevented copying CMake cache when creating symlinks in the tests. Previously, this caused errors since the cache is path-dependent. I tried to circumvent this dependence instead of not copying the cache, but I was not able to do it.
  • Enabled only the core module by using the --enable-modules=core flag when configuring ns-3 during the tests. Since only such module is needed, this was an obvious choice as it significantly reduces testing time.
  • In the tests, switched from /usr/share/dict/web2 and /usr/share/dict/web2a as input parameters to /usr/share/dict/american-english and /usr/share/dict/british-english. The previous dictionaries are not installed by default on recent Ubuntu distributions.

@pagmatt pagmatt requested a review from DvdMgr January 25, 2023 14:46
@pagmatt pagmatt marked this pull request as ready for review January 25, 2023 14:47
@pagmatt pagmatt linked an issue Jan 25, 2023 that may be closed by this pull request
@MatteoDrago
Copy link
Member

MatteoDrago commented Jan 26, 2023

Massive work, @pagmatt.

Shouldn't get_command_from_result from sem/utils.py be updated for consistency?

@pagmatt
Copy link
Member Author

pagmatt commented Jan 26, 2023

Massive work, @pagmatt.

Shouldn't get_command_from_result from sem/utils.py be updated for consistency?

Thanks @MatteoDrago!
Indeed it should.
My plan is to first release an updated version of SEM which at the very least works, and then work on fixing smaller issues, such as the one you pointed out! But I will try to sneak this one in 😄

@MatteoDrago
Copy link
Member

Massive work, @pagmatt.
Shouldn't get_command_from_result from sem/utils.py be updated for consistency?

Thanks @MatteoDrago! Indeed it should. My plan is to first release an updated version of SEM which at the very least works, and then work on fixing smaller issues, such as the one you pointed out! But I will try to sneak this one in 😄

Makes totally sense. As a matter of fact, the doc should be updated as well in some points... But that's for another PR, I agree! Thanks!

@pagmatt pagmatt merged commit 92aaf8b into master Jan 27, 2023
@pagmatt pagmatt deleted the new-buildsystem-fix branch April 20, 2023 19:44
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.

Error: "No such file or directory: 'path-to-ns3/build/build-status.py'"
3 participants