Skip to content

rm dst directory if it already exists#14

Merged
WasabiFan merged 1 commit intoev3dev:masterfrom
dwalton76:master
May 27, 2019
Merged

rm dst directory if it already exists#14
WasabiFan merged 1 commit intoev3dev:masterfrom
dwalton76:master

Conversation

@dwalton76
Copy link
Copy Markdown
Collaborator

@WasabiFan
Copy link
Copy Markdown
Member

Any idea what caused this to start failing?

@WasabiFan WasabiFan merged commit d18c74a into ev3dev:master May 27, 2019
@dwalton76
Copy link
Copy Markdown
Collaborator Author

No clue...this is really weird now it is failing with an EISDIR error

@WasabiFan
Copy link
Copy Markdown
Member

It looks like this fix was applied to one particular copy operation, but perhaps not to all of them (in the loop below).

@WasabiFan
Copy link
Copy Markdown
Member

I'd expect it to be doing a clean_arena before running each test anyway; I wonder why that's not happening.

@dwalton76
Copy link
Copy Markdown
Collaborator Author

It is the rmtree that I added that is barfing though...we never make it to that loop

Traceback (most recent call last):
  File "/home/travis/.micropython/lib/unittest.py", line 213, in run_class
  File "tests/api_tests.py", line 95, in test_medium_motor
  File "tests/fake-sys/populate_arena.py", line 27, in populate_arena
  File "/home/travis/.micropython/lib/shutil.py", line 8, in rmtree
  File "/home/travis/.micropython/lib/os/__init__.py", line 105, in unlink
  File "/home/travis/.micropython/lib/os/__init__.py", line 72, in check_error
OSError: [Errno 21] EISDIR

@dwalton76
Copy link
Copy Markdown
Collaborator Author

@WasabiFan
Copy link
Copy Markdown
Member

My suggestion would be to figure out why clean_arena doesn't actually appear to be deleting everything. In theory, the whole folder should be empty at the beginning of each run.

@dwalton76
Copy link
Copy Markdown
Collaborator Author

@WasabiFan do we have docs somewhere on how to run the travis CI system locally?

@WasabiFan
Copy link
Copy Markdown
Member

There used to be a Travis CI documentation page on this, but I can't find it now. The simple answer is that, if you want to perfectly replicate the build environment, you can run their Docker container with their system setup scripts. There's an SO replica of the instructions here: https://stackoverflow.com/questions/21053657/how-to-run-travis-ci-locally

If you aren't able to/interested in running the full setup in Docker, my next recommendation would be to find a clean environment (perhaps a straight VM) and install uPy+dependencies from scratch using the install script we use on Travis and see if the versions it installs are broken. I didn't see any relevant changes in micropython-lib history (or, actually, any at all), but maybe it's another module.

@dwalton76
Copy link
Copy Markdown
Collaborator Author

dwalton76 commented May 29, 2019

@WasabiFan progress...I can get the tests to fail on my laptop if I use micropython v1.9.4 (I was using v1.10)

@dwalton76
Copy link
Copy Markdown
Collaborator Author

dwalton76 commented May 29, 2019

ok the delta from v1.9.4 to v1.10 is in os.walk. It is broken in 1.9.4 and thinks that the directories are files so when we try to os.unlink them it barfs. In v1.10 os.walk correctly IDs them as directories.

@dwalton76
Copy link
Copy Markdown
Collaborator Author

submitted PR #15 will continue discussion there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants