-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
bug in code #4
Comments
Can you give more information? Can you make sure the |
please help me with that.
|
Hello,
|
Hi, Issue
(I used patch command that was printed in log to achive this error)
and for example.cpp
Solution
Now everything work like a charm. I hope this will help. |
The tool is still a bit buggy when it comes to patching. If a patch fails, there is no proper rollback and subsequent patches keep failing. You sometimes can fix this by restoring the original copy of the source file. |
Hi! Thanks for providing this tool! I have a similar problem as above. The mutation process just stops with this error in terminal: When I run the patch command as outputted in the console i get: When I read the cpp.rej file I don't get any clue of what is wrong. Tested both on a windows box and macosx. Also, when generating patches the checkboxes doesnt seem to do anything. I selected only comparision operator but it seemed to generate patches for all options, include line deletions which this particular patch was (it was the first one, I have yet to be able to run any patch). Thanks for any help! |
So I read zawadsoons post above little more carefully and indeed I had the same problem. I could change both encoding and line-ending in CLion. Patches still failed randomly though so I wrote this in Executor.py on line 88: try:
(markdown doesnt work well for that snipper) |
I ran in that problem too. I had to regenerate the patches to make it work. However, to do it properly, I had to regenerate the project entirely (i.e. delete + new). Why? Because if I click Regenerate again and again, it ADDs the same patches over and over again. (i.e. 700, 1400, 2100, etc.) It should replace the patches. Delete the existing ones and create new ones with the current file content, but that's probably a different issue than this one. To fix this one, we'd need to have a try/catch and avoid just dying on such errors. The patch may not apply properly because of recent changes right around the same location. i.e. click the "generate patches" button, edit code at a location which you know has a patch (i.e. a statement such as |
Hey @AlexisWilke, thanks for your help and your recent MRs! In fact, the work on this project is dormant from my side: I am happy to merge any MRs, but I will not be able to contribute further in the foreseeable future. |
File "/home/test/Desktop/mutate_cpp/app/utils/Executor.py", line 89, in workflow
self.__execute_command_timeout('patch -p1 --input={patchfile} {inputfile}'.format(patchfile=patchfile.name, inputfile=file.filename), cwd='/')
File "/home/test/Desktop/mutate_cpp/app/utils/Executor.py", line 71, in __execute_command_timeout
raise subprocess.CalledProcessError(errcode, command, stdout)
subprocess.CalledProcessError: Command 'patch -p1 --input=/tmp/tmpo7vp4cdf /home/test/Desktop/cmake-example/src/example.cpp' returned non-zero exit status 1
and also in reverse patch
The text was updated successfully, but these errors were encountered: