nlohmann / mutate_cpp

C++ Mutation Test Environment
MIT License
171 stars 22 forks source link

Problem when applying mutation patch for files with unix EOL #5

Closed michalkrzyz closed 5 years ago

michalkrzyz commented 5 years ago

For all files with unix EOL, the following error is printed by mutate_cpp application:

Traceback (most recent call last): File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner self.run() File "/usr/lib/python3.7/threading.py", line 865, in run self._target(*self._args, **self._kwargs) File "/home/michal/tmp/mutate_cpp/mutate_cpp/app/utils/Executor.py", line 42, in main self.workflow(patch) File "/home/michal/tmp/mutate_cpp/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/michal/tmp/mutate_cpp/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/tmpbn6g2m3d /home/michal/tmp/tmutate/tlab/src/utils/Timer.h' returned non-zero exit status 1.

It worked to me when I used unix2dos command, but it would be better to fix the issue in python files.

nlohmann commented 5 years ago

Closed with #6.