This is an archive of the discontinued LLVM Phabricator instance.

Remove environment variables from driver tests
ClosedPublic

Authored by steven_wu on Jan 22 2015, 6:44 PM.

Details

Summary

Remove the environmental variables from Driver test

Remove some of dangerous environmental variables from clang/Driver tests. Driver tests should not rely on preset value of these variables and may actually fail because of them.
They cannot be removed in test/lit.cfg because we still need to support relocatable SDKs and other overwrite for other clang tests.

Diff Detail

Repository
rL LLVM

Event Timeline

steven_wu updated this revision to Diff 18649.Jan 22 2015, 6:44 PM
steven_wu retitled this revision from to Remove environment variables from driver tests.
steven_wu updated this object.
steven_wu edited the test plan for this revision. (Show Details)
steven_wu added a subscriber: Unknown Object (MLST).

Ping. This is intended to avoid driver tests gets broken by the unexpected environment variable. They can be accidentally set by user or bots and report false positive in driver tests.

rnk added a subscriber: rnk.Feb 3 2015, 1:55 PM

We already have this mechanism in test/lit.cfg. Feel free to add some more
variables.

steven_wu updated this revision to Diff 19365.Feb 4 2015, 5:40 PM
  • Add more environment variables to the blacklist
steven_wu updated this revision to Diff 28376.Jun 24 2015, 11:37 AM
steven_wu updated this object.
steven_wu added a reviewer: bogner.
steven_wu set the repository for this revision to rL LLVM.

After some thoughts, I think the first patch works better to serve the purpose. Environmental variable SDKROOT can be important for other clang tests but dangerous to Driver test. It can pollute all the driver tests doesn't specify a default sysroot and causing target triple to mismatch.
My goal is to recommit r226005 which is reverted because Darwin bots has SDKROOT environment set.

This revision was automatically updated to reflect the committed changes.