Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test fail on windows #19

Open
ghost opened this issue Feb 12, 2017 · 0 comments
Open

test fail on windows #19

ghost opened this issue Feb 12, 2017 · 0 comments

Comments

@ghost
Copy link

ghost commented Feb 12, 2017

Hello, I see two following testcases of failure here on windows msvc2015 win32 build.

********* Start testing of CppTest *********
Config: Using QtTest library 5.6.2, Qt 5.6.2 (i386-little_endian-ilp32 shared (dynamic) debug build; by MSVC 2015)
PASS   : CppTest::initTestCase()
FAIL!  : CppTest::test_protectedPdf() Compared values are not the same
d:\mypdf\tests\auto\cpp\tst_cpp.cpp(67) : failure location
QFATAL : CppTest::test_documentDeletion() ASSERT: "i < m_pageCount && i >=0" in file d:\mypdf\src\pdfium\qpdfium.cpp, line 104
FAIL!  : CppTest::test_documentDeletion() Received a fatal error.
Unknown file(0) : failure location
Totals: 1 passed, 2 failed, 0 skipped, 0 blacklisted
********* Finished testing of CppTest *********

Here I try build qtpdfium using lastest git qtpdfium and pdfium master branch as of git 2eb1a705c243b2d5ab912268dd453f5ade075b6f .
I make some patch change here to make this build on windows.

diff -ENwbur "a/qtpdfium/src/3rdparty/fxcrt.pri" ./3rdparty/fxcrt.pri
--- "b/qtpdfium/src/3rdparty/fxcrt.pri"	2017-02-12 12:35:02.326423100 +0700
+++ ./3rdparty/fxcrt.pri	2017-02-12 14:57:38.163318700 +0700
@@ -2,7 +2,7 @@
 SOURCE_DIR = $$PWD/pdfium
 
 PRIVATE_HEADERS += \
-$$SOURCE_DIR/core/fxcrt/fxcrt_qt.h \
+#$$SOURCE_DIR/core/fxcrt/fxcrt_qt.h \
 $$SOURCE_DIR/core/fxcrt/cfx_maybe_owned.h \
 $$SOURCE_DIR/core/fxcrt/cfx_observable.h \
 $$SOURCE_DIR/core/fxcrt/cfx_retain_ptr.h \
@@ -28,7 +28,7 @@
 $$SOURCE_DIR/core/fxcrt/xml_int.h
 
 SOURCES += \
-$$SOURCE_DIR/core/fxcrt/fxcrt_qt.cpp \
+#$$SOURCE_DIR/core/fxcrt/fxcrt_qt.cpp \
 $$SOURCE_DIR/core/fxcrt/fx_basic_array.cpp \
 $$SOURCE_DIR/core/fxcrt/fx_basic_bstring.cpp \
 $$SOURCE_DIR/core/fxcrt/fx_basic_buffer.cpp \
diff -ENwbur "a/qtpdfium/src/3rdparty/fxge.pri" ./3rdparty/fxge.pri
--- "b/qtpdfium/src/3rdparty/fxge.pri"	2017-02-12 12:35:02.373223200 +0700
+++ ./3rdparty/fxge.pri	2017-02-12 16:21:39.637575100 +0700
@@ -42,7 +42,6 @@
 $$SOURCE_DIR/core/fxge/android/cfpf_skiafont.cpp \
 $$SOURCE_DIR/core/fxge/android/cfpf_skiafontmgr.cpp \
 $$SOURCE_DIR/core/fxge/android/cfx_androidfontinfo.cpp \
-# $$SOURCE_DIR/core/fxge/android/fx_android_imp.cpp \
 $$SOURCE_DIR/core/fxge/dib/fx_dib_composite.cpp \
 $$SOURCE_DIR/core/fxge/dib/fx_dib_convert.cpp \
 $$SOURCE_DIR/core/fxge/dib/fx_dib_engine.cpp \
@@ -83,8 +82,27 @@
 $$SOURCE_DIR/core/fxge/ge/fx_ge_fontmap.cpp \
 $$SOURCE_DIR/core/fxge/ge/fx_ge_linux.cpp \
 $$SOURCE_DIR/core/fxge/ge/fx_ge_text.cpp \
-$$SOURCE_DIR/core/fxge/ge/fx_ge_qt.cpp \
+#$$SOURCE_DIR/core/fxge/ge/fx_ge_qt.cpp \
 $$SOURCE_DIR/core/fxge/agg/fx_agg_driver.cpp \
 $$SOURCE_DIR/core/fxge/ifx_renderdevicedriver.cpp
 
+android*{
+SOURCES += \
+	$$SOURCE_DIR/core/fxge/android/fx_android_imp.cpp 
+}
 
+win32{
+SOURCES += \
+	$$SOURCE_DIR/core/fxge/win32/cfx_psrenderer.cpp \
+      $$SOURCE_DIR/core/fxge/win32/cpsoutput.cpp \
+      $$SOURCE_DIR/core/fxge/win32/fx_win32_device.cpp \
+      $$SOURCE_DIR/core/fxge/win32/fx_win32_dib.cpp \
+      $$SOURCE_DIR/core/fxge/win32/fx_win32_dwrite.cpp \
+      $$SOURCE_DIR/core/fxge/win32/fx_win32_gdipext.cpp \
+      $$SOURCE_DIR/core/fxge/win32/fx_win32_print.cpp 
+	  
+HEADERS += \
+	$$SOURCE_DIR/core/fxge/win32/cpsoutput.h \
+      $$SOURCE_DIR/core/fxge/win32/dwrite_int.h \
+      $$SOURCE_DIR/core/fxge/win32/cfx_psrenderer.h 
+}
\ No newline at end of file
diff -ENwbur "a/qtpdfium/src/mydiff" ./mydiff
--- "b/qtpdfium/src/mydiff"	1970-01-01 07:00:00.000000000 +0700
+++ ./mydiff	2017-02-12 16:30:54.913551400 +0700
@@ -0,0 +1,62 @@
+diff -ENwbur "a/qtpdfium/src/3rdparty/fxcrt.pri" ./3rdparty/fxcrt.pri
+--- "b/qtpdfium/src/3rdparty/fxcrt.pri"	2017-02-12 12:35:02.326423100 +0700
++++ ./3rdparty/fxcrt.pri	2017-02-12 14:57:38.163318700 +0700
+@@ -2,7 +2,7 @@
+ SOURCE_DIR = $$PWD/pdfium
+ 
+ PRIVATE_HEADERS += \
+-$$SOURCE_DIR/core/fxcrt/fxcrt_qt.h \
++#$$SOURCE_DIR/core/fxcrt/fxcrt_qt.h \
+ $$SOURCE_DIR/core/fxcrt/cfx_maybe_owned.h \
+ $$SOURCE_DIR/core/fxcrt/cfx_observable.h \
+ $$SOURCE_DIR/core/fxcrt/cfx_retain_ptr.h \
+@@ -28,7 +28,7 @@
+ $$SOURCE_DIR/core/fxcrt/xml_int.h
+ 
+ SOURCES += \
+-$$SOURCE_DIR/core/fxcrt/fxcrt_qt.cpp \
++#$$SOURCE_DIR/core/fxcrt/fxcrt_qt.cpp \
+ $$SOURCE_DIR/core/fxcrt/fx_basic_array.cpp \
+ $$SOURCE_DIR/core/fxcrt/fx_basic_bstring.cpp \
+ $$SOURCE_DIR/core/fxcrt/fx_basic_buffer.cpp \
+diff -ENwbur "a/qtpdfium/src/3rdparty/fxge.pri" ./3rdparty/fxge.pri
+--- "b/qtpdfium/src/3rdparty/fxge.pri"	2017-02-12 12:35:02.373223200 +0700
++++ ./3rdparty/fxge.pri	2017-02-12 16:21:39.637575100 +0700
+@@ -42,7 +42,6 @@
+ $$SOURCE_DIR/core/fxge/android/cfpf_skiafont.cpp \
+ $$SOURCE_DIR/core/fxge/android/cfpf_skiafontmgr.cpp \
+ $$SOURCE_DIR/core/fxge/android/cfx_androidfontinfo.cpp \
+-# $$SOURCE_DIR/core/fxge/android/fx_android_imp.cpp \
+ $$SOURCE_DIR/core/fxge/dib/fx_dib_composite.cpp \
+ $$SOURCE_DIR/core/fxge/dib/fx_dib_convert.cpp \
+ $$SOURCE_DIR/core/fxge/dib/fx_dib_engine.cpp \
+@@ -83,8 +82,27 @@
+ $$SOURCE_DIR/core/fxge/ge/fx_ge_fontmap.cpp \
+ $$SOURCE_DIR/core/fxge/ge/fx_ge_linux.cpp \
+ $$SOURCE_DIR/core/fxge/ge/fx_ge_text.cpp \
+-$$SOURCE_DIR/core/fxge/ge/fx_ge_qt.cpp \
++#$$SOURCE_DIR/core/fxge/ge/fx_ge_qt.cpp \
+ $$SOURCE_DIR/core/fxge/agg/fx_agg_driver.cpp \
+ $$SOURCE_DIR/core/fxge/ifx_renderdevicedriver.cpp
+ 
++android*{
++SOURCES += \
++	$$SOURCE_DIR/core/fxge/android/fx_android_imp.cpp 
++}
+ 
++win32{
++SOURCES += \
++	$$SOURCE_DIR/core/fxge/win32/cfx_psrenderer.cpp \
++      $$SOURCE_DIR/core/fxge/win32/cpsoutput.cpp \
++      $$SOURCE_DIR/core/fxge/win32/fx_win32_device.cpp \
++      $$SOURCE_DIR/core/fxge/win32/fx_win32_dib.cpp \
++      $$SOURCE_DIR/core/fxge/win32/fx_win32_dwrite.cpp \
++      $$SOURCE_DIR/core/fxge/win32/fx_win32_gdipext.cpp \
++      $$SOURCE_DIR/core/fxge/win32/fx_win32_print.cpp 
++	  
++HEADERS += \
++	$$SOURCE_DIR/core/fxge/win32/cpsoutput.h \
++      $$SOURCE_DIR/core/fxge/win32/dwrite_int.h \
++      $$SOURCE_DIR/core/fxge/win32/cfx_psrenderer.h 
++}
+\ No newline at end of file
diff -ENwbur "a/qtpdfium/src/pdfium/pdfium.pro" ./pdfium/pdfium.pro
--- "b/qtpdfium/src/pdfium/pdfium.pro"	2017-02-12 12:35:02.404423200 +0700
+++ ./pdfium/pdfium.pro	2017-02-12 15:15:31.814807500 +0700
@@ -13,6 +13,9 @@
 CONFIG += warn_on strict_flags c++11
 load(qt_module)
 
+win32{
+ LIBS+= advapi32.lib
+}
 #QMAKE_DOCS = $$PWD/doc/qtpdfium.qdocconf
 include($$PWD/../3rdparty/pdfium.pri)
 
 

Do you have any suggestion to make passing the testcases? On android my build also was working fine using above patch,
but with untested testcase and my sample android app can open some pdf files same as on windows one.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants