Skip to contentSkip to conversation

assimp.py: fix AttributeError in tearDownClass

PATCH In review Chen Qi 2 participants 6 messages Aug 17, 2018 – Aug 21, 2018

lore
Share & tools
lore

Chen Qi

author
#0 lore raw

cover assimp.py: fix AttributeError in tearDownClass

*** BLURB HERE ***
The following changes since commit 704e725bba37911e56ecd0edda694edfe9fce40f:

runtime selftest: limit kernel hw bp arches (2018-08-16 22:40:28 +0100)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib ChenQi/assimp
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/assimp

Chen Qi (1):
assimp.py: fix AttributeError in tearDownClass

 meta/lib/oeqa/sdk/cases/assimp.py | 5 -----
 1 file changed, 5 deletions(-)
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH 1/1 assimp.py: fix AttributeError in tearDownClass

When running this test case, we will see the following error.

AttributeError: type object 'BuildAssimp' has no attribute 'project'

assimp.py test case does not make use of SDKBuildProject, so remove the import statement and the tearDownClass.

---
 meta/lib/oeqa/sdk/cases/assimp.py | 5 -----
 1 file changed, 5 deletions(-)
meta/lib/oeqa/sdk/cases/assimp.py +0 -5
index 7251bdf..26c1df0 100644
@@ -1,7 +1,6 @@
 import os, subprocess, unittest
 import bb
 from oeqa.sdk.case import OESDKTestCase
-from oeqa.sdk.utils.sdkbuildproject import SDKBuildProject
 
 from oeqa.utils.subprocesstweak import errors_have_output
 errors_have_output()
@@ -62,7 +61,3 @@ class BuildAssimp(OESDKTestCase):
             self.assertEqual(machine, elf.machine())
             self.assertEqual(bits, elf.abiSize())
             self.assertEqual(endian, elf.isLittleEndian())
-
-    @classmethod
-    def tearDownClass(self):
-        self.project.clean()
Signature · 1 line
1.9.1
#2 lore raw
Quoted 5 lines · Chen Qi

When running this test case, we will see the following error.

AttributeError: type object 'BuildAssimp' has no attribute
'project'

Quoted 7 lines

assimp.py test case does not make use of SDKBuildProject, so remove the import statement and the tearDownClass.

---
 meta/lib/oeqa/sdk/cases/assimp.py | 5 -----
 1 file changed, 5 deletions(-)

I'm not seeing this error when I run the test and I can't see it on the autobuilders. Why are you seeing this and we're not?

I'm trying to understand some other odd behaviour in SDK tests and am wondering if this is related or not.

(e.g. https://autobuilder.yocto.io/builders/nightly-mips/builds/1221/st
eps/Running%20SDK%20Sanity%20Tests/logs/stdio)

Cheers,

Richard

#3 lore raw
Quoted 18 lines · Richard Purdie
Quoted 5 lines · Chen Qi

When running this test case, we will see the following error.

AttributeError: type object 'BuildAssimp' has no attribute
'project'

Quoted 7 lines

assimp.py test case does not make use of SDKBuildProject, so remove the import statement and the tearDownClass.

---
 meta/lib/oeqa/sdk/cases/assimp.py | 5 -----
 1 file changed, 5 deletions(-)

I'm not seeing this error when I run the test and I can't see it on the
autobuilders. Why are you seeing this and we're not?

Quoted 6 lines

I'm trying to understand some other odd behaviour in SDK tests and am wondering if this is related or not.

(e.g. https://autobuilder.yocto.io/builders/nightly-mips/builds/1221/
st
eps/Running%20SDK%20Sanity%20Tests/logs/stdio)

To answer my own question, disabling parallelism makes this show up. So we have a bug in the error handling code in the parallelism :(

Cheers,

Richard

author
#4 lore raw
In reply to Richard Purdie
Quoted 19 lines · Richard Purdie
Quoted 5 lines · Chen Qi

When running this test case, we will see the following error.

AttributeError: type object 'BuildAssimp' has no attribute
'project'

Quoted 7 lines

assimp.py test case does not make use of SDKBuildProject, so remove the import statement and the tearDownClass.

---
  meta/lib/oeqa/sdk/cases/assimp.py | 5 -----
  1 file changed, 5 deletions(-)

I'm not seeing this error when I run the test and I can't see it on the autobuilders. Why are you seeing this and we're not?

I'm trying to understand some other odd behaviour in SDK tests and am wondering if this is related or not.

Quoted 7 lines

(e.g. https://autobuilder.yocto.io/builders/nightly-mips/builds/1221/st
eps/Running%20SDK%20Sanity%20Tests/logs/stdio)

Cheers,

Richard

I did a quick search and found this one: https://github.com/pexpect/pexpect/pull/31
"""
|sys.stdout.buffer| is not guaranteed to exist - e.g. if |sys.stdout| has been reassigned to an |io.StringIO| instance, it won't. """

And we have in ConcurrencyTestSuite:
process_result._stdout_buffer = io.StringIO()

Best Regards,
Chen Qi

#5 lore raw
Quoted 39 lines · ChenQi
Quoted 23 lines · Richard Purdie
Quoted 5 lines · Chen Qi

When running this test case, we will see the following error.

AttributeError: type object 'BuildAssimp' has no attribute
'project'

Quoted 8 lines

assimp.py test case does not make use of SDKBuildProject, so remove
the import statement and the tearDownClass.

---
 meta/lib/oeqa/sdk/cases/assimp.py | 5 -----
 1 file changed, 5 deletions(-)

I'm not seeing this error when I run the test and I can't see it on the
autobuilders. Why are you seeing this and we're not?

I'm trying to understand some other odd behaviour in SDK tests and am
wondering if this is related or not.

Quoted 8 lines

(e.g. https://autobuilder.yocto.io/builders/nightly-mips/builds/122
1/st
eps/Running%20SDK%20Sanity%20Tests/logs/stdio)

Cheers,

Richard

I did a quick search and found this one: https://github.com/pexpect/
pexpect/pull/31
"""
sys.stdout.buffer is not guaranteed to exist - e.g. if sys.stdout has been reassigned to an io.StringIO instance, it won't.
"""

Quoted 2 lines

And we have in ConcurrencyTestSuite:
process_result._stdout_buffer = io.StringIO()

Note http://git.yoctoproject.org/cgit.cgi/poky/tree/meta/lib/oeqa/core/utils/concurrencytest.py#n103

process_result._stderr_buffer.buffer = dummybuf(process_result._stderr_buffer)

which creates a dummy buffer object...

Cheers,

Richard