test.bkl 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  1. <?xml version="1.0" ?>
  2. <makefile>
  3. <!--
  4. The use of PCH is disabled for samples by default but we do want to use
  5. them for the test as this dramatically speeds up its compilation.
  6. -->
  7. <set var="WX_ENABLE_PRECOMP_HEADERS">1</set>
  8. <include file="../build/bakefiles/common_samples.bkl"/>
  9. <template id="wx_test">
  10. <cppflags>$(CPPUNIT_CFLAGS)</cppflags>
  11. <ldflags>$(CPPUNIT_LIBS)</ldflags>
  12. <if cond="WX_DISABLE_PRECOMP_HEADERS=='0'">
  13. <if cond="FORMAT!='autoconf' and PLATFORM_WIN32=='1'">
  14. <sources>dummy.cpp</sources>
  15. <precomp-headers-gen>dummy.cpp</precomp-headers-gen>
  16. </if>
  17. <precomp-headers-header>testprec.h</precomp-headers-header>
  18. <precomp-headers>on</precomp-headers>
  19. <precomp-headers-file>testprec_$(id)</precomp-headers-file>
  20. </if>
  21. </template>
  22. <exe id="test" template="wx_sample_console,wx_test"
  23. template_append="wx_append_base">
  24. <sources>
  25. test.cpp
  26. any/anytest.cpp
  27. archive/archivetest.cpp
  28. archive/ziptest.cpp
  29. archive/tartest.cpp
  30. arrays/arrays.cpp
  31. base64/base64.cpp
  32. cmdline/cmdlinetest.cpp
  33. config/fileconf.cpp
  34. config/regconf.cpp
  35. datetime/datetimetest.cpp
  36. events/evthandler.cpp
  37. events/evtlooptest.cpp
  38. events/evtsource.cpp
  39. events/stopwatch.cpp
  40. events/timertest.cpp
  41. exec/exec.cpp
  42. file/dir.cpp
  43. file/filefn.cpp
  44. file/filetest.cpp
  45. filekind/filekind.cpp
  46. filename/filenametest.cpp
  47. filesys/filesystest.cpp
  48. fontmap/fontmaptest.cpp
  49. formatconverter/formatconvertertest.cpp
  50. fswatcher/fswatchertest.cpp
  51. hashes/hashes.cpp
  52. interactive/output.cpp
  53. interactive/input.cpp
  54. intl/intltest.cpp
  55. lists/lists.cpp
  56. log/logtest.cpp
  57. longlong/longlongtest.cpp
  58. mbconv/convautotest.cpp
  59. mbconv/mbconvtest.cpp
  60. misc/dynamiclib.cpp
  61. misc/environ.cpp
  62. misc/metatest.cpp
  63. misc/misctests.cpp
  64. misc/module.cpp
  65. misc/pathlist.cpp
  66. misc/typeinfotest.cpp
  67. net/ipc.cpp
  68. net/socket.cpp
  69. regex/regextest.cpp
  70. regex/wxregextest.cpp
  71. scopeguard/scopeguardtest.cpp
  72. strings/iostream.cpp
  73. strings/numformatter.cpp
  74. strings/strings.cpp
  75. strings/stdstrings.cpp
  76. strings/tokenizer.cpp
  77. strings/unichar.cpp
  78. strings/unicode.cpp
  79. strings/vararg.cpp
  80. strings/crt.cpp
  81. strings/vsnprintf.cpp
  82. streams/bstream.cpp
  83. streams/datastreamtest.cpp
  84. streams/ffilestream.cpp
  85. streams/fileback.cpp
  86. streams/filestream.cpp
  87. streams/iostreams.cpp
  88. streams/largefile.cpp
  89. streams/memstream.cpp
  90. streams/socketstream.cpp
  91. streams/sstream.cpp
  92. streams/stdstream.cpp
  93. streams/tempfile.cpp
  94. streams/textstreamtest.cpp
  95. streams/zlibstream.cpp
  96. textfile/textfiletest.cpp
  97. thread/atomic.cpp
  98. thread/misc.cpp
  99. thread/queue.cpp
  100. thread/tls.cpp
  101. uris/ftp.cpp
  102. uris/uris.cpp
  103. uris/url.cpp
  104. vectors/vectors.cpp
  105. weakref/evtconnection.cpp
  106. weakref/weakref.cpp
  107. xlocale/xlocale.cpp
  108. xml/xmltest.cpp
  109. </sources>
  110. <wx-lib>net</wx-lib>
  111. <wx-lib>xml</wx-lib>
  112. <wx-lib>base</wx-lib>
  113. </exe>
  114. <exe id="test_gui" template="wx_sample,wx_test"
  115. template_append="wx_append"
  116. cond="USE_GUI=='1'">
  117. <!-- link against GUI libraries, but be a console app: -->
  118. <app-type>console</app-type>
  119. <sources>
  120. asserthelper.cpp
  121. test.cpp
  122. testableframe.cpp
  123. geometry/rect.cpp
  124. geometry/size.cpp
  125. geometry/point.cpp
  126. geometry/region.cpp
  127. graphics/bitmap.cpp
  128. graphics/colour.cpp
  129. graphics/ellipsization.cpp
  130. graphics/measuring.cpp
  131. graphics/affinematrix.cpp
  132. graphics/boundingbox.cpp
  133. config/config.cpp
  134. controls/bitmapcomboboxtest.cpp
  135. controls/bitmaptogglebuttontest.cpp
  136. controls/bookctrlbasetest.cpp
  137. controls/buttontest.cpp
  138. controls/checkboxtest.cpp
  139. controls/checklistboxtest.cpp
  140. controls/choicebooktest.cpp
  141. controls/choicetest.cpp
  142. controls/comboboxtest.cpp
  143. controls/dataviewctrltest.cpp
  144. controls/datepickerctrltest.cpp
  145. controls/frametest.cpp
  146. controls/gaugetest.cpp
  147. controls/gridtest.cpp
  148. controls/headerctrltest.cpp
  149. controls/htmllboxtest.cpp
  150. controls/hyperlinkctrltest.cpp
  151. controls/itemcontainertest.cpp
  152. controls/label.cpp
  153. controls/listbasetest.cpp
  154. controls/listbooktest.cpp
  155. controls/listboxtest.cpp
  156. controls/listctrltest.cpp
  157. controls/listviewtest.cpp
  158. controls/markuptest.cpp
  159. controls/notebooktest.cpp
  160. controls/ownerdrawncomboboxtest.cpp
  161. controls/pickerbasetest.cpp
  162. controls/pickertest.cpp
  163. controls/radioboxtest.cpp
  164. controls/radiobuttontest.cpp
  165. controls/rearrangelisttest.cpp
  166. controls/richtextctrltest.cpp
  167. controls/searchctrltest.cpp
  168. controls/simplebooktest.cpp
  169. controls/slidertest.cpp
  170. controls/spinctrldbltest.cpp
  171. controls/spinctrltest.cpp
  172. controls/textctrltest.cpp
  173. controls/textentrytest.cpp
  174. controls/togglebuttontest.cpp
  175. controls/toolbooktest.cpp
  176. controls/treebooktest.cpp
  177. controls/treectrltest.cpp
  178. controls/treelistctrltest.cpp
  179. controls/virtlistctrltest.cpp
  180. controls/webtest.cpp
  181. controls/windowtest.cpp
  182. controls/dialogtest.cpp
  183. events/clone.cpp
  184. <!--
  185. Duplicate this file here to test GUI event loops too.
  186. -->
  187. events/evtlooptest.cpp
  188. events/propagation.cpp
  189. events/keyboard.cpp
  190. <!--
  191. And duplicate this one too as wxExecute behaves differently in
  192. console and GUI applications.
  193. -->
  194. exec/exec.cpp
  195. font/fonttest.cpp
  196. image/image.cpp
  197. image/rawbmp.cpp
  198. html/htmlparser.cpp
  199. html/htmlwindow.cpp
  200. menu/accelentry.cpp
  201. menu/menu.cpp
  202. misc/guifuncs.cpp
  203. misc/selstoretest.cpp
  204. misc/garbage.cpp
  205. misc/safearrayconverttest.cpp
  206. misc/settings.cpp
  207. <!--
  208. This one is intentionally duplicated here (it is also part of
  209. non-GUI test) as sockets behave differently in console and GUI
  210. applications.
  211. -->
  212. net/socket.cpp
  213. sizers/boxsizer.cpp
  214. sizers/wrapsizer.cpp
  215. toplevel/toplevel.cpp
  216. validators/valnum.cpp
  217. window/clientsize.cpp
  218. window/setsize.cpp
  219. xml/xrctest.cpp
  220. </sources>
  221. <!--
  222. Can't use <wx-lib> here as it doesn't work with conditionally
  223. defined variables, so fall back <sys-lib> as we must not link with
  224. inexisting webview library to be able to run tests even if
  225. wxWebView is not available.
  226. -->
  227. <sys-lib>$(WXLIB_WEBVIEW)</sys-lib>
  228. <wx-lib>richtext</wx-lib>
  229. <wx-lib>media</wx-lib>
  230. <wx-lib>xrc</wx-lib>
  231. <wx-lib>xml</wx-lib>
  232. <wx-lib>adv</wx-lib>
  233. <wx-lib>html</wx-lib>
  234. <wx-lib>core</wx-lib>
  235. <wx-lib>net</wx-lib>
  236. <wx-lib>base</wx-lib>
  237. </exe>
  238. <wx-data id="data">
  239. <files>testdata.fc</files>
  240. <!-- test data for image/image.cpp test unit: -->
  241. <files>horse.ani horse.bmp horse.cur horse.gif horse.ico horse.jpg
  242. horse.pcx horse.png horse.pnm horse.tga horse.tif horse.xpm</files>
  243. </wx-data>
  244. <wx-data id="data-images">
  245. <srcdir>$(SRCDIR)/image</srcdir>
  246. <dstdir>image</dstdir>
  247. <files>
  248. horse_grey.bmp horse_grey_flipped.bmp
  249. horse_rle4.bmp horse_rle4_flipped.bmp
  250. horse_rle8.bmp horse_rle8_flipped.bmp
  251. horse_bicubic_50x50.png
  252. horse_bicubic_100x100.png
  253. horse_bicubic_150x150.png
  254. horse_bicubic_300x300.png
  255. horse_bilinear_50x50.png
  256. horse_bilinear_100x100.png
  257. horse_bilinear_150x150.png
  258. horse_bilinear_300x300.png
  259. horse_box_average_50x50.png
  260. horse_box_average_100x100.png
  261. horse_box_average_150x150.png
  262. horse_box_average_300x300.png
  263. </files>
  264. </wx-data>
  265. <template id="catalog">
  266. <dstdir>$(BUILDDIR)/intl/$(id)</dstdir>
  267. <srcdir>$(SRCDIR)/intl/$(id)</srcdir>
  268. <files>internat.po internat.mo</files>
  269. </template>
  270. <wx-data id="fr" template="catalog"/>
  271. <fragment format="autoconf">
  272. # notice the ugly hack with using CXXWARNINGS: we can't use CPPFLAGS as
  273. # currently the value in the makefile would be ignored if we did, but
  274. # warnings don't matter when we expect compilation to fail anyhow so we can
  275. # use this variable to enable the compilation of code which is supposed to
  276. # fail
  277. failtest: failtest_combobox failtest_evthandler
  278. failtest_combobox:
  279. @$(RM) test_gui_comboboxtest.o
  280. if $(MAKE) CXXWARNINGS=-DTEST_INVALID_COMBOBOX_ISEMPTY test_gui_comboboxtest.o 2>/dev/null; then \
  281. echo "*** Compilation with TEST_INVALID_COMBOBOX_ISEMPTY unexpectedly succeeded.">&amp;2; \
  282. exit 1; \
  283. fi; \
  284. exit 0
  285. failtest_evthandler:
  286. @$(RM) test_evthandler.o
  287. @for d in GLOBAL STATIC METHOD FUNCTOR NO_HANDLER DERIVED WRONG_CLASS; do \
  288. if $(MAKE) CXXWARNINGS=-DTEST_INVALID_BIND_$$d test_evthandler.o 2>/dev/null; then \
  289. echo "*** Compilation with TEST_INVALID_BIND_$$d unexpectedly succeeded.">&amp;2; \
  290. exit 1; \
  291. fi; \
  292. done; \
  293. exit 0
  294. .PHONY: failtest
  295. </fragment>
  296. </makefile>