[education/rkward] /: Now that tests are working on all platforms, make them mandatory.
Thomas Friedrichsmeier
null at kde.org
Sat Jun 25 10:34:44 BST 2022
Git commit 6c5c9309af3dff35b250a938ca28a0590ec55002 by Thomas Friedrichsmeier.
Committed on 25/06/2022 at 09:34.
Pushed by tfry into branch 'master'.
Now that tests are working on all platforms, make them mandatory.
M +3 -0 .kde-ci.yml
M +3 -0 rkward/CMakeLists.txt
M +7 -2 rkward/autotests/core_test.cpp
https://invent.kde.org/education/rkward/commit/6c5c9309af3dff35b250a938ca28a0590ec55002
diff --git a/.kde-ci.yml b/.kde-ci.yml
index e7b549d4..2258bb43 100644
--- a/.kde-ci.yml
+++ b/.kde-ci.yml
@@ -17,3 +17,6 @@ Dependencies:
'frameworks/kwindowsystem': '@stable'
'frameworks/karchive': '@stable'
'frameworks/kcrash': '@stable'
+
+Options:
+ require-passing-tests-on: [ 'Linux', 'FreeBSD', 'Windows' ]
diff --git a/rkward/CMakeLists.txt b/rkward/CMakeLists.txt
index 99eaad04..d2a627c7 100644
--- a/rkward/CMakeLists.txt
+++ b/rkward/CMakeLists.txt
@@ -80,6 +80,9 @@ INSTALL(FILES resource.ver DESTINATION ${DATA_INSTALL_DIR}/rkward)
# This is for running directly from the build tree.
EXECUTE_PROCESS(
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/rkwardinstall
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/rbackend/rpackages # populated later during the build
+)
+EXECUTE_PROCESS(
COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/pages ${CMAKE_CURRENT_BINARY_DIR}/rkwardinstall/pages
COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/plugins ${CMAKE_CURRENT_BINARY_DIR}/rkwardinstall/plugins
COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/resource.ver ${CMAKE_CURRENT_BINARY_DIR}/rkwardinstall/resource.ver
diff --git a/rkward/autotests/core_test.cpp b/rkward/autotests/core_test.cpp
index f8e11429..f82e7235 100644
--- a/rkward/autotests/core_test.cpp
+++ b/rkward/autotests/core_test.cpp
@@ -25,6 +25,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
#include "../core/robject.h"
#include "../core/robjectlist.h"
#include "../core/renvironmentobject.h"
+#include "../misc/rkcommonfunctions.h"
void RKDebug (int, int, const char* fmt, ...) {
va_list ap;
@@ -96,8 +97,7 @@ private slots:
void cleanup() {
waitForAllFinished();
}
- void initTestCase()
- {
+ void initTestCase() {
qDebug("Initializing test case"); // Remove me. For diagnostics of test exception on Windows CI
qputenv("QTWEBENGINE_CHROMIUM_FLAGS", "--no-sandbox"); // Allow test to be run as root, which, for some reason is being done on the SuSE CI.
QLoggingCategory::setFilterRules("qt.text.layout=false"); // Filter out some noise
@@ -110,6 +110,11 @@ private slots:
waitForBackendStarted();
}
+ void basicCheck() {
+ // detect basic installation problems that are likely to cause (almost) everything else to fail
+ QVERIFY(!RKCommonFunctions::getRKWardDataDir().isEmpty());
+ }
+
void getIntVector() {
auto c = new RCommand("c(1, 2, 3)", RCommand::GetIntVector);
runCommandWithTimeout(c, nullptr, [](RCommand *command) {
More information about the rkward-tracker
mailing list