]> granicus.if.org Git - llvm/commitdiff
[llvm] [lit/tests] Replace 'env -u' with more portable construct
authorMichal Gorny <mgorny@gentoo.org>
Fri, 26 Jul 2019 15:39:05 +0000 (15:39 +0000)
committerMichal Gorny <mgorny@gentoo.org>
Fri, 26 Jul 2019 15:39:05 +0000 (15:39 +0000)
Set environment variables to empty values rather than attempting
to unset them via 'env -u', in order to fix NetBSD test regression
caused by r366980.  POSIX does not guarantee that env(1) supports '-u'
option, and indeed NetBSD env(1) does not support it.

Differential Revision: https://reviews.llvm.org/D65335

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367123 91177308-0d34-0410-b5e6-96231b3b80d8

utils/lit/tests/lit.cfg

index 2830956f80dd26c25eff5f252ff37cd4fd4fbe47..e1034dc225ae601c406c0f0d58e24ff5ce5076bf 100644 (file)
@@ -53,7 +53,7 @@ config.substitutions.append(('%{inputs}', os.path.join(
     config.test_source_root, 'Inputs')))
 config.substitutions.append(('%{lit}',
     "{env} %{{python}} {lit}".format(
-        env="env -u FILECHECK_OPTS -u FILECHECK_DUMP_INPUT_ON_FAILURE",
+        env="env FILECHECK_OPTS= FILECHECK_DUMP_INPUT_ON_FAILURE=",
         lit=os.path.join(lit_path, 'lit.py'))))
 config.substitutions.append(('%{python}', '"%s"' % (sys.executable)))