aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-11-25 13:39:35 +0000
committersaturneric <[email protected]>2024-11-25 13:39:35 +0000
commit50e2d5cb3deaf3359a68ceaebdaa2abdb2142fd6 (patch)
treeff0dc0b571bfeb8d3431c239bbffefce3fbb7300 /src/main.cpp
parenttest: fix and add KeyGen & SubkeyGen test cases (diff)
downloadGpgFrontend-50e2d5cb3deaf3359a68ceaebdaa2abdb2142fd6.tar.gz
GpgFrontend-50e2d5cb3deaf3359a68ceaebdaa2abdb2142fd6.zip
fix: solve a race situation at unit test mode
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index fbd53649..040269fb 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -102,16 +102,17 @@ auto main(int argc, char* argv[]) -> int {
if (parser.isSet("t")) {
ctx->gather_external_gnupg_info = false;
- ctx->load_default_gpg_context = false;
+ ctx->unit_test_mode = true;
- InitGlobalBasicEnv(ctx, false);
+ InitGlobalBasicEnvSync(ctx);
rtn = RunTest(ctx);
ShutdownGlobalBasicEnv(ctx);
return rtn;
}
ctx->gather_external_gnupg_info = true;
- ctx->load_default_gpg_context = true;
+ ctx->unit_test_mode = false;
+
InitGlobalBasicEnv(ctx, true);
rtn = StartApplication(ctx);