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

Siva Chandra sivachandra at google.com
Thu Apr 9 16:31:39 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):
----------------
chying wrote:
> 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.
Please note that I am not taking ownership of this review. I do not have strong opinions about the changes and would like others to chime in and drive.

IMO, @skipIfLinuxGcc('bugnumber', ['>=', '4.9'], ['i386']) is not any more readable than @skipIf("bn", "linux", "gcc", ['>=','4.9'], ['i386','x86']).

Also, one can still git grep, but have to put slightly more effort. For example, instead of doing

    git grep skipIfLinux

one will now have to do

    git grep "skipIf(.*linux.*)"

http://reviews.llvm.org/D8851

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






More information about the lldb-commits mailing list