tox fails to set environment variables set by user on invocation or in session

Bug #1522573 reported by Augustina Ragwitz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Sean Dague

Bug Description

When running GENERATE_SAMPLES=True tox -e functional, the GENERATE_SAMPLES value is still set to False (the default). I also tried setting it in my session before running tox and still got False.

To reproduce:

Add a line to api_sample_base.py [1] to print the value of os.getenv('GENERATE_SAMPLES') to stdout.
Run GENERATE_SAMPLES=True tox -e functional
GENERATE_SAMPLES outputs as False

Workaround:

Hard-code the value "True" into api_sample_base.py for the value of self.generate_samples, just don't accidentally commit it ;)

[1] https://github.com/openstack/nova/blob/1734ce7101982dd95f8fab1ab4815bd258a33744/nova/tests/functional/api_sample_tests/api_sample_base.py#L76

I have not tested this with other environment variables to find out if this is true across the board.

Tags: testing
Changed in nova:
assignee: nobody → Sean Dague (sdague)
tags: added: testing
Changed in nova:
status: New → Confirmed
Revision history for this message
Sean Dague (sdague) wrote :

I believe we fixed this with a new target

Changed in nova:
status: Confirmed → Fix Committed
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.