Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jio
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Junming
jio
Commits
770c6c0b
Commit
770c6c0b
authored
Apr 03, 2013
by
Sebastien Robin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add python code to launch automatically jio qunit tests
parent
a91c592e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
68 additions
and
1 deletion
+68
-1
Makefile
Makefile
+1
-1
setup.py
setup.py
+21
-0
test_launcher_for_jio/__init__.py
test_launcher_for_jio/__init__.py
+6
-0
test_launcher_for_jio/tests/__init__.py
test_launcher_for_jio/tests/__init__.py
+0
-0
test_launcher_for_jio/tests/testJIO.py
test_launcher_for_jio/tests/testJIO.py
+40
-0
No files found.
Makefile
View file @
770c6c0b
...
...
@@ -14,7 +14,7 @@ PARSER_OUT = $(QUERIES_DIR)/parser.js
## js/cc using rhino
#JSCC_CMD = rhino ~/modules/jscc/jscc.js -t ~/modules/jscc/driver_web.js_
# sh -c 'cd ; npm install jscc-node'
JSCC_CMD
=
node ~/node_modules/jscc-node/jscc.js
-t
~/node_modules/jscc-node/driver_node.js_
JSCC_CMD
=
node
js
~/node_modules/jscc-node/jscc.js
-t
~/node_modules/jscc-node/driver_node.js_
# sh -c 'cd ; npm install jslint'
LINT_CMD
=
$(
shell
which jslint
||
echo
node ~/node_modules/jslint/bin/jslint.js
)
--terse
# sh -c 'cd ; npm install uglify-js'
...
...
setup.py
0 → 100644
View file @
770c6c0b
import
os
from
setuptools
import
setup
,
find_packages
setup
(
name
=
"test_launcher_for_jio"
,
version
=
"0.0.4"
,
author
=
"Sebastien Robin"
,
author_email
=
"andrewjcarter@gmail.com"
,
description
=
(
"only launch jio test."
),
license
=
"GPL"
,
keywords
=
"jio test"
,
url
=
"http://j-io.org"
,
packages
=
[
'test_launcher_for_jio'
,
'test_launcher_for_jio.tests'
],
long_description
=
""
,
classifiers
=
[
"Development Status :: 3 - Alpha"
,
"Topic :: Utilities"
,
"License :: OSI Approved :: GPL License"
,
],
test_suite
=
'test_launcher_for_jio.tests'
,
)
\ No newline at end of file
test_launcher_for_jio/__init__.py
0 → 100644
View file @
770c6c0b
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try
:
__import__
(
'pkg_resources'
).
declare_namespace
(
__name__
)
except
ImportError
:
from
pkgutil
import
extend_path
__path__
=
extend_path
(
__path__
,
__name__
)
test_launcher_for_jio/tests/__init__.py
0 → 100644
View file @
770c6c0b
test_launcher_for_jio/tests/testJIO.py
0 → 100644
View file @
770c6c0b
from
unittest
import
TestCase
import
subprocess
import
os
class
JIOTest
(
TestCase
):
def
setUp
(
self
):
pass
def
tearDown
(
self
):
pass
def
test_01_jio_without_requirejs
(
self
):
"""
Launch jio test without requirejs
"""
command
=
[
"%s %s %s; exit 0"
%
(
os
.
path
.
expanduser
(
'~/bin/phantomjs'
),
os
.
path
.
expanduser
(
'~/parts/jio/test/run-qunit.js'
),
os
.
path
.
expanduser
(
'~/parts/jio/test/jiotests_withoutrequirejs.html'
))]
print
command
result
=
subprocess
.
check_output
(
command
,
stderr
=
subprocess
.
STDOUT
,
shell
=
True
)
print
result
self
.
assertTrue
(
result
.
find
(
"assertions of"
)
>=
0
)
# we should have string like 443 assertions of 444 passed, 1 failed.
total_quantity
=
0
passed_quantity
=
0
failed_quantity
=
0
for
line
in
result
.
split
(
'
\
n
'
):
if
line
.
find
(
"assertions of"
)
>=
0
:
splitted_line
=
line
.
split
()
passed_quantity
=
splitted_line
[
0
]
total_quantity
=
splitted_line
[
3
]
failed_quantity
=
splitted_line
[
5
]
self
.
assertTrue
(
total_quantity
>
0
)
print
"
\
n
JIO SUB RESULT: %s Tests, %s Failures"
%
(
total_quantity
,
failed_quantity
)
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