Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
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
Boxiang Sun
cython
Commits
cf8f78c8
Commit
cf8f78c8
authored
Jul 12, 2008
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed unused script
parent
df65309f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
49 deletions
+0
-49
bin/update_references
bin/update_references
+0
-49
No files found.
bin/update_references
deleted
100755 → 0
View file @
df65309f
#!/usr/bin/env python
#
# Go through the Tests directory and its subdirectories
# copying the latest versions of the test outputs into
# the Reference directories.
#
import
os
,
sys
ignore_names
=
[
".DS_Store"
,
"Icon
\
r
"
]
def
copy_file
(
from_path
,
to_path
):
# We copy the contents from one file to the other
# so as to preserve metadata on the Mac.
#print from_path, "-->", to_path
f
=
open
(
from_path
)
g
=
open
(
to_path
,
"w+"
)
g
.
write
(
f
.
read
())
f
.
close
()
g
.
close
()
def
update_references
(
out_dir
,
ref_dir
):
for
name
in
os
.
listdir
(
ref_dir
):
if
name
not
in
ignore_names
:
out_file
=
os
.
path
.
join
(
out_dir
,
name
)
ref_file
=
os
.
path
.
join
(
ref_dir
,
name
)
if
os
.
path
.
isfile
(
out_file
):
print
"Updating"
,
name
copy_file
(
out_file
,
ref_file
)
def
update_references_in_dir
(
dir
):
print
"Updating references in"
,
dir
for
name
in
os
.
listdir
(
dir
):
if
name
<>
"Reference"
and
not
name
.
startswith
(
"("
):
item_path
=
os
.
path
.
join
(
dir
,
name
)
if
os
.
path
.
isdir
(
item_path
):
update_references_in_dir
(
item_path
)
ref_dir
=
os
.
path
.
join
(
dir
,
"Reference"
)
if
os
.
path
.
isdir
(
ref_dir
):
update_references
(
dir
,
ref_dir
)
def
main
():
bin_dir
=
os
.
path
.
dirname
(
sys
.
argv
[
0
])
source_dir
=
os
.
path
.
dirname
(
bin_dir
)
tests_dir
=
os
.
path
.
join
(
source_dir
,
"Tests"
)
update_references_in_dir
(
tests_dir
)
if
__name__
==
"__main__"
:
main
()
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