diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2015-06-07 16:57:46 +0200 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2015-06-07 17:46:11 +0200 |
| commit | d56e9c1d4c3e6f560382ac71fa2419b2a9bef1cb (patch) | |
| tree | 6f63cb1c1ed473480789a926244dad353a083694 /tests | |
| parent | 8de05809108aef5adbc9081975f530344c8bce62 (diff) | |
Do not require $srctree to be set for non-kernel projects.
(It was never required if you explicitly passed a 'base_dir', but it's a
bit silly to have to do that too.)
This is a bug. I expected os.path.expandvars() to replace references
non-set environment variables with nothing, but it leaves them as is.
Work around it by letting base_dir = None be special and the default. It
uses $srctree if set and the current directory otherwise. This has the
following advantages:
- It avoids having to reimplement a different version of
os.path.expandvars() and special-casing "" to mean the current
directory.
- It means '$' can appear in paths. (Though it probably never will.)
Maybe the expansion behavior could be removed too, but keep it for now
to be backwards compatible.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/Kbase_dir | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/Kbase_dir b/tests/Kbase_dir new file mode 100644 index 0000000..9f8c55a --- /dev/null +++ b/tests/Kbase_dir @@ -0,0 +1,2 @@ +# This will only work if 'base_dir' is set correctly +source "empty" |
