'Wrap args with a path and send it back to autotest.'

def run(self, args, options):

    if (not len(args)):
        self.help()
    test = args.pop(0)
    if (not re.search('control', test)):
        test = (test + '/control')
    localdir = os.path.join(os.path.abspath(os.path.curdir), LOCALDIRTEST)
    fetchdir = FETCHDIRTEST
    globaldir = GLOBALDIRTEST
    autodir = os.environ['AUTODIRTEST']
    if ('CUSTOM_DIR' in os.environ):
        customtestdir = os.environ['CUSTOM_DIR']
    else:
        customtestdir = ''
    for dirtest in [localdir, fetchdir, globaldir, autodir, customtestdir]:
        if dirtest:
            d = os.path.join(dirtest, test)
            if os.path.isfile(d):
                args.insert(0, d)
                return args
    logging.error('Can    not    find    test    %s', test)
    raise SystemExit(1)
