diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-10-11 13:21:42 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-10-11 13:21:42 -0400 |
commit | f308adf8382bc7e61ea05a172057260cf8be9a6b (patch) | |
tree | 7355c13e09fc0ee1a5b6d8b5e56f5343588eaa65 /src/test/test_cmdline_args.py | |
parent | 187398318ef9b8b66e0f19ef031a847e8824e1d1 (diff) | |
download | tor-f308adf8382bc7e61ea05a172057260cf8be9a6b.tar.gz tor-f308adf8382bc7e61ea05a172057260cf8be9a6b.zip |
When possible, run the ntor python integration tests too
Diffstat (limited to 'src/test/test_cmdline_args.py')
-rwxr-xr-x | src/test/test_cmdline_args.py | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/test/test_cmdline_args.py b/src/test/test_cmdline_args.py index 5767a82d9b..1b0963f6b9 100755 --- a/src/test/test_cmdline_args.py +++ b/src/test/test_cmdline_args.py @@ -6,11 +6,20 @@ import os import re import shutil import subprocess +import sys import tempfile import unittest -TOR = "./src/or/tor-cov" -TOPDIR = "." +TOR = "./src/or/tor" +TOP_SRCDIR = "." + +if len(sys.argv) > 1: + TOR = sys.argv[1] + del sys.argv[1] + +if len(sys.argv) > 1: + TOP_SRCDIR = sys.argv[1] + del sys.argv[1] class UnexpectedSuccess(Exception): pass @@ -110,7 +119,7 @@ class CmdlineTests(unittest.TestCase): self.assertEquals(hashlib.sha1(inp).digest(), hashed) def test_digests(self): - main_c = os.path.join(TOPDIR, "src", "or", "main.c") + main_c = os.path.join(TOP_SRCDIR, "src", "or", "main.c") if os.stat(TOR).st_mtime < os.stat(main_c).st_mtime: self.skipTest(TOR+" not up to date") |