Skip to content

misc testing/CI tidy-up #6890

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

Merged
merged 4 commits into from
Jul 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ test-defaults: &test-defaults
apt-get update
# preseed packages so that apt-get won't prompt for user input
echo "keyboard-configuration keyboard-configuration/layoutcode string us" | debconf-set-selections
echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true" | debconf-set-selections
apt-get install -y python3 cmake build-essential openjdk-9-jre-headless $TEST_DEPENDENCY
if [ x"$DISPLAY" != x ]; then
# Start an X session. Openbox might be optional for now, but
Expand Down Expand Up @@ -62,7 +63,10 @@ jobs:
EMCC_CORES=4 python3 emscripten/embuilder.py build ALL
python3 emscripten/tests/runner.py test_hello_world
mkdir tmp-firefox-profile/
echo 'user_pref("javascript.options.shared_memory", true);' >> tmp-firefox-profile/user.js
cat > tmp-firefox-profile/user.js <<EOF
user_pref("gfx.offscreencanvas.enabled", true);
user_pref("javascript.options.shared_memory", true);
EOF

# Set up X and Openbox config (if we move to a headless browser, this may not be needed).
mkdir -p .config/X11
Expand Down Expand Up @@ -137,15 +141,18 @@ jobs:
test-browser:
<<: *test-defaults
environment:
# browser.test_sdl_ttf_render_text_solid depends on Arial from Microsoft
# browser.test_sdl2_mouse and/or SDL2 should be fixed. The case happens
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the comments about test_sdl2_mouse and test_html5_webgl_create_context may have been removed by mistake, I think they are still needed?

# to be failing here, and the root cause might be related with the
# initial position of the mouse pointer relative to the canvas.
# browser.test_html5_webgl_create_context is skipped because
# anti-aliasing is not well supported.
- TEST_TARGET=browser skip:browser.test_sdl_ttf_render_text_solid skip:browser.test_sdl2_mouse skip:browser.test_html5_webgl_create_context
# browser.test_webgl_offscreen_canvas_in_pthread and
# browser.test_webgl_offscreen_canvas_in_mainthread_after_pthread
# are crashing Firefox (bugzil.la/1281796). The former case is
# further blocked by issue #6897.
- TEST_TARGET=browser skip:browser.test_sdl2_mouse skip:browser.test_html5_webgl_create_context skip:browser.test_webgl_offscreen_canvas_in_pthread skip:browser.test_webgl_offscreen_canvas_in_mainthread_after_pthread
# TODO: use Firefox headless mode when https://bugzil.la/1375585 resolves
- TEST_DEPENDENCY=dbus-x11 firefox menu openbox xinit xserver-xorg xserver-xorg-video-dummy
- TEST_DEPENDENCY=dbus-x11 firefox menu openbox ttf-mscorefonts-installer xinit xserver-xorg xserver-xorg-video-dummy
- EMSCRIPTEN_BROWSER=firefox -profile tmp-firefox-profile/
- EM_LACKS_SOUND_HARDWARE=1
- EM_TESTRUNNER_DETECT_TEMPFILE_LEAKS=0
Expand Down
2 changes: 1 addition & 1 deletion tests/hello_world_gles.c
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ gears_idle(void)
tRate0 = t;
frames = 0;
#ifdef LONGTEST
static runs = 0;
static int runs = 0;
runs++;
if (runs == 4) {
int result = fps;
Expand Down
2 changes: 1 addition & 1 deletion tests/hello_world_gles_proxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ gears_idle(void)
tRate0 = t;
frames = 0;
#ifdef LONGTEST
static runs = 0;
static int runs = 0;
runs++;
if (runs == 4) {
REPORT_RESULT(fps);
Expand Down
2 changes: 1 addition & 1 deletion tests/http.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ void http::onLoaded(const char* file) {
char* data = new char[size];
fread(data,size,1,f);
_content = data;
delete data;
delete[] data;
fclose(f);
} else {
_content = file;
Expand Down
13 changes: 1 addition & 12 deletions tests/test_interactive.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,8 @@
from __future__ import print_function
import multiprocessing, os, shutil, subprocess, unittest, zlib, webbrowser, time, shlex
import multiprocessing, os, shutil, subprocess, unittest, zlib, time
from runner import BrowserCore, path_from_root
from tools.shared import *

# User can specify an environment variable EMSCRIPTEN_BROWSER to force the browser test suite to
# run using another browser command line than the default system browser.
emscripten_browser = os.environ.get('EMSCRIPTEN_BROWSER')
if emscripten_browser:
cmd = shlex.split(emscripten_browser)
def run_in_other_browser(url):
Popen(cmd + [url])
if EM_BUILD_VERBOSE_LEVEL >= 3:
print("using Emscripten browser: " + str(cmd), file=sys.stderr)
webbrowser.open_new = run_in_other_browser

class interactive(BrowserCore):
@classmethod
def setUpClass(self):
Expand Down