summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernd Weimer <bernd.weimer@pelagicore.com>2020-03-10 13:20:57 +0100
committerBernd Weimer <bernd.weimer@pelagicore.com>2020-03-10 17:01:12 +0100
commit4b34b5999ad2d3e81ae6c618ae6b942bb879f4d6 (patch)
treeab24d14e8d38073e9b90de5cf814f5ed84c6bf68
parentf43d30ffba0ed8d11b3819d2fad63e6bf1cf34b8 (diff)
Improve tests and bash completion
- The tst_main test failed in older appman versions, if there is a leftover cache file from a newer version and vice versa - Adapted test output to fit deferred logging output - Added "--dbus" option values to bash completion Change-Id: Ica2600c61992ab8e87683d468af3fbdec766f944 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
-rw-r--r--doc/configuration.qdoc2
-rw-r--r--src/common-lib/crashhandler.cpp1
-rw-r--r--src/tools/appman/appman.cpp6
-rw-r--r--tests/main/tst_main.cpp4
-rw-r--r--util/bash/appman-prompt8
5 files changed, 14 insertions, 7 deletions
diff --git a/doc/configuration.qdoc b/doc/configuration.qdoc
index 1728a539..2146af37 100644
--- a/doc/configuration.qdoc
+++ b/doc/configuration.qdoc
@@ -636,6 +636,8 @@ The following conditions are handled:
\li \c SIGILL
\li \c SIGFPE
\li \c SIGPIPE
+ \li \c SIGQUIT
+ \li \c SIGSYS
\endlist
\table
diff --git a/src/common-lib/crashhandler.cpp b/src/common-lib/crashhandler.cpp
index 9b2db648..91aa2040 100644
--- a/src/common-lib/crashhandler.cpp
+++ b/src/common-lib/crashhandler.cpp
@@ -387,7 +387,6 @@ static void logCrashInfo(LogToDestination logTo, const char *why, int stackFrame
#if defined(Q_OS_LINUX)
long tid = syscall(SYS_gettid);
bool isMainThread = (tid == pid);
-
#else
long tid = -1;
bool isMainThread = pthread_main_np();
diff --git a/src/tools/appman/appman.cpp b/src/tools/appman/appman.cpp
index 62765f40..97cb1fa4 100644
--- a/src/tools/appman/appman.cpp
+++ b/src/tools/appman/appman.cpp
@@ -104,10 +104,7 @@ Q_DECL_EXPORT int main(int argc, char *argv[])
StartupTimer::instance()->checkpoint("after command line parse");
#if defined(AM_TESTRUNNER)
TestRunner::initialize(cfg.mainQmlFile(), cfg.testRunnerArguments());
- qInfo().nospace().noquote() << "\nTEST: " << cfg.mainQmlFile() << " in "
- << (cfg.forceMultiProcess() ? "multi" : "single") << "-process mode";
cfg.setForceVerbose(qEnvironmentVariableIsSet("VERBOSE_TEST"));
- qInfo() << "Verbose mode is" << (cfg.verbose() ? "on" : "off") << "(changed by (un)setting $VERBOSE_TEST)";
#endif
a.setup(&cfg);
#if defined(AM_TESTRUNNER)
@@ -117,6 +114,9 @@ Q_DECL_EXPORT int main(int argc, char *argv[])
a.showWindow(cfg.fullscreen() && !cfg.noFullscreen());
#if defined(AM_TESTRUNNER)
+ qInfo().nospace().noquote() << "Verbose mode is " << (cfg.verbose() ? "on" : "off")
+ << " (change by (un)setting $VERBOSE_TEST)\n TEST: " << cfg.mainQmlFile()
+ << " in " << (cfg.forceMultiProcess() ? "multi" : "single") << "-process mode";
return TestRunner::exec();
#else
return MainBase::exec();
diff --git a/tests/main/tst_main.cpp b/tests/main/tst_main.cpp
index c3220022..be8e0dd6 100644
--- a/tests/main/tst_main.cpp
+++ b/tests/main/tst_main.cpp
@@ -81,7 +81,7 @@ tst_Main::tst_Main()
{
argc = 3;
argv = new char*[argc + 1];
- argv[0] = qstrdup("tst_update-builtin-app");
+ argv[0] = qstrdup("tst_Main");
argv[1] = qstrdup("--dbus");
argv[2] = qstrdup("none");
argv[3] = nullptr;
@@ -351,7 +351,7 @@ void tst_Main::mainQmlFile()
QFETCH(QString, expectedErrorMsg);
QStringList arguments;
- arguments << "tst_update-builtin-app";
+ arguments << "tst_Main";
arguments << "--dbus";
arguments << "none";
arguments << mainQml;
diff --git a/util/bash/appman-prompt b/util/bash/appman-prompt
index 96bd017c..1776377b 100644
--- a/util/bash/appman-prompt
+++ b/util/bash/appman-prompt
@@ -37,11 +37,17 @@ _appman()
--installed-apps-manifest-dir --load-dummydata --log-instant --logging-rule --no-cache --no-dlt-logging \
--no-fullscreen --no-security --no-ui-watchdog -o --option --qml-debug --single-app \
--slow-animations --verbose --version --wayland-socket-name"
+ dbusopts="session system none"
if [[ ${cur} == -* ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
else
- COMPREPLY=( $( compgen -f -- ${cur}) )
+ COMPREPLY=( $(compgen -W "${dbusopts}" -- ${cur}) )
+ if [ ${COMP_CWORD} -gt 1 ] && [[ ${COMP_WORDS[COMP_CWORD-1]} == "--dbus" ]] ; then
+ COMPREPLY=( $(compgen -W "${dbusopts}" -- ${cur}) )
+ else
+ COMPREPLY=( $( compgen -f -- ${cur}) )
+ fi
fi
}
complete -o filenames -F _appman appman appman-qmltestrunner