reduced usage of `os.chdir()` in Python scripts
Still a draft because I have not tested the non-tests scripts yet.
Even without my change test-my-pr.py fails for me:
$ python3 tools/test-my-pr.py
Namespace(j=1, p=256, packages=None, packages_path=None, o='my_check_diff.log', c_only=False, cpp_only=False, work_path='/home/sshuser/cppcheck-test-my-pr-workfolder')
using 'make'
Checking out main
Already on 'main'
Your branch is up to date with 'origin/main'.
Pulling main
Already up to date.
No changes detected
fatal: Not a valid object name origin/main
Error: Command '['git', 'merge-base', 'origin/main', 'HEAD']' returned non-zero exit status 128.
Failed to switch to common ancestor of your branch and main
Even without my change test-my-pr.py fails for me:
I am confused I have run that script now and then. Ludvig executed it last week on the branch where he tries to handle unnamed bitfield members . We used the --packages-path option but I don't see how that would change anything.
I am confused I have run that script now and then. Ludvig executed it last week on the branch where he tries to handle unnamed bitfield members . We used the
--packages-pathoption but I don't see how that would change anything.
If one of you is able to run it with the changes I think it would be fine to merge.
I tested the htmlreport locally and it also has unit tests.
If one of you is able to run it with the changes I think it would be fine to merge.
I ran test-my-pr on 4-5 packages and don't see such problems.