[compiler-rt] b16e4d3 - [sanitizers-test]add definition for %device_rm on android so it stops complaining

Vy Nguyen via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 16 16:58:17 PST 2020


Author: Vy Nguyen
Date: 2020-11-16T19:57:54-05:00
New Revision: b16e4d3fc11d890480a6b5ecd61874e0e19ed5b7

URL: https://github.com/llvm/llvm-project/commit/b16e4d3fc11d890480a6b5ecd61874e0e19ed5b7
DIFF: https://github.com/llvm/llvm-project/commit/b16e4d3fc11d890480a6b5ecd61874e0e19ed5b7.diff

LOG: [sanitizers-test]add definition for %device_rm on android so it stops complaining

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

Added: 
    

Modified: 
    compiler-rt/test/lit.common.cfg.py

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/lit.common.cfg.py b/compiler-rt/test/lit.common.cfg.py
index ed824ad09d86..77d818aa7cb8 100644
--- a/compiler-rt/test/lit.common.cfg.py
+++ b/compiler-rt/test/lit.common.cfg.py
@@ -205,10 +205,6 @@ def get_lit_conf(name, default=None):
   config.compile_wrapper = compile_wrapper
   config.substitutions.append( ('%run', "") )
   config.substitutions.append( ('%env ', "env ") )
-  # TODO: Implement `%device_rm` to perform removal of files on a device.  For
-  # now just make it a no-op.
-  lit_config.warning('%device_rm is not implemented')
-  config.substitutions.append( ('%device_rm', 'echo ') )
 else:
   config.substitutions.append( ('%run', "") )
   config.substitutions.append( ('%env ', "env ") )
@@ -352,6 +348,7 @@ def get_macos_aligned_version(macos_vers):
   config.substitutions.append( ('%push_to_device', "%s -s '%s' push " % (adb, env['ANDROID_SERIAL']) ) )
   config.substitutions.append( ('%pull_from_device', "%s -s '%s' pull " % (adb, env['ANDROID_SERIAL']) ) )
   config.substitutions.append( ('%adb_shell ', "%s -s '%s' shell " % (adb, env['ANDROID_SERIAL']) ) )
+  config.substitutions.append( ('%device_rm', "%s -s '%s' shell 'rm ' " % (adb, env['ANDROID_SERIAL']) ) )
 
   try:
     android_api_level_str = subprocess.check_output([adb, "shell", "getprop", "ro.build.version.sdk"], env=env).rstrip()


        


More information about the llvm-commits mailing list