From 5efcaf4e59efed72e93ccc7a8d753f11f96e0ef1 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 28 Nov 2021 22:05:46 +0100 Subject: [PATCH] Fix copying testdata.fc file to the tests build directory This file was listed in test.bkl but wasn't actually copied because the value of was overwritten by another just below ever since the changes of 21fe35aff7 (add wxImage test units to test loading from both seekable and non-seekable streams, 2009-06-01). Fix this by splitting this wx-data into 2 different ones, to avoid this conflict. --- tests/Makefile.in | 16 ++++++++++++++-- tests/makefile.gcc | 8 ++++++-- tests/makefile.vc | 6 +++++- tests/test.bkl | 2 ++ 4 files changed, 27 insertions(+), 5 deletions(-) diff --git a/tests/Makefile.in b/tests/Makefile.in index 747e4c5f18..ee17afc496 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -448,7 +448,7 @@ COND_wxUSE_REGEX_builtin___LIB_REGEX_p = \ ### Targets: ### -all: test$(EXEEXT) $(__test_drawing___depname) $(__test_drawingplugin___depname) $(__test_gui___depname) $(__test_gui_bundle___depname) $(__test_allheaders___depname) $(__test_allheaders_bundle___depname) data data-images fr ja +all: test$(EXEEXT) $(__test_drawing___depname) $(__test_drawingplugin___depname) $(__test_gui___depname) $(__test_gui_bundle___depname) $(__test_allheaders___depname) $(__test_allheaders_bundle___depname) data data-image-sample data-images fr ja install: @@ -552,6 +552,18 @@ test$(EXEEXT): $(TEST_OBJECTS) @COND_USE_PCH_1@ $(BK_MAKE_PCH) ./.pch/testprec_test_allheaders/testprec.h.gch testprec.h $(CXX) $(TEST_ALLHEADERS_CXXFLAGS) data: + @mkdir -p . + @for f in testdata.fc; do \ + if test ! -f ./$$f -a ! -d ./$$f ; \ + then x=yep ; \ + else x=`find $(srcdir)/$$f -newer ./$$f -print` ; \ + fi; \ + case "$$x" in ?*) \ + cp -pRf $(srcdir)/$$f . ;; \ + esac; \ + done + +data-image-sample: @mkdir -p . @for f in horse.ani horse.bmp horse.cur horse.gif horse.ico horse.jpg horse.pcx horse.png horse.pnm horse.tga horse.tif horse.xpm; do \ if test ! -f ./$$f -a ! -d ./$$f ; \ @@ -1248,4 +1260,4 @@ failtest_allheaders: @IF_GNU_MAKE@-include ./.deps/*.d .PHONY: all install uninstall clean distclean test_gui_bundle \ - test_allheaders_bundle data data-images fr ja + test_allheaders_bundle data data-image-sample data-images fr ja diff --git a/tests/makefile.gcc b/tests/makefile.gcc index e2ba26d653..c9ee403ca7 100644 --- a/tests/makefile.gcc +++ b/tests/makefile.gcc @@ -501,7 +501,7 @@ $(OBJS): ### Targets: ### -all: $(OBJS)\test.exe $(__test_drawing___depname) $(__test_drawingplugin___depname) $(__test_gui___depname) $(__test_allheaders___depname) data data-images fr ja +all: $(OBJS)\test.exe $(__test_drawing___depname) $(__test_drawingplugin___depname) $(__test_gui___depname) $(__test_allheaders___depname) data data-image-sample data-images fr ja clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o @@ -550,6 +550,10 @@ $(OBJS)\test_allheaders.exe: $(TEST_ALLHEADERS_OBJECTS) $(OBJS)\test_allheaders_ endif data: + if not exist $(OBJS) mkdir $(OBJS) + for %%f in (testdata.fc) do if not exist $(OBJS)\%%f copy .\%%f $(OBJS) + +data-image-sample: if not exist $(OBJS) mkdir $(OBJS) for %%f in (horse.ani horse.bmp horse.cur horse.gif horse.ico horse.jpg horse.pcx horse.png horse.pnm horse.tga horse.tif horse.xpm) do if not exist $(OBJS)\%%f copy .\%%f $(OBJS) @@ -1183,7 +1187,7 @@ $(OBJS)\test_allheaders_allheaders.o: ./allheaders.cpp $(OBJS)\test_allheaders_testableframe.o: ./testableframe.cpp $(CXX) -c -o $@ $(TEST_ALLHEADERS_CXXFLAGS) $(CPPDEPS) $< -.PHONY: all clean data data-images fr ja +.PHONY: all clean data data-image-sample data-images fr ja SHELL := $(COMSPEC) diff --git a/tests/makefile.vc b/tests/makefile.vc index eeab8e73dd..5d9b0f676b 100644 --- a/tests/makefile.vc +++ b/tests/makefile.vc @@ -928,7 +928,7 @@ $(OBJS): ### Targets: ### -all: $(OBJS)\test.exe $(__test_drawing___depname) $(__test_drawingplugin___depname) $(__test_gui___depname) $(__test_allheaders___depname) data data-images fr ja +all: $(OBJS)\test.exe $(__test_drawing___depname) $(__test_drawingplugin___depname) $(__test_gui___depname) $(__test_allheaders___depname) data data-image-sample data-images fr ja clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -984,6 +984,10 @@ $(OBJS)\test_allheaders.exe: $(OBJS)\test_allheaders_dummy.obj $(TEST_ALLHEADER !endif data: + if not exist $(OBJS) mkdir $(OBJS) + for %f in (testdata.fc) do if not exist $(OBJS)\%f copy .\%f $(OBJS) + +data-image-sample: if not exist $(OBJS) mkdir $(OBJS) for %f in (horse.ani horse.bmp horse.cur horse.gif horse.ico horse.jpg horse.pcx horse.png horse.pnm horse.tga horse.tif horse.xpm) do if not exist $(OBJS)\%f copy .\%f $(OBJS) diff --git a/tests/test.bkl b/tests/test.bkl index 89ef76cb0d..3b3d45afb8 100644 --- a/tests/test.bkl +++ b/tests/test.bkl @@ -339,7 +339,9 @@ testdata.fc + + horse.ani horse.bmp horse.cur horse.gif horse.ico horse.jpg horse.pcx horse.png horse.pnm horse.tga horse.tif horse.xpm