Skip to content

Unit tests currently fail #2

@pzakha

Description

@pzakha

We have disable unit tests as part of #1 to be able to build BCC.

The issue is that the python tests do not setup PYTHONPATH properly and so the tests cannot find bcc:

 5/37 Test  #5: py_test_bpf_log ..................***Failed    0.02 sec
Traceback (most recent call last):
  File "/home/ubuntu/linux-pkg/packages/bcc/tmp/repo/tests/python/test_bpf_log.py", line 5, in <module>
    from bcc import BPF
ImportError: No module named bcc
Failed

Changing PYTHONPATH in bcc/tests/wrapper.sh.in

- PYTHONPATH=@CMAKE_BINARY_DIR@/src/python
+ PYTHONPATH=@CMAKE_BINARY_DIR@/src/python/bcc-python3

seems to fix that issue. This discrepancy may be coming from how dpkg_buildpkg creates a bcc-python2 directory for python2 packages and a bcc-python3 directory for python3 packages.
Even after this change there are still 2 tests that are failing:

  • py_test_free_bcc_memory
  • lua_test_standalone

Unit tests also added 7 minutes to the build time in my run, and since we aren't currently doing any changes to bcc I think we can leave them disabled.

I'm leaving this issue opened for future references.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions