You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe that when I am trying to update the reference files, all of the reference files get updated which is unexpected. I guess this is because I am not running the windows equivalent of rm ./* after cd tests/reference. Could you kindly help me figuring out a windows equivalent for that command.
I'll attach screen shots for clarity on what is going on.
Image_1 shows all reference files being updated instead of only the required ones.
Image_2 shows commands that I am running to update( where rm ./* is intended to delete unwanted files)
What you can do is commit the changes you have made so far. Update your main branch locally, from origin. Then merge main into your working branch. Do a clean build. And run python run_tests.py -u.
Currently, python run_tests.py -u doesn't work as expected in Windows. i.e., Both Linux and macOS get updated with the same output but this isn't the case in Windows. This might be the issue related to the \n\r or simply \n is not handled correctly in Windows (or possibly some other issue.). This was the reason for multiple files get updated like this: 9628b56 (#1430), when you do python run_tests -u
Also, regarding the rm ./*, be very careful while using this command, it can remove all the files in the current directory.
I use this: rm tests\references\* command only during the git rebase or git merge (which caused conflicts in the references) or while modifying the options name in run_tests. While the rest of the time, I only do run_tests.py -u.
I was under the assumption that #1463 was an attempt to fix python run_test.py -u but it doesn't and all the reference files get updated (I have fetched the latest changes).
If I only run python run_test.py it does show me the changes the stdout_hash should have in the form of errors but then I have to make those manually which I would not prefer.
#1463 fixed run_tests.py, but not run_tests.py -u. @faze-geek would you be interested in sending us a PR that fixes run_tests.py -u on windows? That would be a big help.
I see, the issue is with the git clone. So, previously while you cloned the lpython repo all the files were converted to CRLF format. Even if you fetched the latest changes, it wouldn't update the file format. That might be the reason for the failure.
Commit the changes and publish or push the changes of the branches that you were working on if any.
Delete the lpython directory. Clone it again (make sure the repo contains the .gitattributes file in it). Build and test it with python run_tests.py --skip-run-with-dbg.
If you face any issue with the python run_tests.py -u, please report it here.
I see, the issue is with the git clone. So, previously while you cloned the lpython repo all the files were converted to CRLF format. Even if you fetched the latest changes, it wouldn't update the file format. That might be the reason for the failure.
@Thirumalai-Shaktivel I tried this suggestion, this time the reference files get updated accordingly. I made a small test pr with minimal change so that I can test it out #1515 .
Once you have a look at it and give me a green flag, I'll close this issue. Thanks!
Activity
czgdp1807 commentedon Jan 25, 2023
What you can do is commit the changes you have made so far. Update your
mainbranch locally, fromorigin. Then mergemaininto your working branch. Do a clean build. And runpython run_tests.py -u.Thirumalai-Shaktivel commentedon Jan 25, 2023
Currently,
python run_tests.py -udoesn't work as expected in Windows. i.e., Both Linux and macOS get updated with the same output but this isn't the case in Windows. This might be the issue related to the\n\ror simply\nis not handled correctly in Windows (or possibly some other issue.). This was the reason for multiple files get updated like this:9628b56(#1430), when you dopython run_tests -uAlso, regarding the
rm ./*, be very careful while using this command, it can remove all the files in the current directory.I use this:
rm tests\references\*command only during thegit rebaseorgit merge(which caused conflicts in the references) or while modifying the options name in run_tests. While the rest of the time, I only dorun_tests.py -u.faze-geek commentedon Feb 3, 2023
I was under the assumption that #1463 was an attempt to fix
python run_test.py -ubut it doesn't and all the reference files get updated (I have fetched the latest changes).If I only run
python run_test.pyit does show me the changes thestdout_hashshould have in the form of errors but then I have to make those manually which I would not prefer.certik commentedon Feb 3, 2023
#1463 fixed
run_tests.py, but notrun_tests.py -u. @faze-geek would you be interested in sending us a PR that fixesrun_tests.py -uon windows? That would be a big help.Thirumalai-Shaktivel commentedon Feb 5, 2023
Yup, #1463 fixed
run_tests.py. But, I don't know why it didn't fixrun_tests.py -u. Let me check and report back.Thirumalai-Shaktivel commentedon Feb 5, 2023
I see, the issue is with the
git clone. So, previously while you cloned the lpython repo all the files were converted to CRLF format. Even if you fetched the latest changes, it wouldn't update the file format. That might be the reason for the failure.@faze-geek why don't you try this?
.gitattributesfile in it). Build and test it withpython run_tests.py --skip-run-with-dbg.If you face any issue with the
python run_tests.py -u, please report it here.faze-geek commentedon Feb 5, 2023
Sure, I will try the modifications you suggested soon. I will also test if
run_tests.pyis working correctly on my windows machine.faze-geek commentedon Feb 13, 2023
@Thirumalai-Shaktivel I tried this suggestion, this time the reference files get updated accordingly. I made a small test pr with minimal change so that I can test it out #1515 .
Once you have a look at it and give me a green flag, I'll close this issue. Thanks!
faze-geek commentedon Mar 17, 2023
Closing as completed in #1463 and
Readmeupdated by this commit