author | Gustavo J. A. M. Carneiro <gjc@inescporto.pt> |
Wed, 19 Nov 2008 17:17:07 +0000 | |
changeset 3872 | 8e757a83fb36 |
parent 3697 | 97c84e70a7db |
child 4114 | a6c5ccfa3451 |
permissions | -rw-r--r-- |
3697
97c84e70a7db
Add python based csma-bridge regression test. Closes #344.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
1 |
#! /usr/bin/env python |
97c84e70a7db
Add python based csma-bridge regression test. Closes #344.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
2 |
|
97c84e70a7db
Add python based csma-bridge regression test. Closes #344.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
3 |
"""Generic trace-comparison-type regression test.""" |
97c84e70a7db
Add python based csma-bridge regression test. Closes #344.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
4 |
|
97c84e70a7db
Add python based csma-bridge regression test. Closes #344.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
5 |
import os |
97c84e70a7db
Add python based csma-bridge regression test. Closes #344.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
6 |
import sys |
97c84e70a7db
Add python based csma-bridge regression test. Closes #344.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
7 |
import tracediff |
97c84e70a7db
Add python based csma-bridge regression test. Closes #344.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
8 |
|
3872
8e757a83fb36
Add a --with-regression-traces configure option, to allow using externally supplied regression traces instead of fetching them from the network.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3697
diff
changeset
|
9 |
def run(verbose, generate): |
3697
97c84e70a7db
Add python based csma-bridge regression test. Closes #344.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
10 |
"""Execute a test.""" |
97c84e70a7db
Add python based csma-bridge regression test. Closes #344.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
11 |
if tracediff.env['ENABLE_PYTHON_BINDINGS']: |
3872
8e757a83fb36
Add a --with-regression-traces configure option, to allow using externally supplied regression traces instead of fetching them from the network.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3697
diff
changeset
|
12 |
return tracediff.run_test(verbose, generate, |
3697
97c84e70a7db
Add python based csma-bridge regression test. Closes #344.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
13 |
"csma-bridge", pyscript=os.path.join('examples', 'csma-bridge.py')) |
97c84e70a7db
Add python based csma-bridge regression test. Closes #344.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
14 |
else: |
97c84e70a7db
Add python based csma-bridge regression test. Closes #344.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
15 |
print >> sys.stderr, "Skipping csma-bridge: Python bindings not available." |
97c84e70a7db
Add python based csma-bridge regression test. Closes #344.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
16 |
raise NotImplementedError |