Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SMART
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UNI-KLU
SMART
Commits
c611935d
Commit
c611935d
authored
Feb 11, 2020
by
Alexander
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test script installing pip requirements during execution
parent
8843dcb6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
testing.py
bin/testing.py
+5
-2
No files found.
bin/testing.py
View file @
c611935d
...
...
@@ -17,8 +17,11 @@ for (dirname, dirs, files) in os.walk(ROOT):
and
not
(
f
"{TESTS_FOLDER_NAME}/"
in
str
(
dirname
))
\
and
not
(
"venv"
in
str
(
dirname
)):
try
:
print
(
f
"Executing tests in {dirname}"
)
os
.
chdir
(
os
.
path
.
normpath
(
dirname
))
exit_val
=
os
.
system
(
"python3.7 -m unittest discover"
)
# TODO do this during docker image setup
exit_val
=
os
.
system
(
"python3.7 -m pip install -r ../requirements.txt"
)
# install pip dependencies
exit_val
=
os
.
system
(
"python3.7 -m unittest discover"
)
# execute the tests
resultCodeList
.
append
(
exit_val
)
#once per folder i.e if 3 tests are in a folder and crash, there will be just one exit val
except
Exception
as
e
:
print
(
e
)
...
...
@@ -36,4 +39,4 @@ while i < len(resultCodeList):
if
(
firstError
<
0
):
#no errors found
sys
.
exit
(
0
)
else
:
sys
.
exit
(
resultCodeList
[
firstError
])
#return the error code of the first error
\ No newline at end of file
sys
.
exit
(
1
)
#return code>0
\ No newline at end of file
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