diff options
author | Emilio Jesus Gallego Arias <e+git@x80.org> | 2018-06-28 17:57:52 +0200 |
---|---|---|
committer | Emilio Jesus Gallego Arias <e+git@x80.org> | 2018-06-28 17:57:52 +0200 |
commit | d46dd57462650d1e956d8e80d5aa4e537205de4d (patch) | |
tree | 4d8412bfd0b026ae1764afc3b19d9171075ef131 | |
parent | 1fab152558a941c500067599d6b2043e1176a446 (diff) | |
parent | de90280aa0895d5b302a3137a3fa1a171a9f127c (diff) |
Merge PR #7860: Fix #7704: Launching coqide through PATH fails.
-rw-r--r-- | lib/system.ml | 2 | ||||
-rw-r--r-- | test-suite/Makefile | 1 | ||||
-rwxr-xr-x | test-suite/misc/7704.sh | 7 | ||||
-rw-r--r-- | test-suite/misc/aux7704.v | 6 |
4 files changed, 15 insertions, 1 deletions
diff --git a/lib/system.ml b/lib/system.ml index f109c7192..eef65a4e3 100644 --- a/lib/system.ml +++ b/lib/system.ml @@ -302,7 +302,7 @@ let with_time ~batch f x = raise e let get_toplevel_path top = - let dir = Filename.dirname Sys.argv.(0) in + let dir = Filename.dirname Sys.executable_name in let exe = if Sys.(os_type = "Win32" || os_type = "Cygwin") then ".exe" else "" in let eff = if Dynlink.is_native then ".opt" else ".byte" in dir ^ Filename.dir_sep ^ top ^ eff ^ exe diff --git a/test-suite/Makefile b/test-suite/Makefile index 32e245e36..33b402327 100644 --- a/test-suite/Makefile +++ b/test-suite/Makefile @@ -519,6 +519,7 @@ $(patsubst %.sh,%.log,$(wildcard misc/*.sh)): %.log: %.sh $(PREREQUISITELOG) @echo "TEST $<" $(HIDE){ \ echo $(call log_intro,$<); \ + export BIN="$(BIN)"; \ export coqc="$(coqc)"; \ export coqtop="$(coqtop)"; \ export coqdep="$(coqdep)"; \ diff --git a/test-suite/misc/7704.sh b/test-suite/misc/7704.sh new file mode 100755 index 000000000..0ca2c97d2 --- /dev/null +++ b/test-suite/misc/7704.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +set -e + +export PATH=$BIN:$PATH + +${coqtop#"$BIN"} -compile misc/aux7704.v diff --git a/test-suite/misc/aux7704.v b/test-suite/misc/aux7704.v new file mode 100644 index 000000000..6fdcf6768 --- /dev/null +++ b/test-suite/misc/aux7704.v @@ -0,0 +1,6 @@ + +Goal True /\ True. +Proof. + split. + par:exact I. +Qed. |