Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
binwalk
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fact-depend
binwalk
Commits
8c3715d7
Commit
8c3715d7
authored
7 years ago
by
Craig Heffner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated setup.py's testing feature
parent
e2c351b3
master
…
v2.3.4
v2.3.3
v2.3.2
v2.3.1
v2.3.0
v2.2.0
python27
No related merge requests found
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletions
+22
-1
setup.py
setup.py
+22
-1
No files found.
setup.py
View file @
8c3715d7
#!/usr/bin/env python
import
os
import
sys
import
glob
import
shutil
import
subprocess
from
distutils.core
import
setup
,
Command
...
...
@@ -288,8 +289,28 @@ class TestCommand(Command):
pass
def
run
(
self
):
# Need the nose module for testing
import
nose
nose
.
main
(
argv
=
[
'--exe'
,
'--with-coverage'
])
# cd into the testing directory. Otherwise, the src/binwalk
# directory gets imported by nose which a) clutters the src
# directory with a bunch of .pyc files and b) will fail anyway
# unless a build/install has already been run which creates
# the version.py file.
testing_directory
=
os
.
path
.
join
(
MODULE_DIRECTORY
,
"tests"
)
os
.
chdir
(
testing_directory
)
# Run the tests
nose
.
core
.
run
(
argv
=
[
'--exe'
,
'--with-coverage'
])
# Clean up the resulting pyc files in the testing directory
for
pyc
in
glob
.
glob
(
"
%
s/*.pyc"
%
testing_directory
):
sys
.
stdout
.
write
(
"removing '
%
s'
\n
"
%
pyc
)
os
.
remove
(
pyc
)
input_vectors_directory
=
os
.
path
.
join
(
testing_directory
,
"input-vectors"
)
for
extracted_directory
in
glob
.
glob
(
"
%
s/*.extracted"
%
input_vectors_directory
):
remove_tree
(
extracted_directory
)
# The data files to install along with the module
install_data_files
=
[]
...
...
This diff is collapsed.
Click to expand it.
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