help="run tests under valgrind")
p.add_argument('params', nargs='*')
args = p.parse_args()
+
+ dir = os.environ.get('HWSIM_TEST_LOG_DIR', '/tmp/hwsim-test-logs')
+ try:
+ os.makedirs(dir)
+ except:
+ pass
+
num_servers = args.num_servers
rerun_failures = not args.no_retry
if args.debug:
extra_args += [ '--long' ]
if args.codecov:
print "Code coverage - build separate binaries"
- logdir = "/tmp/hwsim-test-logs/" + str(timestamp)
+ logdir = os.path.join(dir, str(timestamp))
os.makedirs(logdir)
subprocess.check_call([os.path.join(scriptsdir, 'build-codecov.sh'),
logdir])
if len(tests) == 0:
sys.exit("No test cases selected")
- dir = '/tmp/hwsim-test-logs'
- try:
- os.mkdir(dir)
- except:
- pass
-
if args.shuffle:
from random import shuffle
shuffle(tests)
fi
shift
-LOGS=/tmp/hwsim-test-logs
+if [ -n "$HWSIM_TEST_LOG_DIR" ] ; then
+ LOGS="$HWSIM_TEST_LOG_DIR"
+else
+ LOGS=/tmp/hwsim-test-logs
+fi
mkdir -p $LOGS
DATE=$(date +%s)
TESTDIR=$(pwd)/../
fi
-LOGS=/tmp/hwsim-test-logs
+if [ -n "$HWSIM_TEST_LOG_DIR" ] ; then
+ LOGS="$HWSIM_TEST_LOG_DIR"
+else
+ LOGS=/tmp/hwsim-test-logs
+fi
# increase the memory size if you want to run with valgrind, 512 MB works
MEMORY=192