Skip to content

Environment variables for installs/ include external dependencies #899

@hamiltont

Description

@hamiltont

Currently we replace ~/.bash_profile, ~/.profile, and ~/.bashrc with our own version (from config/benchmark_config), so that the PATH is properly configured to include everything that has been installed into installs/.

This stinks, for a few reasons:

  • You can't just call --install-software and have the tests run properly after software is installed. You have to Ctrl-C, log out, and log back in, all to trigger bash to load up that new PATH variable
  • It only works for some shells. If the default shell is zsh, for example, it doesn't source any of these files on remote interactive login.
  • We are completely blowing away any prior files, and these are the kind of files you don't just erase without asking the user...many people customize them quite heavily

I think there's a pretty simple fix too::

  1. Update config/benchmark_config to print it's environment to stdout when finished
  2. Run config/benchmark_config and capture this environment
  3. Replace the running environment with the one that you got from (2)
  4. Now any subprocesses execute with a copy of our environment, which is super!

Step 3 might cause issues on some non-standard setups, so we could just swap out the environment bits we care about like PATH, LD_LIBRARY_PATH, etc. These are all non-destructive in config/benchmark_config.

I'll try to patch this up soon, just wanted to get the problem and fix out there for comment

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