-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Failed 'tests/misc/sys_settrace_features.py' #6689
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
Comments
The .exp for this test is generated by running the file with CPython so the line which has
|
I patched
Still fails:
Wrong syntax or wrong patch? |
Can you show the diff (i.e. run-tests --print-failures)? |
With a But a How is this obfuscated script supposed d to work? |
Both commandlines shown are the same so not really sure what you mean. The diff still has the exact same problem, which is strange because e.g.
Which one? |
I meant |
I'm testing it here and the patch makes the path problem go away, and tests pass, so I'm not sure what the problem is on your machine. See #6690 which works for me. |
I've applied you diff and reran
as before. And I noted on AppVeyor all these relevant tests are marked
E.g. this one. So how can you prove your diff works? |
Because settrace isn't enabled by default and the CI builds d not change that - you also had to change code or pass different flags to
Here's a build for which I enabled it and where you can see all 3 tests pass both for the msvc and mingw ports: https://ci.appveyor.com/project/stinos/micropython/build/job/4jaq3kg21j8yrsba?fullLog=true (I don't know how long this stays available though) So obviously something is different for you, but I don't know what and can't really help you. You could start by adding a |
Does |
Sorry now I'm confused: I always assumed you were running a build where you explicitly enabled MICROPY_PY_SYS_SETTRACE, which for the windows ports means e.g. putting this in ports/windows/mpconfigport.h:
If that is not enabled, all related tests should be skipped automatically because the test files start with
So when run with micropython without settrace functionality, this prints SKIP and run-tests picks that up to skip the test. However from your explanation I now get the impression you didn't enable it explicitly, yet are gettings test failures. No idea how that is even possible. To figure out what is wrong you'll have to supply enough information so we can get an idea of what you are doing exactly:
|
Off course I have |
Well, the previous comment asked whether MICROPY_PY_SYS_SETTRACE has anything to do with this; to be on the safe side I did not interpret that as 'off course' :) |
Trying to simplify this nerdy tool:
Isn't that how |
Basically, yes, but perhaps not exactly, and that might matter here. Though if I run those commands (only difference for me being I invoke ..\ports\windows\micropython.exe) I get 2 files which are exactly the same. |
@gvanem any news here? In the meantime I confirmed the fixes in aforementioned PR on multiple systems. Did you already figure out why simple replacing the slashes doesn't work on your setup? |
I made a minor change to this settrace test in e0bb7a5 to make it work with more recent Python 3 versions. Not sure if that changes anything here. |
I had that one in my PR already, and the diff shown earlier only shows path differences, no zipimport calls, so shouldn't matter here I think. |
@stinos I did a
Seems the But I'm utterly confused about what happens here. |
Seeing the differences you have, is it possible you just pulled master? That won't cut it, my PR isn't merged there yet. The code from the PR can be fetched like
where 'upstream' is the name of the MicroPython remote you use.
As mentioned earlier: the equivalent of this code is in the PR
so the most logical explanation would be that this code is not what you are using? How else could you still get the complete filename printed?
Which should also be solved by the PR since it explicitly skips any stack frame with "encodings" in it's name. |
Ah, indeed, sorry, I missed it! |
I'm closing this as this test-command (in my Makefile) works:
But adding option
Note it runs |
Have you considered your failure to understanding is the problem here, not the tool? I politely ignored all your other snarky comments in this thread, but this kind of language is not appreciated here. We want to maintain a nice and friendly environment. And there's plenty of room for criticism and reporting problems, I mean after all it's an issue tracker, but there's no reason to do that in such a disrespectful manner. |
Fixes micropython#6654 and fixes micropython#6689
I've built MicroPython on Windows and notice some failures due to mixed expectation of
/
vs\
in filenames.The diff between:
tests\results\misc_sys_settrace_features.py.exp
andtests\results\misc_sys_settrace_features.py.out
contains a lot of lines like these:
The line responsible for this difference is AFAICS in
tests\misc\sys_settrace_features.py
:"misc" + "".join(frame.f_code.co_filename.split("tests/misc")[-1:]),
Where is the cause of these diffs? And how is the
.exp
file generated?The text was updated successfully, but these errors were encountered: