Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scapy
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor 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
CodeLinaro
public-release-test-restored
platform
external
scapy
Commits
6317ba08
Commit
6317ba08
authored
8 years ago
by
Guillaume Valadon
Committed by
Guillaume Valadon
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Run unit tests on Linux and OS X - root and non-root
parent
01adb138
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.travis.yml
+38
-9
38 additions, 9 deletions
.travis.yml
.travis/install.sh
+23
-0
23 additions, 0 deletions
.travis/install.sh
.travis/pylibpcap.rb
+10
-0
10 additions, 0 deletions
.travis/pylibpcap.rb
.travis/test.sh
+18
-0
18 additions, 0 deletions
.travis/test.sh
with
89 additions
and
9 deletions
.travis.yml
+
38
−
9
View file @
6317ba08
sudo
:
false
language
:
python
language
:
python
python
:
matrix
:
-
2.6
include
:
-
2.7
# Run as a regular user
-
pypy
-
os
:
linux
python
:
2.6
-
os
:
linux
python
:
2.7
-
os
:
linux
python
:
pypy
-
os
:
osx
language
:
generic
env
:
-
SCAPY_USE_PCAPDNET=true
# Run as root
-
os
:
linux
sudo
:
required
python
:
2.7
env
:
-
TRAVIS_SUDO=sudo
-
os
:
linux
sudo
:
required
python
:
2.7
env
:
-
TRAVIS_SUDO=sudo
-
SCAPY_USE_PCAPDNET=true
-
os
:
osx
language
:
generic
env
:
-
TRAVIS_SUDO=sudo
-
SCAPY_USE_PCAPDNET=true
install
:
install
:
bash .travis/install.sh
-
pip install pycrypto
script
:
cd test/; for f in *.uts; do ./run_tests -q -F -t $f -K netaccess || exit $?; done; for f in ../scapy/contrib/*.uts ; do ./run_tests -q -F -t $f -K netaccess -P "load_contrib('$(basename ${f/.uts})')" || exit $?; done
script
:
bash .travis/test.sh
This diff is collapsed.
Click to expand it.
.travis/install.sh
0 → 100644
+
23
−
0
View file @
6317ba08
# Install dependencies using pip
if
[
-z
$TRAVIS_SUDO
]
&&
[
"
$TRAVIS_OS_NAME
"
=
"osx"
]
then
PIP_INSTALL_FLAGS
=
"--user"
fi
$TRAVIS_SUDO
pip
install
$PIP_INSTALL_FLAGS
pycrypto mock
# Install pcap & dnet
if
[
!
-z
$SCAPY_USE_PCAPDNET
]
then
if
[
"
$TRAVIS_OS_NAME
"
=
"linux"
]
then
$TRAVIS_SUDO
apt-get
install
python-pcapy python-dumbnet
elif
[
"
$TRAVIS_OS_NAME
"
=
"osx"
]
then
mkdir
-p
/Users/travis/Library/Python/2.7/lib/python/site-packages
echo
'import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")'
>>
/Users/travis/Library/Python/2.7/lib/python/site-packages/homebrew.pth
brew update
brew
install
--with-python
libdnet
brew
install
.travis/pylibpcap.rb
fi
fi
This diff is collapsed.
Click to expand it.
.travis/pylibpcap.rb
0 → 100644
+
10
−
0
View file @
6317ba08
class
Pylibpcap
<
Formula
url
"http://downloads.sourceforge.net/project/pylibpcap/pylibpcap/0.6.4/pylibpcap-0.6.4.tar.gz"
homepage
"http://pylibpcap.sourceforge.net/"
sha256
"cfc365f2707a7986496acacf71789fef932a5ddbeaa36274cc8f9834831ca3b1"
def
install
system
"python"
,
*
Language
::
Python
.
setup_install_args
(
prefix
)
end
end
This diff is collapsed.
Click to expand it.
.travis/test.sh
0 → 100644
+
18
−
0
View file @
6317ba08
# Don't run tests that requires root privileges
if
[
-z
$TRAVIS_SUDO
]
then
UT_FLAGS
=
"-K netaccess"
fi
# Run unit tests
cd test
/
for
f
in
*
.uts
do
$TRAVIS_SUDO
./run_tests
-q
-F
-t
$f
$UT_FLAGS
||
exit
$?
done
for
f
in
../scapy/contrib/
*
.uts
do
$TRAVIS_SUDO
./run_tests
-q
-F
-t
$f
$UT_FLAGS
-P
"load_contrib('
$(
basename
${
f
/.uts
}
)
')"
||
exit
$?
done
This diff is collapsed.
Click to expand it.
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