Skip to content

Commit

Permalink
Merge pull request #14206 from JuliaLang/tk/gitpath
Browse files Browse the repository at this point in the history
Take Git/usr/bin off the path on Windows
  • Loading branch information
tkelman committed Dec 4, 2015
2 parents 9038ec9 + b613309 commit 024dedc
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 28 deletions.
43 changes: 22 additions & 21 deletions contrib/add_license_to_files.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,28 +30,29 @@ const excludedirs = [

const skipfiles = [
"../contrib/add_license_to_files.jl",
"../contrib/windows/juliarc.jl",
# files to check - already copyright
# see: https://github.com/JuliaLang/julia/pull/11073#issuecomment-98099389
"../base/special/trig.jl",
"../base/sparse/csparse.jl",
"../base/linalg/givens.jl",
#
"../src/abi_llvm.cpp",
"../src/abi_win32.cpp",
"../src/abi_win64.cpp",
"../src/abi_x86.cpp",
"../src/abi_x86_64.cpp",
"../src/disasm.cpp",
"../src/support/END.h",
"../src/support/ENTRY.amd64.h",
"../src/support/ENTRY.i387.h",
"../src/support/MurmurHash3.c",
"../src/support/MurmurHash3.h",
"../src/support/asprintf.c",
"../src/support/strptime.c",
"../src/support/strtod.c",
"../src/support/tzfile.h",
"../src/support/utf8.c",
# see: https://github.com/JuliaLang/julia/pull/11073#issuecomment-98099389
"../base/special/trig.jl",
"../base/sparse/csparse.jl",
"../base/linalg/givens.jl",
#
"../src/abi_llvm.cpp",
"../src/abi_win32.cpp",
"../src/abi_win64.cpp",
"../src/abi_x86.cpp",
"../src/abi_x86_64.cpp",
"../src/disasm.cpp",
"../src/support/END.h",
"../src/support/ENTRY.amd64.h",
"../src/support/ENTRY.i387.h",
"../src/support/MurmurHash3.c",
"../src/support/MurmurHash3.h",
"../src/support/asprintf.c",
"../src/support/strptime.c",
"../src/support/strtod.c",
"../src/support/tzfile.h",
"../src/support/utf8.c",
]

const ext_prefix = Dict([
Expand Down
2 changes: 2 additions & 0 deletions contrib/prepare_release.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/sh
# This file is a part of Julia. License is MIT: http://julialang.org/license

# script to prepare binaries and source tarballs for a Julia release
# aka "bucket dance" julianightlies -> julialang
set -e # stop on failure
Expand Down
6 changes: 3 additions & 3 deletions contrib/windows/juliarc.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file is a part of Julia. License is MIT: http://julialang.org/license
# This file should contain site-specific commands to be executed on Julia startup
# Users should store their own personal commands in homedir(), in a file named .juliarc.jl

ENV["PATH"] = JULIA_HOME*";"*joinpath(JULIA_HOME,"..","Git","bin")*";"*
joinpath(JULIA_HOME,"..","Git","usr","bin")*";"*ENV["PATH"]
ENV["PATH"] = JULIA_HOME*";"*joinpath(JULIA_HOME,"..","Git","bin")*";"*ENV["PATH"]
11 changes: 7 additions & 4 deletions test/cmdlineargs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,13 @@ let exename = `$(joinpath(JULIA_HOME, Base.julia_exename())) --precompiled=yes`
@test readchomp(`$exename -e 'println(ARGS);' ''`) == "UTF8String[\"\"]"

# issue #12679
@test readchomp(pipeline(ignorestatus(`$exename -f --compile=yes -foo`),stderr=`cat`)) == "ERROR: unknown option `-o`"
@test readchomp(pipeline(ignorestatus(`$exename -f -p`),stderr=`cat`)) == "ERROR: option `-p/--procs` is missing an argument"
@test readchomp(pipeline(ignorestatus(`$exename -f --inline`),stderr=`cat`)) == "ERROR: option `--inline` is missing an argument"
@test readchomp(pipeline(ignorestatus(`$exename -f -e "@show ARGS" -now -- julia RUN.jl`),stderr=`cat`)) == "ERROR: unknown option `-n`"
extrapath = @windows? joinpath(JULIA_HOME,"..","Git","usr","bin")*";" : ""
withenv("PATH" => extrapath * ENV["PATH"]) do
@test readchomp(pipeline(ignorestatus(`$exename -f --compile=yes -foo`),stderr=`cat`)) == "ERROR: unknown option `-o`"
@test readchomp(pipeline(ignorestatus(`$exename -f -p`),stderr=`cat`)) == "ERROR: option `-p/--procs` is missing an argument"
@test readchomp(pipeline(ignorestatus(`$exename -f --inline`),stderr=`cat`)) == "ERROR: option `--inline` is missing an argument"
@test readchomp(pipeline(ignorestatus(`$exename -f -e "@show ARGS" -now -- julia RUN.jl`),stderr=`cat`)) == "ERROR: unknown option `-n`"
end

# --compilecache={yes|no}
@test readchomp(`$exename -E "Bool(Base.JLOptions().use_compilecache)"`) == "true"
Expand Down
4 changes: 4 additions & 0 deletions test/spawn.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#TODO:
# - Windows:
# - Add a test whether coreutils are available and skip tests if not
@windows_only oldpath = ENV["PATH"]
@windows_only ENV["PATH"] = joinpath(JULIA_HOME,"..","Git","usr","bin")*";"*oldpath

valgrind_off = ccall(:jl_running_on_valgrind,Cint,()) == 0

Expand Down Expand Up @@ -340,3 +342,5 @@ end

# make sure Cmd is nestable
@test string(Cmd(Cmd(`ls`, detach=true))) == "`ls`"

@windows_only ENV["PATH"] = oldpath
3 changes: 3 additions & 0 deletions test/strings/io.jl
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ end
@test "\x0f" == unescape_string("\\x0f")
@test "\x0F" == unescape_string("\\x0F")

extrapath = @windows? joinpath(JULIA_HOME,"..","Git","usr","bin")*";" : ""
withenv("PATH" => extrapath * ENV["PATH"]) do
if !success(`iconv --version`)
warn("iconv not found, skipping unicode tests!")
@windows_only warn("Use WinRPM.install(\"win_iconv\") to run these tests")
Expand Down Expand Up @@ -203,6 +205,7 @@ else
end
rm(unicodedir)
end
end

# Tests of join()
@test join([]) == ""
Expand Down

0 comments on commit 024dedc

Please sign in to comment.