Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Aurel
slapos
Commits
db797f12
Commit
db797f12
authored
Aug 23, 2018
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[software/jstestnode] Allow to run jio test with node
parent
5b06eea6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
109 additions
and
69 deletions
+109
-69
component/nodejs/buildout.cfg
component/nodejs/buildout.cfg
+10
-0
software/jstestnode/runTestSuite.in
software/jstestnode/runTestSuite.in
+93
-67
software/jstestnode/software.cfg
software/jstestnode/software.cfg
+6
-2
No files found.
component/nodejs/buildout.cfg
View file @
db797f12
[buildout]
extends =
../coreutils/buildout.cfg
../patch/buildout.cfg
../git/buildout.cfg
../pkgconfig/buildout.cfg
...
...
@@ -32,6 +33,15 @@ environment =
LDFLAGS=-Wl,-rpath=${gcc:location}/lib -Wl,-rpath=${gcc:location}/lib64 -Wl,-rpath=${openssl:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
LD_LIBRARY_PATH=${openssl:location}/lib
[nodejs-8.6.0-output]
# Shared binary location to ease migration
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = ${coreutils-output:test} -x ${:node} -a -x ${:npm}
node = ${nodejs-8.6.0:location}/bin/node
npm = ${nodejs-8.6.0:location}/bin/npm
[nodejs-5]
# Server-side Javascript.
recipe = slapos.recipe.cmmi
...
...
software/jstestnode/runTestSuite.in
View file @
db797f12
...
...
@@ -12,6 +12,8 @@ from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from subprocess import check_output
import json
os.environ['TMPDIR'] = '$${xvfb-instance:tmp-path}'
os.environ['DISPLAY'] = ':0'
...
...
@@ -114,6 +116,29 @@ def main():
'platform': args.target,
'version': args.target_version
}
if args.target == 'node':
# Execute NodeJS tests
result_string = check_output(['${nodejs-output:node}', '${jio-repository.git:location}/test/node.js'],
cwd='${jio-repository.git:location}',
env={'CI': 'true'})
result_dict = json.loads(result_string)
for result in result_dict['tests']:
test_line_dict['%s: %s' % (result['module'], result['name'])] = {
'test_count': int(result['total']),
'error_count': 0,
'failure_count': int(result['failed']),
'skip_count': 0,
'duration': int(result['duration']),
'command': '',
'stdout': result['source'],
'stderr': '',
'html_test_result': json.dumps(result['assertions'])
}
else:
# Execute WebBrowser tests
if is_appium:
if not args.appium_server_auth:
raise RuntimeError('--appium_server_auth is required.')
...
...
@@ -179,6 +204,7 @@ def main():
browser.quit()
is_browser_running = False
# Send results
tool = taskdistribution.TaskDistributor(portal_url=args.master_url)
test_result = tool.createTestResult(revision = revision,
test_name_list = test_line_dict.keys(),
...
...
software/jstestnode/software.cfg
View file @
db797f12
...
...
@@ -2,6 +2,7 @@
extends =
../../stack/slapos.cfg
../../stack/nodejs.cfg
../../component/coreutils/buildout.cfg
../../component/git/buildout.cfg
../../component/xorg/buildout.cfg
../../component/firefox/buildout.cfg
...
...
@@ -27,6 +28,9 @@ parts =
[nodejs]
<= nodejs-8.6.0
[nodejs-output]
<= nodejs-8.6.0-output
[instance]
recipe = slapos.recipe.template
md5sum = 7c907db5f803b03a218b49888a3a3799
...
...
@@ -52,7 +56,7 @@ develop = true
[renderjs-install]
recipe = plone.recipe.command
stop-on-error = true
command = cd ${renderjs-repository.git:location} && PATH=${git:location}/bin/:${nodejs:location}/bin/:$PATH ${nodejs
:location}/bin/npm
install . && PATH=${git:location}/bin/:${nodejs:location}/bin/:$PATH ./node_modules/grunt-cli/bin/grunt
command = cd ${renderjs-repository.git:location} && PATH=${git:location}/bin/:${nodejs:location}/bin/:$PATH ${nodejs
-output:npm}
install . && PATH=${git:location}/bin/:${nodejs:location}/bin/:$PATH ./node_modules/grunt-cli/bin/grunt
update-command = ${:command}
[jio-repository.git]
...
...
@@ -111,7 +115,7 @@ mode = 0644
[template-runTestSuite]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/runTestSuite.in
md5sum =
8528d90cce5d034195e3e71bef855c48
md5sum =
2898d62902351e6df9ce887bd98e2ca1
output = ${buildout:directory}/runTestSuite.in
mode = 0644
...
...
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