[llvm] a5e65ad - [not][test] Fix disable-symbolization.test when 'printenv' is not available
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 24 17:28:53 PDT 2020
Author: Fangrui Song
Date: 2020-08-24T17:27:34-07:00
New Revision: a5e65ad3a30cd77a768e093276e3426c6d81a32d
URL: https://github.com/llvm/llvm-project/commit/a5e65ad3a30cd77a768e093276e3426c6d81a32d
DIFF: https://github.com/llvm/llvm-project/commit/a5e65ad3a30cd77a768e093276e3426c6d81a32d.diff
LOG: [not][test] Fix disable-symbolization.test when 'printenv' is not available
On Windows, 'env' or 'printenv' may not exist.
Also switch back to 'env' which is specified by POSIX.1-2017. 'printenv' is not
standard (I picked it because 'printenv' exists on GnuWin32 but 'env' does not).
Reviewed By: zequanwu
Differential Revision: https://reviews.llvm.org/D86496
Added:
Modified:
llvm/test/tools/not/disable-symbolization.test
Removed:
################################################################################
diff --git a/llvm/test/tools/not/disable-symbolization.test b/llvm/test/tools/not/disable-symbolization.test
index 05dbf9db053e..b10309e2f943 100644
--- a/llvm/test/tools/not/disable-symbolization.test
+++ b/llvm/test/tools/not/disable-symbolization.test
@@ -1,5 +1,6 @@
-# RUN: not --crash printenv > %t || true
-# RUN: FileCheck %s < %t
+## 'env' may not exist on Windows. %t will be empty.
+# RUN: not --crash env > %t || true
+# RUN: cmp -s %t /dev/null || FileCheck %s < %t
# CHECK-DAG: LLVM_DISABLE_CRASH_REPORT=1
# CHECK-DAG: LLVM_DISABLE_SYMBOLIZATION=1
More information about the llvm-commits
mailing list