Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.extension
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.extension
Commits
849a7bc6
There was a problem fetching the pipeline summary.
Commit
849a7bc6
authored
8 years ago
by
Amir Mohammadi
Browse files
Options
Downloads
Patches
Plain Diff
show the output of test commands
parent
def39269
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/extension/test_extensions.py
+7
-7
7 additions, 7 deletions
bob/extension/test_extensions.py
with
7 additions
and
7 deletions
bob/extension/test_extensions.py
+
7
−
7
View file @
849a7bc6
...
@@ -23,7 +23,7 @@ def _run(package, run_call):
...
@@ -23,7 +23,7 @@ def _run(package, run_call):
temp_dir
=
tempfile
.
mkdtemp
(
prefix
=
"
bob_test
"
)
temp_dir
=
tempfile
.
mkdtemp
(
prefix
=
"
bob_test
"
)
# redirect output of functions to /dev/null to avoid spamming the console
# redirect output of functions to /dev/null to avoid spamming the console
devnull
=
open
(
os
.
devnull
,
'
w
'
)
#
devnull = open(os.devnull, 'w')
try
:
try
:
# extract archive
# extract archive
...
@@ -32,26 +32,26 @@ def _run(package, run_call):
...
@@ -32,26 +32,26 @@ def _run(package, run_call):
package_dir
=
os
.
path
.
join
(
temp_dir
,
"
bob.example.%s
"
%
package
)
package_dir
=
os
.
path
.
join
(
temp_dir
,
"
bob.example.%s
"
%
package
)
# bootstrap
# bootstrap
subprocess
.
call
([
sys
.
executable
,
"
bootstrap-buildout.py
"
],
cwd
=
package_dir
,
stdout
=
devnull
,
stderr
=
devnull
)
subprocess
.
call
([
sys
.
executable
,
"
bootstrap-buildout.py
"
],
cwd
=
package_dir
)
assert
os
.
path
.
exists
(
os
.
path
.
join
(
package_dir
,
"
bin
"
,
"
buildout
"
))
assert
os
.
path
.
exists
(
os
.
path
.
join
(
package_dir
,
"
bin
"
,
"
buildout
"
))
# buildout
# buildout
# if we have a setup.py in our current directory, we develop both (as we might be in the current source directory of bob.extension and use it),
# if we have a setup.py in our current directory, we develop both (as we might be in the current source directory of bob.extension and use it),
# otherwise we only develop the downloaded source package
# otherwise we only develop the downloaded source package
develop
=
'
%s
\n
.
'
%
os
.
getcwd
()
if
os
.
path
.
exists
(
"
setup.py
"
)
else
'
.
'
develop
=
'
%s
\n
.
'
%
os
.
getcwd
()
if
os
.
path
.
exists
(
"
setup.py
"
)
else
'
.
'
subprocess
.
call
([
'
./bin/buildout
'
,
'
buildout:prefer-final=false
'
,
'
buildout:develop=%s
'
%
develop
],
cwd
=
package_dir
,
stdout
=
devnull
)
subprocess
.
call
([
'
./bin/buildout
'
,
'
buildout:prefer-final=false
'
,
'
buildout:develop=%s
'
%
develop
],
cwd
=
package_dir
)
assert
os
.
path
.
exists
(
os
.
path
.
join
(
package_dir
,
"
bin
"
,
"
python
"
))
assert
os
.
path
.
exists
(
os
.
path
.
join
(
package_dir
,
"
bin
"
,
"
python
"
))
# nosetests
# nosetests
subprocess
.
call
([
'
./bin/nosetests
'
,
'
-sv
'
],
cwd
=
package_dir
,
stdout
=
devnull
,
stderr
=
devnull
)
subprocess
.
call
([
'
./bin/nosetests
'
,
'
-sv
'
],
cwd
=
package_dir
)
# check that the call is working
# check that the call is working
subprocess
.
call
(
run_call
,
cwd
=
package_dir
,
stdout
=
devnull
)
subprocess
.
call
(
run_call
,
cwd
=
package_dir
)
subprocess
.
call
([
'
./bin/sphinx-build
'
,
'
doc
'
,
'
sphinx
'
],
cwd
=
package_dir
,
stdout
=
devnull
)
subprocess
.
call
([
'
./bin/sphinx-build
'
,
'
doc
'
,
'
sphinx
'
],
cwd
=
package_dir
)
assert
os
.
path
.
exists
(
os
.
path
.
join
(
package_dir
,
"
sphinx
"
,
"
index.html
"
))
assert
os
.
path
.
exists
(
os
.
path
.
join
(
package_dir
,
"
sphinx
"
,
"
index.html
"
))
subprocess
.
call
(
'
./bin/python -c
"
import pkg_resources; from bob.example.%s import get_config; print(get_config())
"'
%
package
,
cwd
=
package_dir
,
stdout
=
devnull
,
shell
=
True
)
subprocess
.
call
(
'
./bin/python -c
"
import pkg_resources; from bob.example.%s import get_config; print(get_config())
"'
%
package
,
cwd
=
package_dir
,
shell
=
True
)
finally
:
finally
:
shutil
.
rmtree
(
temp_dir
)
shutil
.
rmtree
(
temp_dir
)
...
...
This diff is collapsed.
Click to expand it.
Amir MOHAMMADI
@amohammadi
mentioned in issue
#27 (closed)
·
8 years ago
mentioned in issue
#27 (closed)
mentioned in issue #27
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment