all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#27746: 26.0.50; Need a better test of whether running on Hydra than $NIX_STORE
@ 2017-07-18  2:03 Gemini Lasswell
  2017-07-18  7:04 ` Michael Albinus
  0 siblings, 1 reply; 3+ messages in thread
From: Gemini Lasswell @ 2017-07-18  2:03 UTC (permalink / raw)
  To: 27746; +Cc: michael.albinus

There are places in the test code in Emacs which use the existence of
the NIX_STORE environment variable to change test behavior when
running on Hydra. However, Emacs should have a different and more
specific test for whether it is running on Hydra, so that those
behavior changes don't happen on other machines running NixOS or the
Nix package manager.

I noticed this because of Michael Albinus's recent addition of some
NIX_STORE checks to test/Makefile.in and tramp-tests.el in an attempt
to track down test failures on Hydra. Those changes cause
tramp-tests.el to run much slower on my machine and spam its logfile
to standard output.

In addition, checks of NIX_STORE cause a few eieio tests to be skipped
and ERT to print more detailed test summaries. Then there's this bit
of code, found in both tramp-tests.el and filenotify-tests.el:

;; This shall happen on hydra only.
(when (getenv "NIX_STORE")
  (add-to-list 'tramp-remote-path 'tramp-own-remote-path))

which looks a bit backwards to me because changing tramp-remote-path
is necessary on my Mac to make Tramp able to talk to a NixOS (or Guix)
machine. But it's not necessary to change tramp-remote-path to make
Tramp on the NixOS machine remotely connect to the Mac. Presumably
Hydra is always talking to another NixOS machine here, and the use of
NIX_STORE should be replaced by something more specific to Hydra. But
it would be more generally correct to look at the value of NIX_STORE
on the machine that REMOTE_TEMPORARY_FILE_DIRECTORY points to.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#27746: 26.0.50; Need a better test of whether running on Hydra than $NIX_STORE
  2017-07-18  2:03 bug#27746: 26.0.50; Need a better test of whether running on Hydra than $NIX_STORE Gemini Lasswell
@ 2017-07-18  7:04 ` Michael Albinus
  2017-07-18 16:56   ` Glenn Morris
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Albinus @ 2017-07-18  7:04 UTC (permalink / raw)
  To: Gemini Lasswell; +Cc: 27746

Gemini Lasswell <gazally@runbox.com> writes:

Hi Gemini,

> There are places in the test code in Emacs which use the existence of
> the NIX_STORE environment variable to change test behavior when
> running on Hydra. However, Emacs should have a different and more
> specific test for whether it is running on Hydra, so that those
> behavior changes don't happen on other machines running NixOS or the
> Nix package manager.

I agree. Checking the existence of $NIX_STORE is just a heuristic. A
better approach might be setting an environment variable or so in the
Emacs recipe for hydra.

Glenn?

> But it would be more generally correct to look at the value of
> NIX_STORE on the machine that REMOTE_TEMPORARY_FILE_DIRECTORY points
> to.

The tests running on hydra use always the mockup file name

(format "/mock::%s" temporary-file-directory)

This is on the local host; a proper test for hydra would be sufficient.

Best regards, Michael.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#27746: 26.0.50; Need a better test of whether running on Hydra than $NIX_STORE
  2017-07-18  7:04 ` Michael Albinus
@ 2017-07-18 16:56   ` Glenn Morris
  0 siblings, 0 replies; 3+ messages in thread
From: Glenn Morris @ 2017-07-18 16:56 UTC (permalink / raw)
  To: Michael Albinus; +Cc: Gemini Lasswell, 27746

Michael Albinus wrote:

> I agree. Checking the existence of $NIX_STORE is just a heuristic. A
> better approach might be setting an environment variable or so in the
> Emacs recipe for hydra.

Oh right, it is that easy.
Done in 5ab9102.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-07-18 16:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-18  2:03 bug#27746: 26.0.50; Need a better test of whether running on Hydra than $NIX_STORE Gemini Lasswell
2017-07-18  7:04 ` Michael Albinus
2017-07-18 16:56   ` Glenn Morris

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.