Skip to content

utils.get_command_from_result assumes that waf is always the building system #78

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

Open
Thecave3 opened this issue Mar 18, 2025 · 1 comment
Labels
bug Something isn't working invalid This doesn't seem right

Comments

@Thecave3
Copy link
Collaborator

For sure a minor issue, but worth reporting: utils.get_command_from_result assumes that waf is always the building system

sem/sem/utils.py

Lines 104 to 122 in 6a39f0a

def get_command_from_result(script, result, debug=False):
"""
Return the command that is needed to obtain a certain result.
Args:
params (dict): Dictionary containing parameter: value pairs.
debug (bool): Whether the command should include the debugging
template.
"""
if not debug:
command = "python3 waf --run \"" + script + " " + " ".join(
['--%s=%s' % (param, value) for param, value in
result['params'].items()]) + "\""
else:
command = "python3 waf --run " + script + " --command-template=\"" +\
"gdb --args %s " + " ".join(['--%s=%s' % (param, value) for
param, value in
result['params'].items()]) + "\""
return command

Implementing something like this may help

if os.path.exists(os.path.join(self.path, "ns3")):

@Thecave3 Thecave3 added bug Something isn't working invalid This doesn't seem right labels Mar 18, 2025
@Thecave3
Copy link
Collaborator Author

A trivial but effective fix may be to just add another line with a different incipit string

./ns3 run 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

1 participant