Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[build_grimoirelab] Improve support for testing #124

Merged
merged 3 commits into from
Jun 25, 2018

Conversation

jgbarah
Copy link
Contributor

@jgbarah jgbarah commented Jun 24, 2018

This patch improves support for testing GrimoireLab pip packages. Now, it allows to run setup.py test for each module, including configuration files for testing (eg, when they are needed to express addresses or credentials to access services). One of the commits also removes the need to build before testing, allowing that way to test already built packages (in fact, they will be used as dependencies, since unit tests will always be run on the source code).

Now, all build packages for a GrimoireLab distro can be tested by running (assuming built packages are in dist, configuration files for testing are in testconf, which will have one subdirectory per module with testing config files, with the same path they should be copied to the source code repo befor running tests, and release is the release file to test) :

$ python --test --distdir dist --fail --confdir testconf --relfile release 

jgbarah added 3 commits June 20, 2018 00:55
There is no need to build pacakges before running tests if prebuilt
packages are available. This patch allows to use --test alone,
without --build, and removes the previous code that run --build
for --test always (even if --build was not specified in the command
line).
New option, --confdir, for specifying a directory with configuration
files for testing, that will be copied to the corresponding repository
before tests are run.
…and.

run_command can now accept environment variables. This allows it
to be called with pip enviroment variables set for using packages
in a certain directory (PIP_FIND_LINKS).

This patch also implements using this variables for setup.py test,
so that packages can be tested more easily.
@jgbarah jgbarah requested a review from acs June 24, 2018 22:12
Copy link
Member

@acs acs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@acs acs merged commit a1bdc6e into chaoss:master Jun 25, 2018
@jgbarah jgbarah deleted the tests-alone branch June 29, 2018 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants