AboutSummaryRefsLogTreeCommitDiffStats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* job-specifier: Preserve '%find-best-next' arguments exactnessMathieu Lirzin2018-03-261-1/+10
| | | | | | | | | | | | The behavior of the 'min' procedure which converts its parameters to inexact numbers when at least one of them is inexact was causing '%find-best-next' to always return real numbers. * src/mcron/job-specifier.scm (%find-best-next): Preserve the exactness of numbers in NEXT-LIST. * tests/job-specifier.scm ("%find-best-next: exact"): New test. Reported-by: Ludovic Courtès <ludo@gnu.org>
* utils: Check 'mcron-error'Mathieu Lirzin2018-03-251-1/+43
| | | | | * tests/utils.scm ("mcron-error: exit code", "mcron-error: output") ("mcron-error: output no-exit", "mcron-error: only stderr"): New tests.
* tests: Add "tests/utils.scm"Mathieu Lirzin2018-03-251-0/+51
| | | | | * tests/utils.scm: New test. * Makefile.am (TESTS): Add it.
* tests: Remove unused schedule stubsMathieu Lirzin2018-03-241-13/+12
| | | | | | * tests/base.scm ("number-children: init") ("update-number-children!: 1+", "update-number-children!: 1-"): Remove 'let' form defining the schedule stub.
* environment: Check configuration environmentMathieu Lirzin2018-03-241-1/+54
| | | | | | | * tests/environment.scm ("current-environment-mods-copy: empty") ("current-environment-mods: init", "append-environment-mods: basic") ("append-environment-mods: twice", "clear-environment-mods: effect") ("current-environment-mods-copy: basic"): New tests.
* base: Check 'run-job'Mathieu Lirzin2018-03-241-0/+16
| | | | * tests/base.scm ("run-job: basic"): New test.
* base: Box 'number-children'Mathieu Lirzin2018-03-241-0/+32
| | | | | | | | | * src/mcron/base.scm (number-children): Box it using SRFI-111 to be explicit about the mutability of this object. (update-number-children!): New procedure. (run-job, child-cleanup): Use it. * tests/base.scm ("update-number-children!: 1+") ("number-children: init", "update-number-children!: 1-"): New tests.
* tests: Add "tests/base.scm"Mathieu Lirzin2018-03-241-0/+151
| | | | | * tests/base.scm: New test. * Makefile.am (TESTS): Add it.
* utils: Use 'scandir' instead of custom 'for-each-file'Mathieu Lirzin2018-03-201-13/+13
| | | | | | | | | | | | * src/mcron/utils.scm (for-each-file): Delete. * src/mcron/scripts/cron.scm (process-files-in-system-directory): Use 'scandir' which has the benefit of being deterministic. * src/mcron/scripts/mcron.scm (process-files-in-user-directory): Likewise. * tests/schedule.sh: Update expected output which is now more reliable. * NEWS: Update. Suggested-by: Ludovic Courtès <ludo@gnu.org>
* tests: Set timezone in "schedule.sh"Mathieu Lirzin2018-03-201-21/+26
| | | | | | | | | | Previously the test environment was implicitly expecting the current timezone to be UTC+1. * tests/schedule.sh: Set TZ environment variable to 'UTC0'. Update expected result. Reported-by: Ludovic Courtès <ludo@gnu.org>
* tests: Add 'schedule.sh'Mathieu Lirzin2018-03-161-0/+123
| | | | | | | * tests/schedule.sh: New test. * Makefile.am (TESTS): Add it. * src/mcron/job-specifier.scm (configuration-time): Use SOURCE_DATE_EPOCH for reproducible tests.
* tests: Add 'basic.sh'Mathieu Lirzin2017-09-282-0/+638
| | | | | | | | | | * tests/init.sh: New test framework from Gnulib. * tests/basic.sh: New test. * Makefile.am (TESTS): Add it. (TEST_EXTENSIONS): Add '.sh'. (SH_LOG_COMPILER): Use 'pre-inst-env'. (EXTRA_DIST): Add 'tests/init.sh'. * build-aux/pre-inst-env.in: export $srcdir for shell tests.
* environment: modify-environment: Add tests.Mathieu Lirzin2016-12-011-0/+39
| | | | | * tests/environment.scm: New test. * Makefile.am (TESTS): Add it.
* job-specifier: range: Add tests.Mathieu Lirzin2016-12-011-0/+43
* build-aux/test-driver.scm: New script. * configure.ac (AC_REQUIRE_AUX_FILE): Add it. * tests/job-specifier.scm: New test. * Makefile.am (TEST_EXTENSIONS, AM_TESTS_ENVIRONMENT, SCM_LOG_DRIVER) (TESTS): New variables. (EXTRA_DIST): Update. * .gitignore: Likewise.