Index: testutils/ptest/README =================================================================== --- testutils/ptest/README +++ testutils/ptest/README @@ -30,12 +30,15 @@ == master_base_path == Path on localhost (master) where this script can build Hive, store reports, etc. This path should be available from every slave node and should point to the same -data (home on NFS would be a good choice). +data (home on NFS would be a good choice). If you specify `HIVE_PTEST_SUFFIX` +environmental variable the actual path used will be +`master_base_path-HIVE_PTEST_SUFFIX`. == host_base_path == Path on slaves where Hive repo will be cloned and tests will be run. '-your_user_name' will be actually appended to this path to allow parallel runs -by different users. +by different users. `HIVE_PTEST_SUFFIX` affects this path the same as it +affects `master_base_path`, and will be appended if needed. == java_home == Should point to Java environment that should be used. @@ -47,3 +50,15 @@ You shouldn't point this paths to your work repository or any directory that stores data you don't want to lose. This script might wipe everything under `master_base_path` and `host_base_path` as needed. + +== Example paths == +Assuming your user name is 'foo' and you are using example config defined above +this will be final paths used by the script. + +unset HIVE_PTEST_SUFFIX +master_base_path = /home/foo/hivetests +host_base_path = /mnt/drive/hivetests-foo + +export HIVE_PTEST_SUFFIX=second_run +master_base_path = /home/foo/hivetests-second_run +host_base_path = /mnt/drive/hivetests-foo-second_run Index: testutils/ptest/hivetest.py =================================================================== --- testutils/ptest/hivetest.py +++ testutils/ptest/hivetest.py @@ -23,6 +23,7 @@ import os.path import collections import re +import os import Report import config @@ -81,6 +82,11 @@ master_base_path = config.master_base_path host_base_path = config.host_base_path + if 'HIVE_PTEST_SUFFIX' in os.environ: + suffix = os.environ['HIVE_PTEST_SUFFIX'] + master_base_path += '-' + suffix + host_base_path += '-' + suffix + ant_path = master_base_path + '/apache-ant-1.8.2' arc_path = master_base_path + '/arcanist' phutil_path = master_base_path + '/libphutil'