Skip to content

Commit

Permalink
Fix test failure on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
yantor3d committed Jun 6, 2021
1 parent b4ded3e commit c4c58bd
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@
build/**
tmp/*
*.pyc
MFn.Types.inl
MFn.Types.inl
devkit.tgz
devkitBase
36 changes: 36 additions & 0 deletions Dockerfile.2022
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Build locally for Linux on any platform, e.g. Windows
FROM mottosso/maya:2022

RUN yum install centos-release-scl -y && \
yum install devtoolset-7 bc -y

# Download devkit
ENV DEVKIT_LOCATION=/root/devkitBase
ENV DEVKIT "https://autodesk-adn-transfer.s3.us-west-2.amazonaws.com/ADN%20Extranet/M%26E/Maya/devkit%202022/Autodesk_Maya_2022_DEVKIT_Linux.tgz"
RUN wget $DEVKIT -O "/root/devkit.tgz" && \
tar -xvf /root/devkit.tgz $pwd

# Setup Test Environment
RUN mayapy -m pip install --user \
nose==1.3.7 \
nose-exclude==0.5.0 \
coverage==5.5 \
flaky==3.7.0 \
six==1.16.0 \
sphinx==1.8.5 \
sphinxcontrib-napoleon==0.7

# Since 2019, this sucker throws an
# unnecessary warning if not declared.
RUN mkdir -p /var/tmp/runtime-root
ENV XDG_RUNTIME_DIR /var/tmp/runtime-root
ENV MAYA_DISABLE_ADP 1

# The local /build directory
ENV PYTHONPATH=/workspace/build

WORKDIR /workspace

COPY docker_entrypoint.sh /usr/bin/entrypoint.sh
RUN chmod +x /usr/bin/entrypoint.sh
ENTRYPOINT [ "/usr/bin/entrypoint.sh" ]
1 change: 0 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ PYBIND11_MODULE(cmdc, m) {
#include "MFn.inl"
#include "Types.inl"
#include "MObject.inl"
#include "MDagPath.inl"
#include "MFnDependencyNode.inl"
#include "MFnDagNode.inl"
#include "MBoundingBox.inl"
Expand Down
4 changes: 3 additions & 1 deletion tests/test_MDGModifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,12 @@ def test_deleteNode_pass():


def test_deleteNode_fail():
non_node_obj = cmdc.Object()

for exc, name, value in (
[ValueError, 'null object', cmdc.Object()],
[TypeError, 'non-node object', as_plug('persp.message').attribute()],
[TypeError, 'DAG object', as_obj(cmds.createNode('transform'))],
[TypeError, 'DAG object', as_obj('persp')],
):
test_deleteNode_fail.__doc__ = """Test MDGModifier::deleteNode raises error if called with a(n) {}.""".format(name)

Expand Down

0 comments on commit c4c58bd

Please sign in to comment.