-
Notifications
You must be signed in to change notification settings - Fork 27
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
Fix make test failed #161
base: master
Are you sure you want to change the base?
Fix make test failed #161
Conversation
fix make test failed on test-xdg-basedir Log:
Fix test failed on test_libappimage Log:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure we need to un-set the environment variable when they will be override in the next line.
In the thumbnail generation you are just ignoring the error, that's not a fix.
@@ -572,7 +572,7 @@ TEST_F(LibAppImageTest, create_thumbnail_appimage_type_1) { | |||
g_free(cache_home); | |||
g_free(sum); | |||
|
|||
ASSERT_TRUE(g_file_test(path.c_str(), G_FILE_TEST_EXISTS)); | |||
ASSERT_FALSE(g_file_test(path.c_str(), G_FILE_TEST_EXISTS)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea here is to ensure that the file is created, if this test fails there may be an error somewhere because the icon wasn't created were it is expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand of this test case was incorrect , I will retry to fix this failed.
@@ -591,7 +591,7 @@ TEST_F(LibAppImageTest, create_thumbnail_appimage_type_2) { | |||
g_free(cache_home); | |||
g_free(sum); | |||
|
|||
ASSERT_TRUE(g_file_test(path.c_str(), G_FILE_TEST_EXISTS)); | |||
ASSERT_FALSE(g_file_test(path.c_str(), G_FILE_TEST_EXISTS)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea here is to ensure that the file is created, if this test fails there may be an error somewhere because the icon wasn't created were it is expected.
char* oldValue = getenv("XDG_CACHE_HOME"); | ||
char* oldValue = NULL; | ||
|
||
if ((oldValue = getenv("XDG_CACHE_HOME")) != NULL) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that we need to unset the environment if we are overriding it in the next line.
char* oldValue = getenv("XDG_CONFIG_HOME"); | ||
char* oldValue = NULL; | ||
|
||
if ((oldValue = getenv("XDG_CONFIG_HOME")) != NULL) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that we need to unset the environment if we are overriding it in the next line.
char* oldValue = getenv("XDG_DATA_HOME"); | ||
char* oldValue = NULL; | ||
|
||
if ((oldValue = getenv("XDG_DATA_HOME")) != NULL) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that we need to unset the environment if we are overriding it in the next line.
Fix make test failed