on xenial help sign in
redid the skip import test
commit7f985b86ba4689a46e3de7a3121955db6561f378 authorAndrea Cimitan <andrea.cimitan@gmail.com> dateWed 10 Aug 2016, 17:11 (10 years ago) parenta41a13d
2 files changed+8−6
tests/imports/check_imports.py+8−5 tests/mocks/QtMultimedia/VideoSurface.qml−1
tests/imports/check_imports.py+8−5
@@ -92,6 +92,7 @@ components_path = re.compile(r'.*qml/Components.*')
9292skip_components_flickable_path = re.compile(r'.*qml/Components/Flickable.qml')
9393skip_components_listview_path = re.compile(r'.*qml/Components/ListView.qml')
9494skip_components_gridview_path = re.compile(r'.*qml/Components/GridView.qml')
95+skip_mocks_path = re.compile(r'.*tests/mocks.*')
9596
9697def scan_for_flickable_imports(file_path, component_pats, qtquick_pat, unitycomponents_pat):
9798 errors = []
@@ -162,15 +163,17 @@ try:
162163 found_bad_import = True
163164 if scan_for_bad_import(path, ubuntu_components_pat, [ubuntu_good_components_pat]):
164165 found_bad_import = True
166+ if skip_mocks_path.match(path) or \
167+ skip_components_flickable_path.match(path) or \
168+ skip_components_listview_path.match(path) or \
169+ skip_components_gridview_path.match(path):
170+ break
165171 if not components_path.match(path):
166172 if scan_for_flickable_imports(path, flickable_pats, quick_good_pat, unity_components_pat):
167173 found_bad_import = True
168174 else:
169− if not skip_components_flickable_path.match(path) and \
170− not skip_components_listview_path.match(path) and \
171− not skip_components_gridview_path.match(path):
172− if scan_for_flickable_imports(path, flickable_pats, quick_good_pat, components_import_pat):
173− found_bad_import = True
175+ if scan_for_flickable_imports(path, flickable_pats, quick_good_pat, components_import_pat):
176+ found_bad_import = True
174177
175178except OSError as e:
176179 error("cannot create file list for \"" + dir + "\": " + e.strerror)
tests/mocks/QtMultimedia/VideoSurface.qml−1
@@ -17,7 +17,6 @@
1717import QtQuick 2.4
1818import Ubuntu.Components 1.3
1919import QtMultimedia 5.0
20−import "../../../qml/Components"
2120
2221Rectangle {
2322 id: root