Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pyodide
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
pyodide
Commits
b9f3eec9
Commit
b9f3eec9
authored
Aug 28, 2018
by
Michael Droettboom
Committed by
GitHub
Aug 28, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #131 from rth/improve-testing-setup
Generate test resources with make all
parents
5c3b2eaa
bfd0e586
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
9 deletions
+18
-9
.circleci/config.yml
.circleci/config.yml
+4
-5
Makefile
Makefile
+5
-3
README.md
README.md
+1
-1
setup.cfg
setup.cfg
+4
-0
test/conftest.py
test/conftest.py
+4
-0
No files found.
.circleci/config.yml
View file @
b9f3eec9
...
@@ -19,11 +19,12 @@ jobs:
...
@@ -19,11 +19,12 @@ jobs:
# Set up the Debian testing repo, and then install g++ from there...
# Set up the Debian testing repo, and then install g++ from there...
sudo bash -c "echo \"deb http://ftp.us.debian.org/debian testing main contrib non-free\" >> /etc/apt/sources.list"
sudo bash -c "echo \"deb http://ftp.us.debian.org/debian testing main contrib non-free\" >> /etc/apt/sources.list"
sudo apt-get update
sudo apt-get update
sudo apt-get install node-less cmake build-essential flake8 uglifyjs python3-yaml chromium ccache
sudo apt-get install node-less cmake build-essential
clang-format-6.0
flake8 uglifyjs python3-yaml chromium ccache
sudo apt-get install -t testing g++-8
sudo apt-get install -t testing g++-8
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-6
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-6
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 80 --slave /usr/bin/g++ g++ /usr/bin/g++-8
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 80 --slave /usr/bin/g++ g++ /usr/bin/g++-8
sudo update-alternatives --set gcc /usr/bin/gcc-8
sudo update-alternatives --set gcc /usr/bin/gcc-8
sudo ln -s /usr/bin/clang-format-6.0 /usr/bin/clang-format
sudo pip install virtualenv
sudo pip install virtualenv
...
@@ -44,7 +45,6 @@ jobs:
...
@@ -44,7 +45,6 @@ jobs:
unzip chromedriver_linux64.zip
unzip chromedriver_linux64.zip
mv chromedriver firefox
mv chromedriver firefox
-
run
:
-
run
:
name
:
lint
name
:
lint
command
:
|
command
:
|
...
@@ -63,7 +63,6 @@ jobs:
...
@@ -63,7 +63,6 @@ jobs:
ccache -z
ccache -z
make
make
ccache -s
ccache -s
make build/test.html build/test_data.txt
-
save_cache
:
-
save_cache
:
paths
:
paths
:
...
@@ -93,7 +92,7 @@ jobs:
...
@@ -93,7 +92,7 @@ jobs:
source pyodide-env/bin/activate
source pyodide-env/bin/activate
export PATH=$PWD/firefox:$PATH
export PATH=$PWD/firefox:$PATH
pytest test -v -
-instafail -
k firefox
pytest test -v -k firefox
test-chrome
:
test-chrome
:
<<
:
*defaults
<<
:
*defaults
...
@@ -110,7 +109,7 @@ jobs:
...
@@ -110,7 +109,7 @@ jobs:
source pyodide-env/bin/activate
source pyodide-env/bin/activate
export PATH=$PWD/firefox:$PATH
export PATH=$PWD/firefox:$PATH
pytest test -v -
-instafail -
k chrome
pytest test -v -k chrome
deploy
:
deploy
:
machine
:
machine
:
...
...
Makefile
View file @
b9f3eec9
...
@@ -49,7 +49,9 @@ all: build/pyodide.asm.js \
...
@@ -49,7 +49,9 @@ all: build/pyodide.asm.js \
build/matplotlib-sideload.html
\
build/matplotlib-sideload.html
\
build/renderedhtml.css
\
build/renderedhtml.css
\
build/test.data
\
build/test.data
\
build/packages.json
build/packages.json
\
build/test_data.txt
\
build/test.html
build/pyodide.asm.js
:
src/main.bc src/jsimport.bc src/jsproxy.bc src/js2python.bc
\
build/pyodide.asm.js
:
src/main.bc src/jsimport.bc src/jsproxy.bc src/js2python.bc
\
...
@@ -101,8 +103,8 @@ build/renderedhtml.css: src/renderedhtml.less
...
@@ -101,8 +103,8 @@ build/renderedhtml.css: src/renderedhtml.less
lessc
$<
$@
lessc
$<
$@
test
:
all
build/test.html build/test_data.txt
test
:
all
py
.test
test
-v
-r
sxX
--instafail
py
test
test
/
-v
build/test_data.txt
:
test/data.txt
build/test_data.txt
:
test/data.txt
...
...
README.md
View file @
b9f3eec9
...
@@ -43,7 +43,7 @@ Install [geckodriver](https://github.com/mozilla/geckodriver/releases) and
...
@@ -43,7 +43,7 @@ Install [geckodriver](https://github.com/mozilla/geckodriver/releases) and
[
chromedriver
](
https://sites.google.com/a/chromium.org/chromedriver/downloads
)
somewhere
[
chromedriver
](
https://sites.google.com/a/chromium.org/chromedriver/downloads
)
somewhere
on your
`PATH`
.
on your
`PATH`
.
`
make test
`
`
pytest test/
`
# Benchmarking
# Benchmarking
...
...
setup.cfg
0 → 100644
View file @
b9f3eec9
[tool:pytest]
addopts =
-r sxX
--instafail
test/conftest.py
View file @
b9f3eec9
...
@@ -39,6 +39,10 @@ class SeleniumWrapper:
...
@@ -39,6 +39,10 @@ class SeleniumWrapper:
driver
=
self
.
get_driver
()
driver
=
self
.
get_driver
()
wait
=
WebDriverWait
(
driver
,
timeout
=
20
)
wait
=
WebDriverWait
(
driver
,
timeout
=
20
)
if
not
(
BUILD_PATH
/
'test.html'
).
exists
():
# selenium does not expose HTTP response codes
raise
ValueError
(
f"
{
(
BUILD_PATH
/
'test.html'
).
resolve
()
}
"
f"does not exist!"
)
driver
.
get
(
f'http://127.0.0.1:
{
PORT
}
/test.html'
)
driver
.
get
(
f'http://127.0.0.1:
{
PORT
}
/test.html'
)
wait
.
until
(
PyodideInited
())
wait
.
until
(
PyodideInited
())
self
.
wait
=
wait
self
.
wait
=
wait
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment