Skip to content

Commit 10bdda8

Browse files
committedMay 9, 2012
JasonLeyba: Fix the dependencies on javascript/deps.js so it is regenerated when expected.
Also add a dependency on //javascript:calcdeps to //java/client/test/org/openqa/selenium/environment/webserver. This will ensure the deps file is regenerated when it's needed: 1. When manually running JS tests with the debug-server 2. When running any js_test (which depends on the webserver). Fixes issue 3744. r16837
1 parent b001a81 commit 10bdda8

File tree

4 files changed

+16
-6
lines changed

4 files changed

+16
-6
lines changed
 

‎Rakefile

+10-5
Original file line numberDiff line numberDiff line change
@@ -507,10 +507,10 @@ file "cpp/IEDriver/sizzle.h" => [ "//third_party/js/sizzle:sizzle:header" ] do
507507
end
508508
task :sizzle_header => [ "cpp/IEDriver/sizzle.h" ]
509509

510-
file "javascript/deps.js" => FileList[
510+
file "build/javascript/deps.js" => FileList[
511511
"third_party/closure/goog/**/*.js",
512-
"javascript/*-atom*/*.js",
513-
"javascript/chrome-driver/*.js" ] do
512+
"javascript/*/**/*.js", # Don't depend on js files directly in javascript/
513+
] do
514514
our_cmd = "java -jar third_party/py/jython.jar third_party/closure/bin/calcdeps.py "
515515
our_cmd << "--output_mode=deps --path=javascript "
516516
our_cmd << "--dep=third_party/closure/goog"
@@ -525,11 +525,16 @@ file "javascript/deps.js" => FileList[
525525
line = line.gsub("\\\\", "/")
526526
output << line.gsub(/common\/(.*)\/js/, 'js/\1')
527527
end
528-
File.open("javascript/deps.js", "w") do |f| f.write(output); end
528+
529+
built_deps = "build/javascript/deps.js"
530+
puts "Writing #{built_deps}"
531+
mkdir_p File.dirname(built_deps)
532+
File.open(built_deps, "w") do |f| f.write(output); end
533+
cp built_deps, "javascript/deps.js"
529534
end
530535

531536
desc "Calculate dependencies required for testing the automation atoms"
532-
task :calcdeps => "javascript/deps.js"
537+
task :calcdeps => "build/javascript/deps.js"
533538

534539
task :test_webdriverjs => [
535540
"//javascript/webdriver:test:run",

‎java/client/test/org/openqa/selenium/environment/webserver/build.desc

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ java_library(
1515
],
1616
main = "org.openqa.selenium.environment.webserver.WebbitAppServer",
1717
deps = [
18+
"//javascript:calcdeps",
1819
"//java/client/test/org/openqa/selenium/testing:util",
1920
"//third_party/java/commons-fileupload",
2021
"//third_party/java/webbit",

‎javascript/build.desc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
rake_task(name = "calcdeps",
2+
task_name = "calcdeps",
3+
out = "javascript/deps.js")

‎javascript/deps.js

+2-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
Please sign in to comment.