[Lldb-commits] [PATCH] Skip tests that are failed on linux with gcc-4.9.2

Ying Chen chying at google.com
Thu Apr 9 16:13:23 PDT 2015


================
Comment at: test/lldbtest.py:740
@@ +739,3 @@
+
+def skipIfPlatformCompiler(bugnumber=None, platform=None, compiler=None, compiler_version=None, archs=None):
+    def fn(self):
----------------
sivachandra wrote:
> Could we just name this function "skipIf" and use it directly to decorate tests? May be we could eliminate all skipIf* decorators in favor of this, but I have not thought through that thoroughly. Atleast, it seems to me that things like skipIfLinuxGcc, skipIfGcc and skipIfClang can be eliminated. You will ofcourse have to change the logic in the 'fn' function below. And ofcourse you need not have to remove/modify the existing decorators in this patch itself.
> 
> One thing we might loose is the ability to "git grep xxx" to get all tests decorated with xxx.
yes, this function could be used to decorate tests directly as is.  
Like @skipIf("bn", "linux", "gcc", ['>=','4.9'], ['i386','x86'])

My understanding is that by providing a various of wrapper functions like skipIfLinuxGcc, skipIfClang, we got better readability of code, and also as you mentioned, it's easier to find all tests decorated with certain compiler or host. 
Maybe it's similar reasoning behind ExpectedFailureGcc/Icc/Clang

We could definitely re-factor current skipif* functions to call this function instead of having common code in each function.

http://reviews.llvm.org/D8851

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the lldb-commits mailing list