summaryrefslogtreecommitdiff
path: root/test/QT/source-from-ui.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/QT/source-from-ui.py')
-rw-r--r--test/QT/source-from-ui.py57
1 files changed, 31 insertions, 26 deletions
diff --git a/test/QT/source-from-ui.py b/test/QT/source-from-ui.py
index 792271714..569fbab2c 100644
--- a/test/QT/source-from-ui.py
+++ b/test/QT/source-from-ui.py
@@ -1,6 +1,8 @@
#!/usr/bin/env python
#
-# __COPYRIGHT__
+# MIT License
+#
+# Copyright The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -20,9 +22,6 @@
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
"""
Create .cpp, .h, moc_....cpp from a .ui file.
@@ -68,9 +67,9 @@ void useit() {
}
""")
-test.run(arguments = aaa_dll)
+test.run(arguments="--warn=no-tool-qt-deprecated " + aaa_dll)
-test.up_to_date(options='-n', arguments = aaa_dll)
+test.up_to_date(options='--warn=no-tool-qt-deprecated -n', arguments=aaa_dll)
test.write('aaa.ui', r"""
/* a change */
@@ -82,11 +81,11 @@ test.write('aaa.ui', r"""
DLLEXPORT void aaa(void)
""")
-test.not_up_to_date(options = '-n', arguments = moc)
-test.not_up_to_date(options = '-n', arguments = cpp)
-test.not_up_to_date(options = '-n', arguments = h)
+test.not_up_to_date(options='--warn=no-tool-qt-deprecated -n', arguments=moc)
+test.not_up_to_date(options='--warn=no-tool-qt-deprecated -n', arguments=cpp)
+test.not_up_to_date(options='--warn=no-tool-qt-deprecated -n', arguments=h)
-test.run(arguments = aaa_dll)
+test.run(arguments="--warn=no-tool-qt-deprecated " + aaa_dll)
test.write('aaa.ui', r"""
void aaa(void)
@@ -94,28 +93,30 @@ void aaa(void)
""")
# test that non-existant ui.h files are ignored (as uic does)
-test.run(arguments = aaa_dll)
+test.run(arguments="--warn=no-tool-qt-deprecated " + aaa_dll)
test.write('aaa.ui.h', r"""
/* test dependency to .ui.h */
""")
-test.run(arguments = aaa_dll)
+test.run(arguments="--warn=no-tool-qt-deprecated " + aaa_dll)
test.write('aaa.ui.h', r"""
/* changed */
""")
-test.not_up_to_date(options = '-n', arguments = obj)
-test.not_up_to_date(options = '-n', arguments = cpp)
-test.not_up_to_date(options = '-n', arguments = h)
-test.not_up_to_date(options = '-n', arguments = moc)
+test.not_up_to_date(options='--warn=no-tool-qt-deprecated -n', arguments=obj)
+test.not_up_to_date(options='--warn=no-tool-qt-deprecated -n', arguments=cpp)
+test.not_up_to_date(options='--warn=no-tool-qt-deprecated -n', arguments=h)
+test.not_up_to_date(options='--warn=no-tool-qt-deprecated -n', arguments=moc)
# clean up
-test.run(arguments = '-c ' + aaa_dll)
+test.run(arguments="--warn=no-tool-qt-deprecated -c " + aaa_dll)
-test.run(arguments = "variant_dir=1 " +
- test.workpath('build', aaa_dll) )
+test.run(
+ arguments="--warn=no-tool-qt-deprecated variant_dir=1 "
+ + test.workpath('build', aaa_dll)
+)
test.must_exist(test.workpath('build', moc))
test.must_exist(test.workpath('build', cpp))
@@ -127,8 +128,10 @@ test.must_not_exist(test.workpath(h))
cppContents = test.read(test.workpath('build', cpp), mode='r')
test.fail_test(cppContents.find('#include "aaa.ui.h"') == -1)
-test.run(arguments = "variant_dir=1 chdir=1 " +
- test.workpath('build', aaa_dll) )
+test.run(
+ arguments="--warn=no-tool-qt-deprecated variant_dir=1 chdir=1 "
+ + test.workpath('build', aaa_dll)
+)
test.must_exist(test.workpath('build', moc))
test.must_exist(test.workpath('build', cpp))
@@ -137,12 +140,14 @@ test.must_not_exist(test.workpath(moc))
test.must_not_exist(test.workpath(cpp))
test.must_not_exist(test.workpath(h))
-test.run(arguments = "variant_dir=1 chdir=1 dup=0 " +
- test.workpath('build_dup0', aaa_dll) )
+test.run(
+ arguments="--warn=no-tool-qt-deprecated variant_dir=1 chdir=1 dup=0 "
+ + test.workpath('build_dup0', aaa_dll)
+)
-test.must_exist(test.workpath('build_dup0',moc))
-test.must_exist(test.workpath('build_dup0',cpp))
-test.must_exist(test.workpath('build_dup0',h))
+test.must_exist(test.workpath('build_dup0', moc))
+test.must_exist(test.workpath('build_dup0', cpp))
+test.must_exist(test.workpath('build_dup0', h))
test.must_not_exist(test.workpath(moc))
test.must_not_exist(test.workpath(cpp))
test.must_not_exist(test.workpath(h))