Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
Joshua
erp5
Commits
08abc173
Commit
08abc173
authored
Mar 30, 2018
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Rework eggtest to use eggs installed by buildout"
This reverts merge request !619
parent
6c89fe9b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
12 deletions
+11
-12
erp5/util/testsuite/__init__.py
erp5/util/testsuite/__init__.py
+11
-12
No files found.
erp5/util/testsuite/__init__.py
View file @
08abc173
...
...
@@ -223,14 +223,16 @@ class EggTestSuite(TestSuite):
print test
original_dir = os.getcwd()
try:
os.chdir(
self.egg_test_path_dict[test]
)
os.chdir(
test
)
return self.runUnitTest(test)
finally:
os.chdir(original_dir)
def runUnitTest(self, *args, **kw):
try:
runUnitTest = "{python} setup.py test".format(python=self.python_interpreter)
# (FIXME) The python should be provided by environment with
# appropriated configuration.
runUnitTest = "python setup.py test"
args = tuple(shlex.split(runUnitTest))
status_dict = self.spawn(*args, **kw)
except SubprocessError, e:
...
...
@@ -261,7 +263,10 @@ class EggTestSuite(TestSuite):
return status_dict
def getTestList(self):
return self.egg_test_path_dict.keys()
# (FIXME) The test name should be nicer in order to provide a good report.
# On task distribution.
source_code_to_test = os.environ.get("SOURCE_CODE_TO_TEST", '
.
')
return source_code_to_test.split(",")
def runTestSuite():
parser = argparse.ArgumentParser(description='
Run
a
test
suite
.
')
...
...
@@ -282,24 +287,18 @@ def runTestSuite():
parser.add_argument('
--
frontend_url
',
help='
The
url
of
the
frontend
of
this
test
node
',
default=None)
parser.add_argument('
--
python_interpreter
',
help='
Path
to
python
interpreter
used
to
run
the
test
suite
',
default='
python
')
parser.add_argument('
--
source_code_path_list
',
help='
Coma
separated
list
of
Eggs
folders
to
test
',
help='
List
of
Eggs
folders
to
test
,
splited
by
commam
',
default='
.
')
args = parser.parse_args()
master = taskdistribution.TaskDistributor(args.master_url)
os.environ.setdefault("SOURCE_CODE_TO_TEST", args.source_code_path_list)
test_suite_title = args.test_suite_title or args.test_suite
revision = args.revision
suite = EggTestSuite(1, test_suite=args.test_suite,
node_quantity=args.node_quantity,
revision=revision,
python_interpreter=args.python_interpreter,
egg_test_path_dict={os.path.basename(path): path
for path in args.source_code_path_list.split('
,
')},
)
revision=revision)
test_result = master.createTestResult(revision, suite.getTestList(),
args.test_node_title, suite.allow_restart, test_suite_title,
...
...
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