(defun vc-test--arch-enabled ()
(executable-find vc-arch-program))
-;; There are too many failed test cases yet. We suppress them on hydra.
-(if (getenv "NIX_STORE")
- (ert-deftest vc-test ()
- "Dummy test case for hydra."
- (ert-pass))
-
- ;; Create the test cases.
- (dolist (backend vc-handled-backends)
- (let ((backend-string (downcase (symbol-name backend))))
- (require (intern (format "vc-%s" backend-string)))
- (eval
- ;; Check, whether the backend is supported.
- `(when (funcall ',(intern (format "vc-test--%s-enabled" backend-string)))
-
- (ert-deftest
- ,(intern (format "vc-test-%s00-create-repo" backend-string)) ()
- ,(format "Check `vc-create-repo' for the %s backend."
- backend-string)
- (vc-test--create-repo ',backend))
-
- (ert-deftest
- ,(intern (format "vc-test-%s01-register" backend-string)) ()
- ,(format
- "Check `vc-register' and `vc-registered' for the %s backend."
- backend-string)
- (skip-unless
- (ert-test-passed-p
- (ert-test-most-recent-result
- (ert-get-test
- ',(intern
- (format "vc-test-%s00-create-repo" backend-string))))))
- (vc-test--register ',backend))
-
- (ert-deftest
- ,(intern (format "vc-test-%s02-state" backend-string)) ()
- ,(format "Check `vc-state' for the %s backend." backend-string)
- (skip-unless
- (ert-test-passed-p
- (ert-test-most-recent-result
- (ert-get-test
- ',(intern
- (format "vc-test-%s01-register" backend-string))))))
- (vc-test--state ',backend))
-
- (ert-deftest
- ,(intern (format "vc-test-%s03-working-revision" backend-string)) ()
- ,(format "Check `vc-working-revision' for the %s backend."
- backend-string)
- (skip-unless
- (ert-test-passed-p
- (ert-test-most-recent-result
- (ert-get-test
- ',(intern
- (format "vc-test-%s01-register" backend-string))))))
- (vc-test--working-revision ',backend))
-
- (ert-deftest
- ,(intern (format "vc-test-%s04-checkout-model" backend-string)) ()
- ,(format "Check `vc-checkout-model' for the %s backend."
- backend-string)
- ;; FIXME make this pass.
- :expected-result ,(if (equal backend 'RCS) :failed :passed)
- (skip-unless
- (ert-test-passed-p
- (ert-test-most-recent-result
- (ert-get-test
- ',(intern
- (format "vc-test-%s01-register" backend-string))))))
- (vc-test--checkout-model ',backend)))))))
+;; Create the test cases.
+(dolist (backend vc-handled-backends)
+ (let ((backend-string (downcase (symbol-name backend))))
+ (require (intern (format "vc-%s" backend-string)))
+ (eval
+ ;; Check, whether the backend is supported.
+ `(when (funcall ',(intern (format "vc-test--%s-enabled" backend-string)))
+
+ (ert-deftest
+ ,(intern (format "vc-test-%s00-create-repo" backend-string)) ()
+ ,(format "Check `vc-create-repo' for the %s backend."
+ backend-string)
+ (vc-test--create-repo ',backend))
+
+ (ert-deftest
+ ,(intern (format "vc-test-%s01-register" backend-string)) ()
+ ,(format
+ "Check `vc-register' and `vc-registered' for the %s backend."
+ backend-string)
+ (skip-unless
+ (ert-test-passed-p
+ (ert-test-most-recent-result
+ (ert-get-test
+ ',(intern
+ (format "vc-test-%s00-create-repo" backend-string))))))
+ (vc-test--register ',backend))
+
+ (ert-deftest
+ ,(intern (format "vc-test-%s02-state" backend-string)) ()
+ ,(format "Check `vc-state' for the %s backend." backend-string)
+ (skip-unless
+ (ert-test-passed-p
+ (ert-test-most-recent-result
+ (ert-get-test
+ ',(intern
+ (format "vc-test-%s01-register" backend-string))))))
+ (vc-test--state ',backend))
+
+ (ert-deftest
+ ,(intern (format "vc-test-%s03-working-revision" backend-string)) ()
+ ,(format "Check `vc-working-revision' for the %s backend."
+ backend-string)
+ (skip-unless
+ (ert-test-passed-p
+ (ert-test-most-recent-result
+ (ert-get-test
+ ',(intern
+ (format "vc-test-%s01-register" backend-string))))))
+ (vc-test--working-revision ',backend))
+
+ (ert-deftest
+ ,(intern (format "vc-test-%s04-checkout-model" backend-string)) ()
+ ,(format "Check `vc-checkout-model' for the %s backend."
+ backend-string)
+ ;; FIXME make this pass.
+ :expected-result ,(if (equal backend 'RCS) :failed :passed)
+ (skip-unless
+ (ert-test-passed-p
+ (ert-test-most-recent-result
+ (ert-get-test
+ ',(intern
+ (format "vc-test-%s01-register" backend-string))))))
+ (vc-test--checkout-model ',backend))))))
(provide 'vc-tests)
;;; vc-tests.el ends here