
27 Feb
2015
27 Feb
'15
10:24 a.m.
# HG changeset patch # User Zach Welch zach@mandolincreekfarm.com # Fake Node ID ec876b2c27ad8f72d1881fe505edcb8985c693ec
Allow run_tests to be run from anywhere (#2343)
Find the path to run_tests, then chdir into the tests directory.
diff --git a/tests/run_tests b/tests/run_tests index 0c3b15b..2dae5e5 100755 --- a/tests/run_tests +++ b/tests/run_tests @@ -19,7 +19,10 @@ import traceback, sys, os, shutil, glob, tempfile, time from optparse import OptionParser from serial import Serial
-# Assume we're running in the tests/ directory of the archive +# change to the tests directory +scriptdir = os.path.dirname(sys.argv[0]) +os.chdir(scriptdir) + sys.path.insert(0, "../")
from chirp import CHIRP_VERSION