← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1522573] [NEW] tox fails to set environment variables set by user on invocation or in session

 

Public bug reported:

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.

** Affects: nova
     Importance: Undecided
     Assignee: Sean Dague (sdague)
         Status: New

** Changed in: nova
     Assignee: (unassigned) => Sean Dague (sdague)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1522573

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

Status in OpenStack Compute (nova):
  New

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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1522573/+subscriptions


Follow ups