mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
test: fix screenshot API impl
When redoing the website we deleted the libvirtLogo.png file not remembering that the test driver screenshot API impl relied on it. Rather than having the test driver use the logo as a side effect, give it its own dedicated image to use. This is installed in /usr/share/libvirt/test-screenshot.png and is taken from a NeXT Cube running WorldWideWeb[1]. The very first web browser in existance, running on the hardware it was originally written on. [1] https://en.wikipedia.org/wiki/WorldWideWeb Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
4ec981d9c2
commit
0be9cea199
@ -1842,6 +1842,8 @@ exit 0
|
||||
|
||||
%{_datadir}/libvirt/cpu_map.xml
|
||||
|
||||
%{_datadir}/libvirt/test-screenshot.png
|
||||
|
||||
%config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf
|
||||
|
||||
%files admin
|
||||
|
@ -232,6 +232,8 @@ rm -rf $RPM_BUILD_ROOT%{mingw64_libexecdir}/libvirt-guests.sh
|
||||
|
||||
%{mingw32_datadir}/libvirt/cpu_map.xml
|
||||
|
||||
%{mingw32_datadir}/libvirt/test-screenshot.png
|
||||
|
||||
%{mingw32_datadir}/locale/*/LC_MESSAGES/libvirt.mo
|
||||
|
||||
%dir %{mingw32_includedir}/libvirt
|
||||
@ -314,6 +316,8 @@ rm -rf $RPM_BUILD_ROOT%{mingw64_libexecdir}/libvirt-guests.sh
|
||||
|
||||
%{mingw64_datadir}/libvirt/cpu_map.xml
|
||||
|
||||
%{mingw64_datadir}/libvirt/test-screenshot.png
|
||||
|
||||
%{mingw64_datadir}/locale/*/LC_MESSAGES/libvirt.mo
|
||||
|
||||
%dir %{mingw64_includedir}/libvirt
|
||||
|
@ -692,6 +692,7 @@ check-local: check-protocol check-symfile check-symsorting \
|
||||
# Mock driver, covering domains, storage, networks, etc
|
||||
TEST_DRIVER_SOURCES = \
|
||||
test/test_driver.c test/test_driver.h
|
||||
TEST_DRIVER_ASSETS = test/test-screenshot.png
|
||||
|
||||
# Now the Hypervisor specific drivers
|
||||
XEN_DRIVER_SOURCES = \
|
||||
@ -1195,6 +1196,10 @@ GENERATED_SYM_FILES = \
|
||||
$(NULL)
|
||||
|
||||
if WITH_TEST
|
||||
|
||||
driver_test_asset_DATA = $(TEST_DRIVER_ASSETS)
|
||||
driver_test_assetdir = $(pkgdatadir)
|
||||
|
||||
noinst_LTLIBRARIES += libvirt_driver_test.la
|
||||
libvirt_la_BUILT_LIBADD += libvirt_driver_test.la
|
||||
libvirt_driver_test_la_CFLAGS = \
|
||||
@ -1887,6 +1892,7 @@ access/viraccessapichecklxc.c: $(srcdir)/rpc/gendispatch.pl \
|
||||
# Add all conditional sources just in case...
|
||||
EXTRA_DIST += \
|
||||
$(TEST_DRIVER_SOURCES) \
|
||||
$(TEST_DRIVER_ASSETS) \
|
||||
$(REMOTE_DRIVER_SOURCES) \
|
||||
$(XEN_DRIVER_SOURCES) \
|
||||
$(QEMU_DRIVER_SOURCES) \
|
||||
|
BIN
src/test/test-screenshot.png
Normal file
BIN
src/test/test-screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 33 KiB |
@ -5923,7 +5923,7 @@ testDomainScreenshot(virDomainPtr dom ATTRIBUTE_UNUSED,
|
||||
if (VIR_STRDUP(ret, "image/png") < 0)
|
||||
return NULL;
|
||||
|
||||
if (virFDStreamOpenFile(st, PKGDATADIR "/libvirtLogo.png", 0, 0, O_RDONLY) < 0)
|
||||
if (virFDStreamOpenFile(st, PKGDATADIR "/test-screenshot.png", 0, 0, O_RDONLY) < 0)
|
||||
VIR_FREE(ret);
|
||||
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user