tern-tools / tern

Tern is a software composition analysis tool and Python library that generates a Software Bill of Materials for container images and Dockerfiles. The SBOM that Tern generates will give you a layer-by-layer view of what's inside your container in a variety of formats including human-readable, JSON, HTML, SPDX and more.
BSD 2-Clause "Simplified" License
967 stars 188 forks source link

Separate tests per platforms #1166

Open ivanayov opened 2 years ago

ivanayov commented 2 years ago

Currently all tests are organised together, which makes it hard to run all locally, as they are platform specific, which prevents creating good and simple instructions for #1164.

What do you think about those options?

  1. Separate based on naming or reorganising the tests directory
  2. Abstract platform specific configs, so that same tests can run everywhere.

IMO, the second option, if possible, would be the best, although it would require more effort.

rnjudge commented 2 years ago

When you say platform specific do you mean VM vs Mac vs Linux environment? I think all the tests should run in any of these environments, at least for all the class tests -- are there tests that were not working for you in a certain environment?

ivanayov commented 2 years ago

I'm sharing a list of platform specific tests available in the moment. Probably some of them are outdated and we might just need to do a tidy-up rather than major changes.

https://github.com/tern-tools/tern/blob/main/tests/test_analyze_common.py https://github.com/tern-tools/tern/blob/main/tests/test_analyze_default_filter.py https://github.com/tern-tools/tern/blob/main/tests/test_class_command.py