Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
7d6dd565
Commit
7d6dd565
authored
Dec 01, 2014
by
Greg Price
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6102 from edx/gprice/js-test-port
Add paver option to specify js-test-tool port
parents
142c38ed
30d4dc44
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
2 deletions
+10
-2
pavelib/js_test.py
+5
-1
pavelib/utils/test/suites/js_suite.py
+4
-0
requirements/edx/github.txt
+1
-1
No files found.
pavelib/js_test.py
View file @
7d6dd565
...
@@ -18,12 +18,14 @@ __test__ = False # do not collect
...
@@ -18,12 +18,14 @@ __test__ = False # do not collect
(
"suite="
,
"s"
,
"Test suite to run"
),
(
"suite="
,
"s"
,
"Test suite to run"
),
(
"mode="
,
"m"
,
"dev or run"
),
(
"mode="
,
"m"
,
"dev or run"
),
(
"coverage"
,
"c"
,
"Run test under coverage"
),
(
"coverage"
,
"c"
,
"Run test under coverage"
),
(
"port="
,
"p"
,
"Port to run test server on (dev mode only)"
),
])
])
def
test_js
(
options
):
def
test_js
(
options
):
"""
"""
Run the JavaScript tests
Run the JavaScript tests
"""
"""
mode
=
getattr
(
options
,
'mode'
,
'run'
)
mode
=
getattr
(
options
,
'mode'
,
'run'
)
port
=
None
if
mode
==
'run'
:
if
mode
==
'run'
:
suite
=
getattr
(
options
,
'suite'
,
'all'
)
suite
=
getattr
(
options
,
'suite'
,
'all'
)
...
@@ -31,6 +33,7 @@ def test_js(options):
...
@@ -31,6 +33,7 @@ def test_js(options):
elif
mode
==
'dev'
:
elif
mode
==
'dev'
:
suite
=
getattr
(
options
,
'suite'
,
None
)
suite
=
getattr
(
options
,
'suite'
,
None
)
coverage
=
False
coverage
=
False
port
=
getattr
(
options
,
'port'
)
else
:
else
:
sys
.
stderr
.
write
(
"Invalid mode. Please choose 'dev' or 'run'."
)
sys
.
stderr
.
write
(
"Invalid mode. Please choose 'dev' or 'run'."
)
return
return
...
@@ -43,7 +46,7 @@ def test_js(options):
...
@@ -43,7 +46,7 @@ def test_js(options):
)
)
return
return
test_suite
=
JsTestSuite
(
suite
,
mode
=
mode
,
with_coverage
=
coverage
)
test_suite
=
JsTestSuite
(
suite
,
mode
=
mode
,
with_coverage
=
coverage
,
port
=
port
)
test_suite
.
run
()
test_suite
.
run
()
...
@@ -63,6 +66,7 @@ def test_js_run(options):
...
@@ -63,6 +66,7 @@ def test_js_run(options):
@task
@task
@cmdopts
([
@cmdopts
([
(
"suite="
,
"s"
,
"Test suite to run"
),
(
"suite="
,
"s"
,
"Test suite to run"
),
(
"port="
,
"p"
,
"Port to run test server on"
),
])
])
def
test_js_dev
(
options
):
def
test_js_dev
(
options
):
"""
"""
...
...
pavelib/utils/test/suites/js_suite.py
View file @
7d6dd565
...
@@ -17,6 +17,7 @@ class JsTestSuite(TestSuite):
...
@@ -17,6 +17,7 @@ class JsTestSuite(TestSuite):
super
(
JsTestSuite
,
self
)
.
__init__
(
*
args
,
**
kwargs
)
super
(
JsTestSuite
,
self
)
.
__init__
(
*
args
,
**
kwargs
)
self
.
run_under_coverage
=
kwargs
.
get
(
'with_coverage'
,
True
)
self
.
run_under_coverage
=
kwargs
.
get
(
'with_coverage'
,
True
)
self
.
mode
=
kwargs
.
get
(
'mode'
,
'run'
)
self
.
mode
=
kwargs
.
get
(
'mode'
,
'run'
)
self
.
port
=
kwargs
.
get
(
'port'
)
try
:
try
:
self
.
test_id
=
(
Env
.
JS_TEST_ID_FILES
[
Env
.
JS_TEST_ID_KEYS
.
index
(
self
.
root
)])
self
.
test_id
=
(
Env
.
JS_TEST_ID_FILES
[
Env
.
JS_TEST_ID_KEYS
.
index
(
self
.
root
)])
...
@@ -53,6 +54,9 @@ class JsTestSuite(TestSuite):
...
@@ -53,6 +54,9 @@ class JsTestSuite(TestSuite):
)
)
)
)
if
self
.
port
:
cmd
+=
" -p {port}"
.
format
(
port
=
self
.
port
)
if
self
.
run_under_coverage
:
if
self
.
run_under_coverage
:
cmd
+=
" --coverage-xml {report_dir}"
.
format
(
cmd
+=
" --coverage-xml {report_dir}"
.
format
(
report_dir
=
self
.
coverage_report
report_dir
=
self
.
coverage_report
...
...
requirements/edx/github.txt
View file @
7d6dd565
...
@@ -24,7 +24,7 @@ git+https://github.com/pmitros/django-pyfs.git@d175715e0fe3367ec0f1ee429c242d603
...
@@ -24,7 +24,7 @@ git+https://github.com/pmitros/django-pyfs.git@d175715e0fe3367ec0f1ee429c242d603
git+https://github.com/edx/XBlock.git@2029af2a4b524310847decfb34ef39da8a30dc4e#egg=XBlock
git+https://github.com/edx/XBlock.git@2029af2a4b524310847decfb34ef39da8a30dc4e#egg=XBlock
git+https://github.com/edx/codejail.git@66dd5a45e5072666ff9a70c768576e9ffd1daa4b#egg=codejail
git+https://github.com/edx/codejail.git@66dd5a45e5072666ff9a70c768576e9ffd1daa4b#egg=codejail
git+https://github.com/edx/diff-cover.git@v0.7.2#egg=diff_cover
git+https://github.com/edx/diff-cover.git@v0.7.2#egg=diff_cover
git+https://github.com/edx/js-test-tool.git@v0.1.
5
#egg=js_test_tool
git+https://github.com/edx/js-test-tool.git@v0.1.
6
#egg=js_test_tool
git+https://github.com/edx/event-tracking.git@0.1.0#egg=event-tracking
git+https://github.com/edx/event-tracking.git@0.1.0#egg=event-tracking
git+https://github.com/edx/bok-choy.git@4a259e3548a19e41cc39433caf68ea58d10a27ba#egg=bok_choy
git+https://github.com/edx/bok-choy.git@4a259e3548a19e41cc39433caf68ea58d10a27ba#egg=bok_choy
git+https://github.com/edx-solutions/django-splash.git@7579d052afcf474ece1239153cffe1c89935bc4f#egg=django-splash
git+https://github.com/edx-solutions/django-splash.git@7579d052afcf474ece1239153cffe1c89935bc4f#egg=django-splash
...
...
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