From 5252f604617f19a591d81463e2c234217b445bbd Mon Sep 17 00:00:00 2001 From: Xidorn Quan Date: Thu, 3 Mar 2016 18:27:18 +0800 Subject: [PATCH] Bug 1253189 part 4 - Add skip.list for skipping imported tests. r=dbaron MozReview-Commit-ID: 3TpjZRy8rS9 --HG-- extra : rebase_source : 329c5e89d54a33f114d09d69c8d6960e4f15a233 --- layout/reftests/w3c-css/import-tests.py | 15 +++++++++++---- layout/reftests/w3c-css/skip.list | 12 ++++++++++++ 2 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 layout/reftests/w3c-css/skip.list diff --git a/layout/reftests/w3c-css/import-tests.py b/layout/reftests/w3c-css/import-tests.py index 745e8431d70e..b3cfccc7a02f 100755 --- a/layout/reftests/w3c-css/import-tests.py +++ b/layout/reftests/w3c-css/import-tests.py @@ -57,6 +57,7 @@ gDefaultPreferences = { gLog = None gFailList = {} +gSkipList = {} gDestPath = None gSrcPath = None support_dirs_mapped = set() @@ -275,20 +276,24 @@ def setup_log(): # information about where they came from. gLog = open(os.path.join(gDestPath, "import.log"), "w") -def read_fail_list(): - global gFailList +def read_fail_and_skip_list(): + global gFailList, gSkipList dirname = os.path.realpath(__file__).split(os.path.sep) dirname = os.path.sep.join(dirname[:len(dirname)-1]) failListFile = open(os.path.join(dirname, "failures.list"), "r") gFailList = [x for x in [x.lstrip().rstrip() for x in failListFile] if bool(x) and not x.startswith("#")] failListFile.close() + skipListFile = open(os.path.join(dirname, "skip.list"), "r") + gSkipList = [x for x in [x.lstrip().rstrip() for x in skipListFile] + if bool(x) and not x.startswith("#")] + skipListFile.close() def main(): - global gDestPath, gLog, gTestfiles, gTestFlags, gFailList + global gDestPath, gLog, gTestfiles, gTestFlags, gFailList, gSkipList read_options() setup_paths() - read_fail_list() + read_fail_and_skip_list() setup_log() write_log_header() remove_existing_dirs() @@ -322,6 +327,8 @@ def main(): test = ["HTTP(../../..)"] + test if testKey in gFailList: test = ["fails"] + test + if testKey in gSkipList: + test = ["skip"] + test listfile.write(" ".join(test) + "\n") listfile.close() diff --git a/layout/reftests/w3c-css/skip.list b/layout/reftests/w3c-css/skip.list new file mode 100644 index 000000000000..59348194dd01 --- /dev/null +++ b/layout/reftests/w3c-css/skip.list @@ -0,0 +1,12 @@ +# LIST OF REFTEST NEED TO SKIP FROM IMPORTS +# +# Always consider adding tests to failures.list first if it doesn't +# pass. This list should only be used if we are not able to make the +# test itself work, e.g. some dynamic tests. +# +# The syntax of this file is as follows: +# 1) All lines marked with a '#' are comments. +# 2) A failure is denoted by a path, starting +# with module. E.g.: +# css3-multicol/block-clip-001.xht +