SummaryRefsLogTreeCommitDiffStats
path: root/tests
Commit message (Expand)AuthorAgeFilesLines
* job-specifier: Box 'configuration-user' global variable...* src/mcron/job-specifier.scm (configuration-user): Box it using SRFI-111 to be explicit about the mutability of this object. (job): Adapt. (set-configuration-user): Adapt and use 'get-user'. * tests/job-specifier.scm ("set-configuration-user: passwd entry") ("set-configuration-user: invalid uid", "set-configuration-user: uid") ("set-configuration-user: invalid spec") ("set-configuration-user: name"): New tests. Mathieu Lirzin2018-03-271-0/+46
* job-specifier: Check 'next-...' procedures...* tests/job-specifier.scm ("next-year", "next-month", "next-day") ("next-hour", "next-minute", "next-second"): New tests. ("next-hour-from"): Remove. Mathieu Lirzin2018-03-271-3/+36
* base: Check how child processes are handled...* tests/base.scm ("run-job: basic"): Check the number of children too. ("child-cleanup: one", "update-number-children!: set value"): New tests. Mathieu Lirzin2018-03-261-6/+23
* job-specifier: Adapt 'bump-time' to 'next-...-from' procedures...This is a follow-up to commit 913e3c65e4f56476e8ac69f4892cf92c125751ec. Since 'next-...-from' procedures now uses an '#:optional' argument instead of a dotted optional arguments list, 'bump-time' doesn't need to unwrap VALUE-LIST anymore. * src/mcron/job-specifier.scm (bump-time): Pass VALUE-LIST directly to '%find-best-next'. * tests/job-specifier.scm ("next-hour-from"): New test. * NEWS: Update. Reported-by: Ludovic Courtès <ludo@gnu.org> Mathieu Lirzin2018-03-261-0/+4
* job-specifier: Preserve '%find-best-next' arguments exactness...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> Mathieu Lirzin2018-03-261-1/+10
* utils: Check 'mcron-error'...* tests/utils.scm ("mcron-error: exit code", "mcron-error: output") ("mcron-error: output no-exit", "mcron-error: only stderr"): New tests. Mathieu Lirzin2018-03-251-1/+43
* tests: Add "tests/utils.scm"...* tests/utils.scm: New test. * Makefile.am (TESTS): Add it. Mathieu Lirzin2018-03-251-0/+51
* tests: Remove unused schedule stubs...* tests/base.scm ("number-children: init") ("update-number-children!: 1+", "update-number-children!: 1-"): Remove 'let' form defining the schedule stub. Mathieu Lirzin2018-03-241-13/+12
* environment: Check configuration environment...* 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. Mathieu Lirzin2018-03-241-1/+54
* base: Check 'run-job'...* tests/base.scm ("run-job: basic"): New test. Mathieu Lirzin2018-03-241-0/+16
* base: Box 'number-children'...* 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. Mathieu Lirzin2018-03-241-0/+32
* tests: Add "tests/base.scm"...* tests/base.scm: New test. * Makefile.am (TESTS): Add it. Mathieu Lirzin2018-03-241-0/+151
* utils: Use 'scandir' instead of custom 'for-each-file'...* 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> Mathieu Lirzin2018-03-201-13/+13
* tests: Set timezone in "schedule.sh"...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> Mathieu Lirzin2018-03-201-21/+26
* tests: Add 'schedule.sh'...* tests/schedule.sh: New test. * Makefile.am (TESTS): Add it. * src/mcron/job-specifier.scm (configuration-time): Use SOURCE_DATE_EPOCH for reproducible tests. Mathieu Lirzin2018-03-161-0/+123
* tests: Add 'basic.sh'...* 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. Mathieu Lirzin2017-09-282-0/+638
* environment: modify-environment: Add tests....* tests/environment.scm: New test. * Makefile.am (TESTS): Add it. Mathieu Lirzin2016-12-011-0/+39
* job-specifier: range: Add tests....* 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. Mathieu Lirzin2016-12-011-0/+43