trivial: Fix make distcheck

This commit is contained in:
Richard Hughes 2015-07-25 14:51:36 +01:00
parent 3ed5447c92
commit 31477cf4e7
2 changed files with 7 additions and 5 deletions

View File

@ -53,6 +53,7 @@ MAINTAINERCLEANFILES = \
DISTCHECK_CONFIGURE_FLAGS = \
--enable-colorhug \
--enable-uefi \
--with-udevrulesdir=$$dc_install_base/$(udevrulesdir) \
--with-systemdunitdir=$$dc_install_base/$(systemdunitdir)
GITIGNOREFILES = \

View File

@ -195,7 +195,13 @@ fu_cab_func (void)
/* extract firmware */
ret = fu_cab_extract (cab, FU_CAB_EXTRACT_FLAG_FIRMWARE |
FU_CAB_EXTRACT_FLAG_SIGNATURE, &error);
g_assert_no_error (error);
g_assert (ret);
g_assert (g_str_has_suffix (fu_cab_get_filename_firmware (cab), "/firmware.bin"));
g_assert (g_file_test (fu_cab_get_filename_firmware (cab), G_FILE_TEST_EXISTS));
/* this is not available in make distcheck */
ret = fu_cab_verify (cab, &error);
if (g_error_matches (error, FWUPD_ERROR, FWUPD_ERROR_NOT_FOUND)) {
g_clear_error (&error);
} else {
@ -203,13 +209,8 @@ fu_cab_func (void)
g_assert (ret);
/* check the certificate */
ret = fu_cab_verify (cab, &error);
g_assert_no_error (error);
g_assert (ret);
g_assert_cmpint (fu_cab_get_trust_flags (cab), ==, FWUPD_TRUST_FLAG_PAYLOAD);
}
g_assert (g_str_has_suffix (fu_cab_get_filename_firmware (cab), "/firmware.bin"));
g_assert (g_file_test (fu_cab_get_filename_firmware (cab), G_FILE_TEST_EXISTS));
/* clean up */
ret = fu_cab_delete_temp_files (cab, &error);