'Prepares arguments and run functions to run_test and run_test_detail.
:param url A url that identifies the test to run.
:param tag An optional keyword argument that will be added to the
test and subdir name.
:param subdir_tag An optional keyword argument that will be added
to the subdir name.
:return:
subdir: Test subdirectory
testname: Test name
group_func: Actual test run function
timeout: Test timeout'

def _run_test_base(self, url, *args, **dargs):

    testname = self.pkgmgr.get_package_name(url, 'test')[1]
    (testname, subdir, tag) = self._build_tagged_test_name(testname, dargs)
    self._make_test_outputdir(subdir)
    timeout = dargs.pop('timeout', None)
    if timeout:
        logging.debug('Test    has    timeout:    %d    sec.', timeout)
    def log_warning(reason):
        self.record('WARN', subdir, testname, reason)
    @disk_usage_monitor.watch(log_warning, '/', self._max_disk_usage_rate)
    def group_func():
        try:
            self._runtest(url, tag, timeout, args, dargs)
        except error.TestBaseException as detail:
            self.record(detail.exit_status, subdir, testname, str(detail))
            raise
        else:
            self.record('GOOD', subdir, testname, 'completed    successfully')
    return (subdir, testname, group_func, timeout)
