diff options
| author | Lars Ingebrigtsen | 2022-01-21 12:32:10 +0100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2022-01-21 12:32:10 +0100 |
| commit | 4d866fc0f561b023cbc15ee52891cddfa1a354ef (patch) | |
| tree | ecc81ffd5f0e7d441ba820ddf39e82537685cf25 | |
| parent | 5561d5de56db90b6d9ca637f2beb2f837f224009 (diff) | |
| download | emacs-4d866fc0f561b023cbc15ee52891cddfa1a354ef.tar.gz emacs-4d866fc0f561b023cbc15ee52891cddfa1a354ef.zip | |
Interpret a "" value of EMACS_TEST_VERBOSE as "off"
* doc/misc/ert.texi (Running Tests in Batch Mode): Adjust doc.
* lisp/emacs-lisp/ert.el (ert-run-tests-batch): Allow overriding
the EMACS_TEST_VERBOSE variable by setting it to "" (bug#53313).
| -rw-r--r-- | doc/misc/ert.texi | 5 | ||||
| -rw-r--r-- | lisp/emacs-lisp/ert.el | 6 | ||||
| -rw-r--r-- | test/README | 4 |
3 files changed, 9 insertions, 6 deletions
diff --git a/doc/misc/ert.texi b/doc/misc/ert.texi index 0d01efb0355..91288db45a2 100644 --- a/doc/misc/ert.texi +++ b/doc/misc/ert.texi | |||
| @@ -444,8 +444,9 @@ emacs -batch -l ert -l my-tests.el \ | |||
| 444 | @vindex EMACS_TEST_VERBOSE@r{, environment variable} | 444 | @vindex EMACS_TEST_VERBOSE@r{, environment variable} |
| 445 | By default, ERT test failure summaries are quite brief in batch | 445 | By default, ERT test failure summaries are quite brief in batch |
| 446 | mode---only the names of the failed tests are listed. If the | 446 | mode---only the names of the failed tests are listed. If the |
| 447 | @env{EMACS_TEST_VERBOSE} environment variable is set, the failure | 447 | @env{EMACS_TEST_VERBOSE} environment variable is set and is non-empty, |
| 448 | summaries will also include the data from the failing test. | 448 | the failure summaries will also include the data from the failing |
| 449 | test. | ||
| 449 | 450 | ||
| 450 | @vindex EMACS_TEST_JUNIT_REPORT@r{, environment variable} | 451 | @vindex EMACS_TEST_JUNIT_REPORT@r{, environment variable} |
| 451 | ERT can produce JUnit test reports in batch mode. If the environment | 452 | ERT can produce JUnit test reports in batch mode. If the environment |
diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index 9c6b0e15bbe..b6c5b7d6b91 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el | |||
| @@ -1423,7 +1423,8 @@ Returns the stats object." | |||
| 1423 | (message "%9s %S%s" | 1423 | (message "%9s %S%s" |
| 1424 | (ert-string-for-test-result result nil) | 1424 | (ert-string-for-test-result result nil) |
| 1425 | (ert-test-name test) | 1425 | (ert-test-name test) |
| 1426 | (if (getenv "EMACS_TEST_VERBOSE") | 1426 | (if (cl-plusp |
| 1427 | (length (getenv "EMACS_TEST_VERBOSE"))) | ||
| 1427 | (ert-reason-for-test-result result) | 1428 | (ert-reason-for-test-result result) |
| 1428 | "")))) | 1429 | "")))) |
| 1429 | (message "%s" "")) | 1430 | (message "%s" "")) |
| @@ -1435,7 +1436,8 @@ Returns the stats object." | |||
| 1435 | (message "%9s %S%s" | 1436 | (message "%9s %S%s" |
| 1436 | (ert-string-for-test-result result nil) | 1437 | (ert-string-for-test-result result nil) |
| 1437 | (ert-test-name test) | 1438 | (ert-test-name test) |
| 1438 | (if (getenv "EMACS_TEST_VERBOSE") | 1439 | (if (cl-plusp |
| 1440 | (length (getenv "EMACS_TEST_VERBOSE"))) | ||
| 1439 | (ert-reason-for-test-result result) | 1441 | (ert-reason-for-test-result result) |
| 1440 | "")))) | 1442 | "")))) |
| 1441 | (message "%s" "")) | 1443 | (message "%s" "")) |
diff --git a/test/README b/test/README index e44c4a43eeb..2ab34ba20ee 100644 --- a/test/README +++ b/test/README | |||
| @@ -111,8 +111,8 @@ debugging. To do that, use | |||
| 111 | 111 | ||
| 112 | By default, ERT test failure summaries are quite brief in batch | 112 | By default, ERT test failure summaries are quite brief in batch |
| 113 | mode--only the names of the failed tests are listed. If the | 113 | mode--only the names of the failed tests are listed. If the |
| 114 | $EMACS_TEST_VERBOSE environment variable is set, the failure summaries | 114 | $EMACS_TEST_VERBOSE environment variable is set and non-empty, the |
| 115 | will also include the data from the failing test. | 115 | failure summaries will also include the data from the failing test. |
| 116 | 116 | ||
| 117 | If the $EMACS_TEST_JUNIT_REPORT environment variable is set to a file | 117 | If the $EMACS_TEST_JUNIT_REPORT environment variable is set to a file |
| 118 | name, a JUnit test report is generated under this name. | 118 | name, a JUnit test report is generated under this name. |