aboutsummaryrefslogtreecommitdiffstats
path: root/tests (follow)
Commit message (Collapse)AuthorAgeFilesLines
* tests: Improve handling of spaces in $PATHWerner Koch2020-10-045-14/+14
| | | | | | | -- Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit b2590f2e47fe8ab7352a9e3769b195ff9f398dd7)
* tests: Integrate --use-keyboxd into the OpenPGP test suite.Werner Koch2020-09-244-12/+37
| | | | | | | | | | | * tests/openpgp/all-tests.scm (all-tests): Replace extended-key-format mode with a new keyboxd mode. * tests/openpgp/defs.scm (create-gpghome): Ditto. * tests/openpgp/gpgv.scm: Adjust for keyboxd mode. * tests/openpgp/issue2419.scm: Fix to allow setting a log-file into gpg.conf for debugging. Signed-off-by: Werner Koch <[email protected]>
* tests: Fix convenience function to run gpg.Werner Koch2020-09-241-1/+1
| | | | | | | | | | | | | | * tests/openpgp/defs.scm (pipe:gpg): Remove stray dash. -- The extra dash is problematic at export and import because this does not export a single key as intended by the tests but does two key lookups where the second fails because that userid is always "-". For the current keyring and keybox code this does not matter because it is ignored. The keyboxd code however is more picky and returns an error. Fixes-commit: 9609cb20e4caee739b9fc4fd36797029d2970041 Signed-off-by: Werner Koch <[email protected]>
* tests: New test run envvar to run gpg under valgrind.Werner Koch2020-09-042-1/+14
| | | | | | | | | -- Take care: Running under valgrind takes loooong and in some case you may run into an valgrind internal error. Signed-off-by: Werner Koch <[email protected]>
* build: New configure option --disable-testsWerner Koch2020-08-201-1/+1
| | | | | | | | * configure.ac: Add option --disable-tests. Print warnings in the summary. (DISABLE_TESTS): New am_conditional. -- GnuPG-bug-id: 4960
* gpg: Add regular expression support.NIIBE Yutaka2020-04-031-4/+0
| | | | | | | | | | | | | | | | | * AUTHORS, COPYING.other: Update. * Makefile.am (SUBDIRS): Add regexp sub directory. * configure.ac (DISABLE_REGEX): Remove. * g10/Makefile.am (needed_libs): Add libregexp.a. * g10/trustdb.c: Remove DISABLE_REGEX support. * regexp/LICENSE, regexp/jimregexp.c, regexp/jimregexp.h, regexp/utf8.c, regexp/utf8.h: New from Jim Tcl. * regexp/UnicodeData.txt: New from Unicode. * regexp/Makefile.am, regexp/parse-unidata.awk: New. * tests/openpgp/Makefile.am: Remove DISABLE_REGEX support. * tools/Makefile.am: Remove DISABLE_REGEX support. GnuPG-bug-id: 4843 Signed-off-by: NIIBE Yutaka <[email protected]>
* gpgconf: Further simplify the gpgconf option processing.Werner Koch2020-03-141-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common/gc-opt-flags.h (GC_OPT_FLAG_RUNTIME): Move to ... * tools/gpgconf-comp.c: here. (known_options_scdaemon): Remove "options". (known_options_dirmngr): Remove "options". (known_options_gpgsm): Remove "options". (known_options_gpg): Remove "options" and "keyserver". (struct gc_option_s): Rename active t gpgconf_list. (gc_component_list_options): Do not act upon active. (option_check_validity): Ditto. (is_known_option): Make it work correctly for unknown options. (retrieve_options_from_program): Use renamed flag gpgconf_list only to detect duplicated items from --gpgconf-list. Do not set runtime. Only e set the options if set by --gpgconf-list; never clear them. * agent/gpg-agent.c: Simplify the --gpgconf-list output. * dirmngr/dirmngr.c: Ditto. * g10/gpg.c: Ditto. * kbx/keyboxd.c: Ditto. * scd/scdaemon.c: Ditto. * sm/gpgsm.c: Ditto. * tests/openpgp/gpgconf.scm: Use "compliance" instead of "keyserver" for the string arg test. -- There is no need to read the list of options from the components unless they convey a default value. It is better to consult only the list we have in gpgconf-comp.c to decide on whether an option should be displayed. Right, this might mess up thing if a newer gpgconf version is used with an older component, but we already print warnings in this case and in general we do not want to support this anymore - the times of gpg 1.4. and 2.0 are long over now. GnuPG-bug-id: 4788 Signed-off-by: Werner Koch <[email protected]>
* Remove the now obsolete argparse code.Werner Koch2020-02-221-13/+10
| | | | | | | | | * tests/gpgscm/main.c: Switch to the new option parser. * common/argparse.c, common/argparse.h: Remove. * common/init.c (_init_common_subsystems): Do not call obsolete func. * common/Makefile.am (common_sources): Remove those files. Signed-off-by: Werner Koch <[email protected]>
* gpg: Use gpgrt's new option parser to provide a global conf file.Werner Koch2020-02-201-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | * common/util.h: Remove argparse.h. * common/argparse.c: Undef GPGRT_ENABLE_ARGPARSE_MACROS. * configure.ac (GPGRT_ENABLE_ARGPARSE_MACROS): Define. * agent/gpg-agent.c: Undef GPGRT_ENABLE_ARGPARSE_MACROS and include argparse.h. Do this also for all main modules which use our option parser except for gpg. Replace calls to strusage by calls to gpgrt_strusage everywhere. * g10/gpg.c (opts): Change type to gpgrt_opt_t. Flag oOptions and oNoOptions with ARGPARSE_conffile and ARGPARSE_no_conffile. (main): Change type of pargs to gpgrt_argparse_t. Rework the option parser to make use of the new gpgrt_argparser. -- This is not yet finished but a make check works. gpg has the most complex and oldest option handling and thus this is the first migration target. SE-Linux checks and version-ed config files are missing and will be added later. GnuPG-bug-id: 4788 Signed-off-by: Werner Koch <[email protected]>
* Spelling cleanup.Daniel Kahn Gillmor2020-02-182-2/+2
| | | | | | | | | | | | | | | | No functional changes, just fixing minor spelling issues. --- Most of these were identified from the command line by running: codespell \ --ignore-words-list fpr,stati,keyserver,keyservers,asign,cas,iff,ifset \ --skip '*.po,ChangeLog*,help.*.txt,*.jpg,*.eps,*.pdf,*.png,*.gpg,*.asc' \ doc g13 g10 kbx agent artwork scd tests tools am common dirmngr sm \ NEWS README README.maint TODO Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* tests: Add a first v5 sample keyWerner Koch2019-03-203-0/+42
| | | | --
* gpg: Avoid importing secret keys if the keyblock is not valid.Werner Koch2019-03-152-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/keydb.h (struct kbnode_struct): Replace unused field RECNO by new field TAG. * g10/kbnode.c (alloc_node): Change accordingly. * g10/import.c (import_one): Add arg r_valid. (sec_to_pub_keyblock): Set tags. (resync_sec_with_pub_keyblock): New. (import_secret_one): Change return code to gpg_error_t. Return an error code if sec_to_pub_keyblock failed. Resync secret keyblock. -- When importing an invalid secret key ring for example without key binding signatures or no UIDs, gpg used to let gpg-agent store the secret keys anyway. This is clearly a bug because the diagnostics before claimed that for example the subkeys have been skipped. Importing the secret key parameters then anyway is surprising in particular because a gpg -k does not show the key. After importing the public key the secret keys suddenly showed up. This changes the behaviour of GnuPG-bug-id: 4392 to me more consistent but is not a solution to the actual bug. Caution: The ecc.scm test now fails because two of the sample keys don't have binding signatures. Signed-off-by: Werner Koch <[email protected]>
* tests: Add sample secret key w/o binding signatures.Werner Koch2019-03-152-0/+66
| | | | | | -- GnuPG-bug-id: 4392
* gpgscm: Build well even if NDEBUG defined.NIIBE Yutaka2019-02-251-1/+3
| | | | | | | | | | | | | | | | * gpgscm/scheme.c (gc_reservation_failure): Fix adding ";". [!NDEBUG] (scheme_init_custom_alloc): Don't init seserved_lineno. -- Picked from libgpg-error commit of: 8a9397896fd202dcfb3fb46259e43bc05a0ddd2e In some build environment, NDEBUG is defined (although it's bad practice). This change supports such a situation. GnuPG-bug-id: 3959 Signed-off-by: NIIBE Yutaka <[email protected]>
* tests: Add "disable-scdaemon" in gpg-agent.conf.NIIBE Yutaka2019-02-215-10/+5
| | | | | | | | | | | | | | | | | * tests/openpgp/defs.scm: Add "disable-scdaemon". Remove "scdaemon-program". * tests/gpgme/gpgme-defs.scm, tests/gpgsm/gpgsm-defs.scm: Likewise. * tests/inittests, tests/pkits/inittests: Add "disable-scdaemon" -- Before this change, running "make check" accesses USB device by scdaemon on host computer. If there is any smartcard/token available, it may affect test results. Because default key choice depends on smartcard/token availability now and existing tests have nothing about testing smartcard/token, disabling scdaemon is good. Signed-off-by: NIIBE Yutaka <[email protected]>
* all: fix spelling and typosDaniel Kahn Gillmor2018-10-241-5/+5
| | | | Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* gpgscm: Suppress warnings for GCC > 6.NIIBE Yutaka2018-09-061-15/+14
| | | | | | | | | | | | | | | | | * tests/gpgscm/scheme.c (CASE): Use unused attribute for GCC > 6. (FALLTHROUGH): New for fallthrough. (Eval_Cycle): Use FALLTHROUGH. Remove not-needed comment of fallthrough. -- Since GCC combines C preprocessor macro expansion, the fallthrough comment doesn't work well to suppress warnings for -Wimplicit-fallthrough, near the macro CASE. To handle this problem, we use GCC's extension of unused label and fallthrough attributes. Signed-off-by: NIIBE Yutaka <[email protected]>
* gpg: Ignore the multiple message override options.Werner Koch2018-05-301-8/+4
| | | | | | | | | | | | | | | | | * g10/gpg.c (oAllowMultisigVerification) (oAllowMultipleMessages, oNoAllowMultipleMessages): Remove. (opts): Turn --allow-multisig-verification, --allow-multiple-messages and --no-allow-multiple-messages into NOPs * g10/options.h (struct opt): Remove flags.allow_multiple_messages. * g10/mainproc.c (proc_plaintext): Assume allow_multiple_messages is false. -- These options are very old compatibility hacks and should not be used anymore. We keep them as dummy options in case someone has them in the conf file. Signed-off-by: Werner Koch <[email protected]>
* gpg: Hard fail on a missing MDC even for legacy algorithms.Werner Koch2018-05-151-0/+1
| | | | | | | | * g10/mainproc.c (proc_encrypted): Require an MDC or AEAD * tests/openpgp/defs.scm (create-gpghome): Use --ignore-mdc-error to allow testing with the current files. Signed-off-by: Werner Koch <[email protected]>
* Merge branch 'STABLE-BRANCH-2-2' into masterWerner Koch2018-04-107-13/+28
|\ | | | | | | | | | | | | | | | | -- Fixed conflicts: NEWS - keep master configure.ac - merge g10/card-util.c - mostly 2.2 g10/sig-check.c - 2.2
| * tests: Fix no gpg-agent upon removal of GNUPGHOME.NIIBE Yutaka2018-04-047-13/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/gpgscm/gnupg.scm (with-ephemeral-home-directory): Add teadown-fn. * tests/gpgsm/export.scm: Use -no-atexit version and stop-agent. * tests/openpgp/decrypt-session-key.scm: Likewise. * tests/openpgp/decrypt-unwrap-verify.scm: Likewise. * tests/openpgp/defs.scm (have-opt-always-trust): Likewise. (setup-environment-no-atexit): New. (start-agent): Support no use of atexit. * tests/gpgsm/gpgsm-defs.scm (setup-gpgsm-environment-no-atexit): New. * tests/migrations/common.scm (untar-armored): Follow the change of with-ephemeral-home-directory. -- When gpg-agent detects homedir removal, it will automatically exit. Then, call of 'gpgconf --kill all' will fail. So, stop-agent should be called before the removal of homedir. Signed-off-by: NIIBE Yutaka <[email protected]>
* | Merge branch 'STABLE-BRANCH-2-2'Werner Koch2018-02-221-1/+1
|\|
| * tests: Fix for NetBSD with __func__.NIIBE Yutaka2018-01-291-1/+1
| | | | | | | | | | | | | | | | | | | | * tests/asschk.c: Don't define __func__ if available. -- NetBSD 7.0 has __func__ defined. Signed-off-by: NIIBE Yutaka <[email protected]>
| * agent, tests: Support --disable-scdaemon build case.NIIBE Yutaka2017-10-262-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * agent/command.c (cmd_scd): Support !BUILD_WITH_SCDAEMON. * tests/openpgp/defs.scm (create-gpghome): Likewise. * tests/gpgsm/gpgsm-defs.scm (create-gpgsmhome): Likewise. -- We could modify gpg-agent to remove all support of scdaemon, with no inclusion of call-scd.c, divert-scd.c, and learncard.c, but it would not be worth to do that. GnuPG-bug-id: 3316 Signed-off-by: NIIBE Yutaka <[email protected]>
| * tests: Fix a test which specifies expiration date.NIIBE Yutaka2017-09-111-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/openpgp/quick-key-manipulation.scm: Fix expiration time comparison. -- This is a bug fix for Amelia Earhart who is probably in UTC-12. When expiration date is specified, GnuPG interprets it as noon of the date in local time. Before this fix, the test compared the value by 2145916800 which is 2038-01-01 00:00:00 in UTC with allowance of 1 day. When the test was ran in UTC-12 timezone, it failed because of noon in the timezone is midnight of the next day in UTC. GnuPG-bug-id: 3393 Reported-by: Daniel Kahn Gillmor Signed-off-by: NIIBE Yutaka <[email protected]>
* | gpg: New maintainer option --debug-set-iobuf-size.Werner Koch2018-01-241-3/+3
| | | | | | | | | | | | | | | | | | | | * g10/gpg.c (opts): Add new option. (opt_set_iobuf_size): New var. (set_debug): Set the option. * tests/openpgp/armor.scm: Use this option to revert the buffer size to the one which used to exhibit the tested bugs. Signed-off-by: Werner Koch <[email protected]>
* | tests: Handle the case with DISABLE_REGEX.NIIBE Yutaka2017-11-132-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | * tests/openpgp/Makefile.am [DISABLE_REGEX] (EXTRA_DIST, XTESTS): Conditionalize. * tests/openpgp/all-tests.scm (all-tests): Input file is Makefile. -- The feature is only valid with !DISABLE_REGEX. Signed-off-by: NIIBE Yutaka <[email protected]>
* | tests: Run the trust-pgp-4 test again.Damien Goutte-Gattat2017-11-131-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | * tests/openpgp/Makefile.am (XTESTS): Add trust-pgp-4.scm. (EXTRA_DIST): Remove the test file from EXTRA_DIST. -- Now that issue 2923 is fixed, the trust-pgp-4 test passes as expected and we can enable it again. That should help prevent a future regression on this issue. Signed-off-by: Damien Goutte-Gattat <[email protected]>
* | tests: Minor imporvement in agent invocationWerner Koch2017-11-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/openpgp/defs.scm (create-gpghome): Add s2k-count. -- My tests show only 2.5% improvement, but as we have that option now let's use it. real 9m12.604s user 2m20.720s sys 0m11.452s real 8m3.815s user 2m16.700s sys 0m11.544s Signed-off-by: Werner Koch <[email protected]>
* | agent, tests: Support --disable-scdaemon build case.NIIBE Yutaka2017-10-262-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * agent/command.c (cmd_scd): Support !BUILD_WITH_SCDAEMON. * tests/openpgp/defs.scm (create-gpghome): Likewise. * tests/gpgsm/gpgsm-defs.scm (create-gpgsmhome): Likewise. -- We could modify gpg-agent to remove all support of scdaemon, with no inclusion of call-scd.c, divert-scd.c, and learncard.c, but it would not be worth to do that. GnuPG-bug-id: 3316 Signed-off-by: NIIBE Yutaka <[email protected]>
* | tests: Fix a test which specifies expiration date.NIIBE Yutaka2017-09-081-4/+4
|/ | | | | | | | | | | | | | | | | | | | | * tests/openpgp/quick-key-manipulation.scm: Fix expiration time comparison. -- This is a bug fix for Amelia Earhart who is probably in UTC-12. When expiration date is specified, GnuPG interprets it as noon of the date in local time. Before this fix, the test compared the value by 2145916800 which is 2038-01-01 00:00:00 in UTC with allowance of 1 day. When the test was ran in UTC-12 timezone, it failed because of noon in the timezone is midnight of the next day in UTC. GnuPG-bug-id: 3393 Reported-by: Daniel Kahn Gillmor Signed-off-by: NIIBE Yutaka <[email protected]>
* tests: Do not run trust-pgp-4.scmWerner Koch2017-08-231-2/+5
| | | | | | | | | | | | | * tests/openpgp/Makefile.am (XTESTS): Remove test. (EXTRA_DIST): Add test file. -- There are two problems with this test: First a syntax error in the file name so that the test was not used at all. Second the test currently returns FAIL. Fixes-commit: c23a69970ba38edae9d3b2603825d18fbb732423 Signed-off-by: Werner Koch <[email protected]>
* tests: Add tests for the PGP trust model.Damien Goutte-Gattat2017-08-2117-2/+630
| | | | | | | | | | | | | | | | | | | | | | | | * tests/openpgp/trust-pgp-1.scm: New file. * tests/openpgp/trust-pgp-2.scm: New file. * tests/openpgp/trust-pgp-3.scm: New file. * tests/openpgp/trust-pgp-4.scm: New file. * tests/openpgp/trust-pgp/common.scm: New file. * tests/openpgp/trust-pgp/scenario1.asc: New file. * tests/openpgp/trust-pgp/scenario2.asc: New file. * tests/openpgp/trust-pgp/scenario3.asc: New file. * tests/openpgp/trust-pgp/scenario4.asc: New file. * tests/openpgp/trust-pgp/alice.sec.asc: New file. * tests/openpgp/trust-pgp/bobby.sec.asc: New file. * tests/openpgp/trust-pgp/carol.sec.asc: New file. * tests/openpgp/trust-pgp/david.sec.asc: New file. * tests/openpgp/trust-pgp/frank.sec.asc: New file. * tests/openpgp/trust-pgp/grace.sec.asc: New file. * tests/openpgp/trust-pgp/heidi.sec.asc: New file. * tests/openpgp/Makefile.am (XTESTS): Add new tests. (TEST_FILES): Add new files. (EXTRA_DIST): Add new common file. Signed-off-by: Damien Goutte-Gattat <[email protected]>
* tests: Move some functions into a common module.Damien Goutte-Gattat2017-08-212-24/+24
| | | | | | | | | | | | | | * tests/openpgp/tofu.scm (gettrust): Moved to the common defs.scm module. (checktrust): Likewise. * tests/openpgp/defs.scm (gettrust): New function. (checktrust): Likewise. -- These functions will be re-used by the tests for the PGP trust model. Signed-off-by: Damien Goutte-Gattat <[email protected]>
* gpgscm: Fix -Wimplicit-fallthrough warnings.Justus Winter2017-08-211-2/+12
| | | | | | | | * tests/gpgscm/scheme.c (CASE): Rearrange so that the case statement is at the front. (Eval_Cycle): Improve fallthrough annotations. Signed-off-by: Justus Winter <[email protected]>
* tests: Improve documentation.Justus Winter2017-08-101-3/+40
| | | | | | | * tests/openpgp/README: Add quickstart instructions, how to use shell.scm, remove no longer used MKDATA. Signed-off-by: Justus Winter <[email protected]>
* build: New configure option --enable-all-tests.Werner Koch2017-08-082-1/+9
| | | | | | | | | | | | | | | * configure.ac: New option --enable-all-tests. * tests/gpgscm/ffi.c (ffi_init): New gloabl var *run-all-tests*. * tests/openpgp/all-tests.scm (all-tests): Use that var instead of *maintainer-mode*. * Makefile.am (AM_DISTCHECK_CONFIGURE_FLAGS): Add --enable-all-tests. -- It is better to have a separate option to run all tests than to put this on top of --enable-maintainer-mode. This way we can also make sure to run all tests during "make distcheck". Signed-off-by: Werner Koch <[email protected]>
* gpgscm: Make the test summary stand outWerner Koch2017-08-081-0/+2
| | | | | | | | | | * tests/gpgscm/tests.scm (test-pool): Add delimiter lines. -- This is to make those summaries a bit more simlar to those from automake. Signed-off-by: Werner Koch <[email protected]>
* tests: Do not run all tests unless in maintainer mode.Justus Winter2017-08-072-15/+33
| | | | | | | | | | | | | * configure.ac: Leak the maintainer mode flag into 'config.h'. * tests/gpgscm/ffi.c: Pass it into the scheme environment. * tests/openpgp/all-tests.scm: Only run tests against non-default configurations (keyring, extended-key-format) in maintainer mode. -- Werner is concerned that the tests do take up too much time and asked me to reduce the runtime of the tests for normal users. Signed-off-by: Justus Winter <[email protected]>
* tests: Adjust tests for changed --auto-key-locate default.Werner Koch2017-08-041-0/+2
| | | | | | * tests/openpgp/defs.scm (create-gpghome): Disable new defaults. Signed-off-by: Werner Koch <[email protected]>
* gpgscm,w32: Fix testing for absolute paths.Justus Winter2017-07-181-2/+15
| | | | | | | * tests/gpgscm/main.c (path_absolute_p): New function. (load): Use new function. Signed-off-by: Justus Winter <[email protected]>
* tests: Improve 'shell.scm' script.Justus Winter2017-07-142-4/+25
| | | | | | | | | * tests/openpgp/defs.scm (create-file): Unlink file first. * tests/openpgp/shell.scm: Ask whether to import legacy test keys or not, and whether to drop 'batch' from the configuration. Add paths to all the programs to 'PATH'. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Library improvements.Justus Winter2017-07-142-1/+23
| | | | | | | | | * tests/gpgscm/repl.scm (prompt-yes-no?): New function. * tests/gpgscm/tests.scm (pathsep-split): Likewise. (pathsep-join): Likewise. (with-path): Use the new function. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Fail early if the test setup fails.Justus Winter2017-07-141-0/+2
| | | | | | | * tests/gpgscm/tests.scm (make-environment-cache): Check status code of setup script. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Make loading of modules less verbose.Justus Winter2017-07-131-1/+1
| | | | | | * tests/gpgscm/main.c (load): Increase logging threshold. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Make it impossible to catch '*interpreter-exit*'.Justus Winter2017-07-131-2/+2
| | | | | | | | * tests/gpgscm/init.scm (throw'): Make it impossible to catch '*interpreter-exit*'. This fixes 'exit' (and with it 'fail') inside 'catch' statements. Signed-off-by: Justus Winter <[email protected]>
* tests: Improve test.Justus Winter2017-06-261-2/+2
| | | | | | * tests/openpgp/ssh-export.scm: Split output at any whitespace. Signed-off-by: Justus Winter <[email protected]>
* tests: Add test for gpgv.Justus Winter2017-06-214-268/+359
| | | | | | | | | | * tests/openpgp/Makefile.am (XTESTS): Add the new test. * tests/openpgp/gpgv.scm: New file. * tests/openpgp/signed-messages.scm: Likewise. * tests/openpgp/verify.scm: Move the signed messages to the new file and load it. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Limit the number of parallel jobs.Justus Winter2017-06-192-15/+93
| | | | | | | | | | | | | | | | | | | | | | * ffi.c (do_wait_processes): Suppress the timeout error. * tests.scm (semaphore): New definition. (test-pool): Only run a bounded number of tests in parallel. (test::started?): New function. (run-tests-parallel): Do not report results, do not start the tests. (run-tests-sequential): Adapt. (run-tests): Parse the number of parallel jobs. -- This change limits the number of tests that are run in parallel. This way we do not overwhelm the operating systems' scheduler. As a side-effect, we also get more accurate runtime information, and it will be easy to implement timeouts on top of this. Use TESTFLAGS to limit the number of jobs: $ make check-all TESTFLAGS=--parallel=16 Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Improve option parsing.Justus Winter2017-06-191-1/+7
| | | | | | | * tests/gpgscm/tests.scm (flag): Accept arguments of the form '--foo=bar'. Signed-off-by: Justus Winter <[email protected]>