Skip to content

Commit

Permalink
Add analysis/tests and test all quick tests/ in travis
Browse files Browse the repository at this point in the history
All quick tests don't test QUIC
  • Loading branch information
francisyyan committed May 24, 2017
1 parent 3e5d565 commit ce7be9c
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 19 deletions.
13 changes: 7 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ install:

env:
matrix:
- CMD='./test/setup.py --schemes quic --install-deps &&
./test/setup.py --schemes quic --setup &&
./test/test.py local --schemes quic -t 10'
- CMD='test/setup.py --schemes quic --install-deps &&
test/setup.py --schemes quic --setup &&
test/test.py local --schemes quic -t 10'
- CMD='SCHEMES="default_tcp vegas ledbat pcc verus sprout webrtc
scream copa taova koho_cc calibrated_koho saturator" &&
./test/setup.py --schemes "$SCHEMES" --install-deps &&
./test/setup.py --schemes "$SCHEMES" --setup &&
./test/test.py local --schemes "$SCHEMES" -t 10'
test/setup.py --schemes "$SCHEMES" --install-deps &&
test/setup.py --schemes "$SCHEMES" --setup &&
test/tests/local_test.py &&
analysis/tests/test_analyze.py'

script:
- ./install_deps.py && eval $CMD
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ Pantheon tests can be run locally over an emulated link using

## Preparation
Many of the tools and programs run by the Pantheon are git submodules in the
`third_party` folder. To clone this repository, including submodules, run:
`third_party` folder. To clone this repository, run:

```
git clone --recursive https://github.com/StanfordSNR/pantheon.git
git clone https://github.com/StanfordSNR/pantheon.git
```

To add submodules after cloning, run:

```
git submodule update --init
git submodule update --init --recursive
```

## Dependencies
Expand Down
3 changes: 0 additions & 3 deletions analysis/.gitignore

This file was deleted.

1 change: 1 addition & 0 deletions analysis/tests/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
data
6 changes: 6 additions & 0 deletions analysis/tests/project_root.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import sys
import os
from os import path
DIR = path.abspath(path.join(path.dirname(path.abspath(__file__)),
os.pardir, os.pardir))
sys.path.append(DIR)
26 changes: 26 additions & 0 deletions analysis/tests/test_analyze.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env python

from os import path
import project_root
from helpers.helpers import check_call


def main():
curr_dir = path.abspath(path.dirname(__file__))
data_dir = path.join(curr_dir, 'data')

test_py = path.join(project_root.DIR, 'test', 'test.py')
analyze_py = path.join(project_root.DIR, 'analysis', 'analyze.py')

cmd = ['python', test_py, 'local', '--schemes',
'default_tcp vegas ledbat pcc verus sprout webrtc'
' scream copa taova koho_cc calibrated_koho saturator',
'-t', '10', '--data-dir', data_dir, '--pkill-cleanup']
assert call(cmd) == 0

cmd = ['python', analyze_py, '--data-dir', data_dir]
assert call(cmd) == 0


if __name__ == '__main__':
main()
12 changes: 6 additions & 6 deletions test/tests/local_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ def main():
assert call(cmd) == 0

cmd = ['python', test_py, 'local', '-t', '5', '-f', '1',
'--uplink-trace', data_trace, '--downlink-trace',
'--pkill-cleanup', ack_trace, '--schemes', '%s' % cc]
'--uplink-trace', data_trace, '--downlink-trace', ack_trace,
'--pkill-cleanup', '--schemes', '%s' % cc]
assert call(cmd) == 0

cmd = ['python', test_py, 'local', '-t', '5', '-f', '1',
Expand Down Expand Up @@ -50,13 +50,13 @@ def main():
cc = 'verus'

cmd = ['python', test_py, 'local', '-t', '5', '-f', '0',
'--uplink-trace', data_trace,
'--downlink-trace', ack_trace, '--schemes', '%s' % cc]
'--uplink-trace', data_trace, '--downlink-trace', ack_trace,
'--pkill-cleanup', '--schemes', '%s' % cc]
assert call(cmd) == 0

cmd = ['python', test_py, 'local', '-t', '5', '-f', '1',
'--uplink-trace', data_trace,
'--downlink-trace', ack_trace, '--schemes', '%s' % cc]
'--uplink-trace', data_trace, '--downlink-trace', ack_trace,
'--pkill-cleanup', '--schemes', '%s' % cc]
assert call(cmd) == 0


Expand Down
2 changes: 1 addition & 1 deletion test/tests/remote_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from os import path
import argparse
import project_root
from helpers.helpers import call
from helpers.helpers import check_call


def main():
Expand Down

0 comments on commit ce7be9c

Please sign in to comment.