-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use firefox and xvfb to test webgl and examples. #651
Changes from 7 commits
947be0d
7490da1
8362734
61e974e
d4c44ad
02b4bc5
4552ae8
fd466bc
f6d4b52
9c9faa0
c8ca016
6eafd2f
0b51e03
31d404b
2dce1f4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,6 +43,7 @@ | |
"gl-vec4": "^1.0.1", | ||
"glob": "^7.0.3", | ||
"imports-loader": "^0.6.5", | ||
"istanbul-combine": "^0.3.0", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @manthey is this the package that combines the xmls from different runs? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, which is needed to have the xml file in the format we send to cdash. We send multiple lcov files to Codecov, which works without this, but cdash expects a single Cobertura file. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. awesome! thanks. |
||
"istanbul-instrumenter-loader": "^0.2.0", | ||
"jade": "^1.11.0", | ||
"jade-loader": "^0.8.0", | ||
|
@@ -52,6 +53,7 @@ | |
"json-loader": "^0.5.4", | ||
"karma": "^0.13.22", | ||
"karma-coverage": "^1.0.0", | ||
"karma-firefox-launcher": "^1.0.0", | ||
"karma-jasmine": "^1.0.2", | ||
"karma-jasmine-html-reporter": "^0.2.0", | ||
"karma-phantomjs-launcher": "^1.0.0", | ||
|
@@ -60,6 +62,7 @@ | |
"karma-webpack": "^1.7.0", | ||
"mousetrap": "^1.6.0", | ||
"node-fs-extra": "^0.8.1", | ||
"node-resemble": "^1.1.3", | ||
"phantomjs-prebuilt": "^2.1.5", | ||
"proj4": "^2.3.14", | ||
"raw-body": "^2.1.6", | ||
|
@@ -75,10 +78,13 @@ | |
"build": "webpack --config webpack.config.js && webpack --config external.config.js", | ||
"build-examples": "webpack --config webpack-examples.config.js", | ||
"lint": "eslint --cache .", | ||
"test": "karma start karma-cov.conf.js --single-run", | ||
"test": "GEOJS_TEST_CASE=tests/test-unit.js karma start karma-cov.conf.js --single-run --browsers PhantomJS", | ||
"start": "karma start karma.conf.js", | ||
"ci": "karma start karma-cov.conf.js --single-run --browsers PhantomJS", | ||
"ci": "GEOJS_TEST_CASE=tests/test-unit.js karma start karma-cov.conf.js --single-run --browsers PhantomJS", | ||
"ffci": "GEOJS_TEST_CASE=tests/test-gl.js karma start karma-cov.conf.js --single-run --browsers Firefox", | ||
"ffci-xvfb": "GEOJS_TEST_CASE=tests/test-gl.js xvfb-run -s '-ac -screen 0 1280x1024x24' karma start karma-cov.conf.js --single-run --browsers Firefox", | ||
"codecov": "cat lcov/*/lcov.info | codecov", | ||
"combine-coverage": "istanbul-combine -d dist/cobertura -r cobertura 'dist/coverage/json/**/coverage-final.json'", | ||
"examples": "webpack-dev-server --config webpack-examples.config.js --host ${HOST-127.0.0.1} --port ${PORT-8082} --content-base dist/", | ||
"start-test": "node examples/build.js; forever start ./testing/test-runners/server.js", | ||
"stop-test": "forever stop ./testing/test-runners/server.js", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,6 +90,17 @@ var vglRenderer = function (arg) { | |
canvas.attr('class', 'webgl-canvas'); | ||
canvas.css('display', 'block'); | ||
$(m_this.layer().node().get(0)).append(canvas); | ||
|
||
if (window.contextPreserveDrawingBuffer) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The screenshots are actually the canvas drawing buffers, not actual screenshots. There are virtues to this approach: it is easy to ignore the window border, tabs, etc. and it doesn't matter if the div is aligned the same way. It ignores non-canvas data, which is both good and bad. It does require that you can ask the canvas for the drawing buffer, though, hence this flag, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah, I see thanks. |
||
var elem = canvas.get(0); | ||
var getContext = elem.getContext; | ||
elem.getContext = function (contextType, contextAttributes) { | ||
contextAttributes = contextAttributes || {}; | ||
contextAttributes.preserveDrawingBuffer = true; | ||
return getContext.call(elem, contextType, contextAttributes); | ||
}; | ||
} | ||
|
||
m_viewer = vgl.viewer(canvas.get(0), arg.options); | ||
m_viewer.init(); | ||
m_contextRenderer = m_viewer.renderWindow().activeRenderer(); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
9b076809dc9e876455a131748d670fc9 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
https://data.kitware.com/api/v1/file/5849b21e8d777f5cdd828156/download |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the method used to generate new baselines? Things like this could use an overview in readthedocs, I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I figure I should write a script to explicitly generate new baselines, and probably also a replacement for upload_test_cases.py.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should give credit to @ronichoudhury, as some of this I lifted from the candela project.