env.depends() does not work with build-root-relative "^/" paths - close #121
This commit is contained in:
1 parent
d1a35501ef
commit
7c8becc3f9
3 files changed
+44
-2
No files matched your search
@@ -55,6 +55,8 @@ describe Rscons do
|
||||
end
|
||||
end
|
||||
|
||||
let(:passenv) {{}}
|
||||
|
||||
def test_dir(build_test_directory)
|
||||
Dir.chdir(@owd)
|
||||
rm_rf(@build_test_run_dir)
|
||||
@@ -147,6 +149,7 @@ EOF
|
||||
stdout, stderr, status = nil, nil, nil
|
||||
Bundler.with_unbundled_env do
|
||||
env = ENV.to_h
|
||||
env.merge!(passenv)
|
||||
path = ["#{@build_test_run_dir}/_bin", "#{env["PATH"]}"]
|
||||
if options[:path]
|
||||
path = Array(options[:path]) + path
|
||||
@@ -601,6 +604,27 @@ EOF
|
||||
expect(result.stdout).to eq ""
|
||||
end
|
||||
|
||||
it "rebuilds when user-specified dependencies using ^ change" do
|
||||
test_dir("simple")
|
||||
|
||||
passenv["file_contents"] = "1"
|
||||
result = run_rscons(rsconscript: "user_dependencies_carat.rb")
|
||||
expect(result.stderr).to eq ""
|
||||
verify_lines(lines(result.stdout), [
|
||||
%r{Compiling simple.c},
|
||||
%r{Linking .*simple.exe},
|
||||
])
|
||||
|
||||
passenv["file_contents"] = "2"
|
||||
result = run_rscons(rsconscript: "user_dependencies_carat.rb")
|
||||
expect(result.stderr).to eq ""
|
||||
verify_lines(lines(result.stdout), [%r{Linking .*simple.exe}])
|
||||
|
||||
result = run_rscons(rsconscript: "user_dependencies_carat.rb")
|
||||
expect(result.stderr).to eq ""
|
||||
expect(result.stdout).to eq ""
|
||||
end
|
||||
|
||||
unless RUBY_PLATFORM =~ /mingw|msys/
|
||||
it "supports building D sources with gdc" do
|
||||
test_dir("d")
|
||||
|
||||
Reference in new issue
Block a user