Skip to content

Commit

Permalink
For testware residing in test_dir transfer it to system under test
Browse files Browse the repository at this point in the history
If test_dir is specified and we find tests there tar them to SUT.

Signed-off-by: Julius Gawlas <[email protected]>
  • Loading branch information
Julius Gawlas authored and lmr committed Oct 30, 2012
1 parent 831d27e commit 87e696d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion server/autotest_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,13 @@ def _send_tarball(self, pkg_name, remote_dest):
name, pkg_type = self.job.pkgmgr.parse_tarball_name(pkg_name)
src_dirs = []
if pkg_type == 'test':
for test_dir in ['site_tests', 'tests']:
test_dirs = ['site_tests', 'tests']
# if test_dir is defined in global config
# package the tests from there (if exists)
global_config_test_dirs = get_value('COMMON', 'test_dir', default="")
if global_config_test_dirs:
test_dirs = global_config_test_dirs.strip().split(',') + test_dirs
for test_dir in test_dirs:
src_dir = os.path.join(self.job.clientdir, test_dir, name)
if os.path.exists(src_dir):
src_dirs += [src_dir]
Expand Down

0 comments on commit 87e696d

Please sign in to comment.