Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
ed9f6f9a
Commit
ed9f6f9a
authored
Aug 07, 2004
by
Stefan H. Holek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Now also scans instancehome for stale bytecode.
parent
eb938746
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
5 deletions
+19
-5
test.py
test.py
+19
-5
No files found.
test.py
View file @
ed9f6f9a
...
...
@@ -87,7 +87,7 @@ named .testinfo, it will not be searched for tests. Really.)
can be specified by using "-G OPTION1 -G OPTION2."
--import-testing
Import the Testing
modul
e to setup the test ZODB. Useful for running
Import the Testing
packag
e to setup the test ZODB. Useful for running
tests that forgot to "import Testing".
--libdir test_root
...
...
@@ -371,7 +371,7 @@ class PathInit:
self
.
libdir
=
"lib/python"
# Hack sys.path
self
.
home
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
sys
.
argv
[
0
]))
# test.py lives in
bin directory
when installed ...
# test.py lives in
$ZOPE_HOME/bin
when installed ...
dir
,
file
=
os
.
path
.
split
(
self
.
home
)
if
file
==
'bin'
:
self
.
home
=
dir
sys
.
path
.
insert
(
0
,
os
.
path
.
join
(
self
.
home
,
self
.
libdir
))
...
...
@@ -633,8 +633,14 @@ def remove_stale_bytecode(arg, dirname, names):
srcname
=
name
[:
-
1
]
if
srcname
not
in
names
:
fullname
=
os
.
path
.
join
(
dirname
,
name
)
print
"Removing stale bytecode file"
,
fullname
os
.
unlink
(
fullname
)
print
"Removing stale bytecode file"
,
fullname
,
try
:
os
.
unlink
(
fullname
)
except
(
OSError
,
IOError
),
e
:
print
' --> %s (errno %d)'
%
(
e
.
strerror
,
e
.
errno
)
else
:
print
def
main
(
module_filter
,
test_filter
,
libdir
):
global
pathinit
...
...
@@ -655,7 +661,15 @@ def main(module_filter, test_filter, libdir):
import
Zope
Zope
.
configure
(
config_file
)
# Import Testing module to setup the test ZODB
if
not
keepStaleBytecode
:
from
App.config
import
getConfiguration
softwarehome
=
os
.
path
.
realpath
(
getConfiguration
().
softwarehome
)
instancehome
=
os
.
path
.
realpath
(
getConfiguration
().
instancehome
)
softwarehome
=
os
.
path
.
normcase
(
softwarehome
)
if
not
softwarehome
.
startswith
(
os
.
path
.
normcase
(
instancehome
)):
walk_with_symlinks
(
instancehome
,
remove_stale_bytecode
,
None
)
# Import Testing package to setup the test ZODB
if
import_testing
:
import
Testing
...
...
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