[PATCH] D96799: [test][fuzzer] Use %python for trace-malloc-unbalanced

Greg Bedwell via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 17 07:12:34 PST 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rGf8ed31cd991b: [Fuzzer][Test] Use %python substitution for trace-malloc-unbalanced.test (authored by gbfarlej, committed by gbedwell).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96799/new/

https://reviews.llvm.org/D96799

Files:
  compiler-rt/test/fuzzer/lit.cfg.py
  compiler-rt/test/fuzzer/trace-malloc-unbalanced.test


Index: compiler-rt/test/fuzzer/trace-malloc-unbalanced.test
===================================================================
--- compiler-rt/test/fuzzer/trace-malloc-unbalanced.test
+++ compiler-rt/test/fuzzer/trace-malloc-unbalanced.test
@@ -8,10 +8,10 @@
 
 # Specify python because we can't use the shebang line on Windows.
 RUN: %run %t-TraceMallocTest -seed=1 -trace_malloc=1 -runs=200 2>&1 | \
-RUN:    python %libfuzzer_src/scripts/unbalanced_allocs.py --skip=5 | FileCheck %s
+RUN:    %python %libfuzzer_src/scripts/unbalanced_allocs.py --skip=5 | FileCheck %s
 
 RUN: %run %t-TraceMallocTest -seed=1 -trace_malloc=2 -runs=200 2>&1 | \
-RUN:    python %libfuzzer_src/scripts/unbalanced_allocs.py --skip=5 | FileCheck %s --check-prefixes=CHECK,CHECK2
+RUN:    %python %libfuzzer_src/scripts/unbalanced_allocs.py --skip=5 | FileCheck %s --check-prefixes=CHECK,CHECK2
 
 CHECK: MallocFreeTracer: START
 # Behavior of the format string "%p" is implementation defined. Account for the
Index: compiler-rt/test/fuzzer/lit.cfg.py
===================================================================
--- compiler-rt/test/fuzzer/lit.cfg.py
+++ compiler-rt/test/fuzzer/lit.cfg.py
@@ -61,6 +61,8 @@
 libfuzzer_src_root = os.path.join(config.compiler_rt_src_root, "lib", "fuzzer")
 config.substitutions.append(('%libfuzzer_src', libfuzzer_src_root))
 
+config.substitutions.append(('%python', '"%s"' % (sys.executable)))
+
 def generate_compiler_cmd(is_cpp=True, fuzzer_enabled=True, msan_enabled=False):
   compiler_cmd = config.clang
   extra_cmd = config.target_flags


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96799.324302.patch
Type: text/x-patch
Size: 1568 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210217/259d2234/attachment.bin>


More information about the llvm-commits mailing list