pro2cmake: Fix test_scope_handling.py
When the android-embedded scope was removed in 7a4b586f4b8d1b73d1af3d24ff5112e4dc231ea6, the conditions in test_scope_handling.py were adjusted following the laws of logic. However, the scope handling code does not follow the same laws. Effectively revert the part of said commit in test_scope_handling.py but use "UNKNOWN_PLATFORM" instead of "ANDROID_EMBEDDED". Change-Id: Ic090451e2a28b50f5be5668503e216cbe3871633 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
8a6899239a
commit
e33c88a36d
@ -309,7 +309,7 @@ def test_qstandardpaths_scopes():
|
|||||||
# } else:android {
|
# } else:android {
|
||||||
# SOURCES += io/qstandardpaths_android.cpp
|
# SOURCES += io/qstandardpaths_android.cpp
|
||||||
scope8 = _new_scope(parent_scope=scope6, condition='else')
|
scope8 = _new_scope(parent_scope=scope6, condition='else')
|
||||||
scope9 = _new_scope(parent_scope=scope8, condition='ANDROID', SOURCES='qsp_android.cpp')
|
scope9 = _new_scope(parent_scope=scope8, condition='ANDROID AND NOT UNKNOWN_PLATFORM', SOURCES='qsp_android.cpp')
|
||||||
# } else:haiku {
|
# } else:haiku {
|
||||||
# SOURCES += io/qstandardpaths_haiku.cpp
|
# SOURCES += io/qstandardpaths_haiku.cpp
|
||||||
scope10 = _new_scope(parent_scope=scope8, condition='else')
|
scope10 = _new_scope(parent_scope=scope8, condition='else')
|
||||||
@ -330,10 +330,10 @@ def test_qstandardpaths_scopes():
|
|||||||
assert scope6.total_condition == 'UNIX'
|
assert scope6.total_condition == 'UNIX'
|
||||||
assert scope7.total_condition == 'MACOS'
|
assert scope7.total_condition == 'MACOS'
|
||||||
assert scope8.total_condition == 'UNIX AND NOT MACOS'
|
assert scope8.total_condition == 'UNIX AND NOT MACOS'
|
||||||
assert scope9.total_condition == 'ANDROID'
|
assert scope9.total_condition == 'ANDROID AND NOT UNKNOWN_PLATFORM'
|
||||||
assert scope10.total_condition == 'UNIX AND NOT MACOS AND NOT ANDROID'
|
assert scope10.total_condition == 'UNIX AND NOT MACOS AND (UNKNOWN_PLATFORM OR NOT ANDROID)'
|
||||||
assert scope11.total_condition == 'HAIKU AND NOT ANDROID'
|
assert scope11.total_condition == 'HAIKU AND (UNKNOWN_PLATFORM OR NOT ANDROID)'
|
||||||
assert scope12.total_condition == 'UNIX AND NOT MACOS AND NOT HAIKU AND NOT ANDROID'
|
assert scope12.total_condition == 'UNIX AND NOT HAIKU AND NOT MACOS AND (UNKNOWN_PLATFORM OR NOT ANDROID)'
|
||||||
|
|
||||||
def test_recursive_expansion():
|
def test_recursive_expansion():
|
||||||
scope = _new_scope(A='Foo',B='$$A/Bar')
|
scope = _new_scope(A='Foo',B='$$A/Bar')
|
||||||
@ -341,4 +341,3 @@ def test_recursive_expansion():
|
|||||||
assert scope.get_string('B') == '$$A/Bar'
|
assert scope.get_string('B') == '$$A/Bar'
|
||||||
assert scope._expand_value('$$B/Source.cpp') == ['Foo/Bar/Source.cpp']
|
assert scope._expand_value('$$B/Source.cpp') == ['Foo/Bar/Source.cpp']
|
||||||
assert scope._expand_value('$$B') == ['Foo/Bar']
|
assert scope._expand_value('$$B') == ['Foo/Bar']
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user