Skip to content

Commit

Permalink
ctest: cleanup .gnupg
Browse files Browse the repository at this point in the history
see #1973
see #287
  • Loading branch information
Markus Raab committed May 13, 2018
1 parent fbe50a3 commit 443bac5
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/cframework/tests.c
Expand Up @@ -452,6 +452,20 @@ static void clean_temp_home (void)

if (tempHome)
{
size_t fileToCleanLen = tempHomeLen + 30;
char * fileToClean = elektraMalloc (fileToCleanLen);
snprintf (fileToClean, fileToCleanLen, "%s/.gnupg/random_seed", tempHome);
unlink (fileToClean);
snprintf (fileToClean, fileToCleanLen, "%s/.gnupg/trustdb.gpg", tempHome);
unlink (fileToClean);
snprintf (fileToClean, fileToCleanLen, "%s/.gnupg/pubring.kbx~", tempHome);
unlink (fileToClean);
snprintf (fileToClean, fileToCleanLen, "%s/.gnupg/pubring.kbx", tempHome);
unlink (fileToClean);
snprintf (fileToClean, fileToCleanLen, "%s/.gnupg", tempHome);
rmdir (fileToClean);
elektraFree (fileToClean);

rmdir (tempHome);
elektraFree (tempHome);
tempHome = NULL;
Expand Down

0 comments on commit 443bac5

Please sign in to comment.