[alembic] Unit tests are broken on windows. #51331

Closed
opened 2017-04-27 02:39:17 +02:00 by Ray molenkamp · 9 comments
Member

There are a lot of factors here that lead to the tests failing..

  1. It can't find the blender executable

https://git.blender.org/gitweb/gitweb.cgi/blender.git/blob/HEAD:/tests/python/CMakeLists.txt#l465

this needs to be

--blender "$<TARGET_FILE:blender>"
  1. windows paths are annoying
    https://git.blender.org/gitweb/gitweb.cgi/blender.git/blob/HEAD:/tests/python/alembic_tests.py#l219

The problem here is the filepath, windows path separators are back slashes so with the path "c:\users\someuser\appdata\local\temp\blah.abc" blender will try to unescape \u \s \a \l \t and \b which naturally ends in disaster. we either have to escape the path before stuffing it into the script or prefix the string with an r to get a literal string. (this applies to all filepath's I just linked the first one out of laziness)

  1. We build none of the alembic binary tools on windows.

This has never been a requirement, and I never received a request to include them in the svn libs. The test tries to execute abcls and fails miserably. I can update the buildscripts and add the binaries to svn if you want. Do you just want abcls or do you want the whole set ( abcdiff abcecho abcechobounds abcls abcstitcher abctree ) ?

  1. I have no idea.

I think they run now, but it's still pretty unhappy about the whole thing. I'll attach a log to this ticket

alembic_testlog.txt

There are a lot of factors here that lead to the tests failing.. 1) It can't find the blender executable https://git.blender.org/gitweb/gitweb.cgi/blender.git/blob/HEAD:/tests/python/CMakeLists.txt#l465 this needs to be ``` --blender "$<TARGET_FILE:blender>" ``` 2. windows paths are annoying https://git.blender.org/gitweb/gitweb.cgi/blender.git/blob/HEAD:/tests/python/alembic_tests.py#l219 The problem here is the filepath, windows path separators are back slashes so with the path "c:\users\someuser\appdata\local\temp\blah.abc" blender will try to unescape \u \s \a \l \t and \b which naturally ends in disaster. we either have to escape the path before stuffing it into the script or prefix the string with an r to get a literal string. (this applies to all filepath's I just linked the first one out of laziness) 3. We build none of the alembic binary tools on windows. This has never been a requirement, and I never received a request to include them in the svn libs. The test tries to execute abcls and fails miserably. I can update the buildscripts and add the binaries to svn if you want. Do you just want abcls or do you want the whole set ( abcdiff abcecho abcechobounds abcls abcstitcher abctree ) ? 4. I have no idea. I think they run now, but it's still pretty unhappy about the whole thing. I'll attach a log to this ticket [alembic_testlog.txt](https://archive.blender.org/developer/F574158/alembic_testlog.txt)
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Author
Member

Added subscriber: @LazyDodo

Added subscriber: @LazyDodo
Sybren A. Stüvel was assigned by Ray molenkamp 2017-04-27 02:39:37 +02:00

Thanks for looking into this.

So far the tests only depend on abcls. I don't want to use Blender's Alembic importer to test the exporter, as that can hide bugs (in the past, off-by-one errors in the exporter were compensated for in the importer). Maybe some day we'll have proper Python bindings (see this discussion on the Alembic discussion list), or maybe we'll just have to write some CTypes wrappers for libAlembic. I'm sure it'll be a lot easier to manage & more stable than parsing the output of abcls (but maybe my feature request will help in that area too).

Thanks for looking into this. So far the tests only depend on abcls. I don't want to use Blender's Alembic importer to test the exporter, as that can hide bugs (in the past, off-by-one errors in the exporter were compensated for in the importer). Maybe some day we'll have proper Python bindings (see [this discussion](https:*groups.google.com/forum/#!topic/alembic-discussion/ok2pJyvr798) on the Alembic discussion list), or maybe we'll just have to write some CTypes wrappers for libAlembic. I'm sure it'll be a lot easier to manage & more stable than parsing the output of abcls (but maybe [my feature request](https:*github.com/alembic/alembic/issues/121) will help in that area too).
Author
Member

I resolved point 3 in svn, all flavors of the windows libs now have the binary tools, all others i'm gonna leave up to you , just poke me on irc if you need something tested

I resolved point 3 in svn, all flavors of the windows libs now have the binary tools, all others i'm gonna leave up to you , just poke me on irc if you need something tested
  1. That's easy to fix.
  2. Fortunately Windows also understands forward slashes. This means we can use path.as_posix() and avoid the backslashes of hell.

The tests failing could have something to do with the newline style on Windows.

I've put fixes for the above into the branch temp-sybren-abc-tests-windows, can you give that a try?

1. That's easy to fix. 2. Fortunately Windows also understands forward slashes. This means we can use `path.as_posix()` and avoid the backslashes of hell. The tests failing could have something to do with the newline style on Windows. I've put fixes for the above into the branch `temp-sybren-abc-tests-windows`, can you give that a try?
Author
Member

All tests pass in the temp branch! looks like those changes are good to go!

All tests pass in the temp branch! looks like those changes are good to go!

This issue was referenced by 1e8d7f3b25

This issue was referenced by 1e8d7f3b25a3dd6d118123c889374f32c0f8af51

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Thanks for testing :)

Thanks for testing :)
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#51331
No description provided.