author | Tom Henderson <tomh@tomh.org> |
Thu, 02 Jul 2009 21:57:00 -0700 | |
changeset 4646 | c25ca2e38845 |
parent 4130 | 9bddd87225a9 |
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 |
|
4114
a6c5ccfa3451
Run regression tests as WAF tasks, plus simplify how unit tests are declared. Closes #480.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3872
diff
changeset
|
5 |
import os.path |
3697
97c84e70a7db
Add python based csma-bridge regression test. Closes #344.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
6 |
|
4130
9bddd87225a9
Skip the NSC test when valgrind is enabled.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
4114
diff
changeset
|
7 |
def may_run(env, options): |
4114
a6c5ccfa3451
Run regression tests as WAF tasks, plus simplify how unit tests are declared. Closes #480.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3872
diff
changeset
|
8 |
"""Returns 0 when it can run, return non-zero or string (reason) when it cannot run""" |
a6c5ccfa3451
Run regression tests as WAF tasks, plus simplify how unit tests are declared. Closes #480.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3872
diff
changeset
|
9 |
if env['ENABLE_PYTHON_BINDINGS']: |
a6c5ccfa3451
Run regression tests as WAF tasks, plus simplify how unit tests are declared. Closes #480.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3872
diff
changeset
|
10 |
return 0 |
3697
97c84e70a7db
Add python based csma-bridge regression test. Closes #344.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff
changeset
|
11 |
else: |
4114
a6c5ccfa3451
Run regression tests as WAF tasks, plus simplify how unit tests are declared. Closes #480.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3872
diff
changeset
|
12 |
return "Python bindings not available." |
a6c5ccfa3451
Run regression tests as WAF tasks, plus simplify how unit tests are declared. Closes #480.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3872
diff
changeset
|
13 |
|
a6c5ccfa3451
Run regression tests as WAF tasks, plus simplify how unit tests are declared. Closes #480.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3872
diff
changeset
|
14 |
pyscript = os.path.join('examples', 'csma-bridge.py') |