[neon/backports-jammy/poppler-jammy/Neon/release] debian/tests: Fix qt6 autopkgtest

Jeremy Bicha null at kde.org
Wed Jan 25 14:08:58 GMT 2023


Git commit 9d87018fcd5d66e21c52dcdb386239045f4f4fb9 by Jeremy Bicha.
Committed on 13/12/2022 at 15:13.
Pushed by jriddell into branch 'Neon/release'.

Fix qt6 autopkgtest

M  +1    -1    debian/tests/qt6
A  +18   -0    debian/tests/test-qt6.cpp  *

The files marked with a * at the end have a non valid license. Please read: https://community.kde.org/Policies/Licensing_Policy and use the headers which are listed at that page.


https://invent.kde.org/neon/backports-jammy/poppler-jammy/commit/9d87018fcd5d66e21c52dcdb386239045f4f4fb9

diff --git a/debian/tests/qt6 b/debian/tests/qt6
index e7933a4..232236c 100755
--- a/debian/tests/qt6
+++ b/debian/tests/qt6
@@ -10,5 +10,5 @@ else
 fi
 
 cd $AUTOPKGTEST_TMP
-${CROSS_COMPILE}g++ -Wall -Werror -pedantic -Wno-long-long -Wno-deprecated-declarations -fPIC -std=c++11 -o poppler-qt6-test $SRCDIR/test-qt6.cpp `${CROSS_COMPILE}pkg-config --cflags --libs poppler-qt6 qt6Core`
+${CROSS_COMPILE}g++ -Wall -Werror -pedantic -Wno-long-long -Wno-deprecated-declarations -fPIC -std=c++17 -o poppler-qt6-test $SRCDIR/test-qt6.cpp `${CROSS_COMPILE}pkg-config --cflags --libs poppler-qt6 Qt6Core`
 ./poppler-qt6-test "/usr/share/cups/data/default-testpage.pdf"
diff --git a/debian/tests/test-qt6.cpp b/debian/tests/test-qt6.cpp
new file mode 100644
index 0000000..3bf09c5
--- /dev/null
+++ b/debian/tests/test-qt6.cpp
@@ -0,0 +1,18 @@
+#include <poppler-qt6.h>
+#include <QtCore/QFile>
+#include <stdlib.h>
+
+int main(int argc, char *argv[])
+{
+  if (argc < 2)
+    return EXIT_FAILURE;
+
+  std::unique_ptr<Poppler::Document> doc = Poppler::Document::load(QFile::decodeName(argv[1]));
+  Q_ASSERT(doc);
+  Q_ASSERT(!doc->isLocked());
+
+  int n_pages = doc->numPages();
+  Q_ASSERT(n_pages > 0);
+
+  return EXIT_SUCCESS;
+}



More information about the Neon-commits mailing list