diff options
author | saturneric <[email protected]> | 2024-11-25 13:39:35 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-11-25 13:39:35 +0000 |
commit | 50e2d5cb3deaf3359a68ceaebdaa2abdb2142fd6 (patch) | |
tree | ff0dc0b571bfeb8d3431c239bbffefce3fbb7300 /src/main.cpp | |
parent | test: fix and add KeyGen & SubkeyGen test cases (diff) | |
download | GpgFrontend-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.cpp | 7 |
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); |