diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index da9b5b7..6578ce1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -68,7 +68,7 @@ jobs: ELDEV_LOCAL: "." - name: Test integration - run: ./bin/eldev -p -dtTC test --test-type integration --omit-backtraces --expect 30 + run: ./bin/eldev -p -dtTC test-integration --omit-backtraces --expect 30 env: ELDEV_LOCAL: "." diff --git a/Eldev b/Eldev index fba1633..f7b7dc2 100644 --- a/Eldev +++ b/Eldev @@ -29,6 +29,25 @@ (signal 'eldev-wrong-option-usage `("unknown test type `%s'" ,type))) (setf eldev-test-type (intern type))) +(eldev-defcommand eldev-test-all (&rest parameters) + "Same as `test --test-type=all'." + :custom-parsing t + :category testing + (let ((parsed (eldev-parse-command-line parameters :command 'test-all))) + (eldev-test-selection "all") + (apply #'eldev-test (plist-get parsed :without-options)))) + +(eldev-defcommand eldev-test-integration (&rest parameters) + "Same as `test --test-type=integration'." + :custom-parsing t + :category testing + (let ((parsed (eldev-parse-command-line parameters :command 'test-integration))) + (eldev-test-selection "integration") + (apply #'eldev-test (plist-get parsed :without-options)))) + +(eldev-inherit-options 'test-all 'test (lambda (_option handler) (not (eq handler #'eldev-test-selection)))) +(eldev-inherit-options 'test-integration 'test-all) + (add-hook 'eldev-test-hook (lambda () (eldev-verbose "Using Eldev tests of type `%s'" eldev-test-type) diff --git a/test/project-g/Eldev b/test/project-g/Eldev index c23e45c..48e68e4 100644 --- a/test/project-g/Eldev +++ b/test/project-g/Eldev @@ -8,8 +8,7 @@ :command test-integration :custom-parsing t :category testing - (let* ((parsed (eldev-parse-command-line parameters :command 'test-integration)) - (command-line (plist-get parsed :all-options))) + (let ((parsed (eldev-parse-command-line parameters :command 'test-integration))) (when (plist-get parsed :without-options) (signal 'eldev-wrong-command-usage `(t "Too many command parameters"))) (eldev-test "test-g-integration.el")))