Skip to content

Commit 8450e0a

Browse files
gregmagolanvicb
authored andcommitted
build(bazel): fix broken travis CI (angular#24788)
PR Close angular#24788
1 parent e38b2b5 commit 8450e0a

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

modules/benchmarks/src/largetable/render3/index.html

+7-1
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,14 @@ <h2>Render3 Largetable Benchmark</h2>
2828
<script>
2929
// TODO(mlaval): remove once we have a proper solution
3030
ngDevMode = false;
31+
var isBazel = location.pathname.indexOf('/all/') !== 0;
32+
// isBazel needed while 'scripts/ci/test-e2e.sh test.e2e.protractor-e2e' is run
33+
// on Travis
34+
// TODO: port remaining protractor e2e tests to bazel protractor_web_test_suite rule
3135
var bazelBundle = document.location.search.endsWith('debug') ? 'bundle.min_debug.js' : 'bundle.min.js';
32-
document.write('<script src="' + bazelBundle + '">\u003c/script>');
36+
var mainUrl = window.location.search.split(/[?&]main=([^&]+)/)[1]
37+
|| '../../bootstrap_ng2.js';
38+
document.write('<script src="' + (isBazel ? bazelBundle : mainUrl) + '">\u003c/script>');
3339
</script>
3440
</body>
3541

modules/benchmarks/src/largetable/render3/index.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,10 @@ export function main() {
2727
}
2828
}
2929

30-
main();
30+
const isBazel = location.pathname.indexOf('/all/') !== 0;
31+
// isBazel needed while 'scripts/ci/test-e2e.sh test.e2e.protractor-e2e' is run
32+
// on Travis
33+
// TODO: port remaining protractor e2e tests to bazel protractor_web_test_suite rule
34+
if (isBazel) {
35+
main();
36+
}

protractor-perf.conf.js

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99
// Determine if we run under bazel
1010
const isBazel = !!process.env.RUNFILES;
11+
// isBazel needed while 'scripts/ci/test-e2e.sh test.e2e.protractor-e2e' is run
12+
// on Travis
13+
// TODO: port remaining protractor e2e tests to bazel protractor_web_test_suite rule
1114

1215
// Make sure that the command line is read as the first thing
1316
// as this could exit node if the help script should be printed.

0 commit comments

Comments
 (0)