Lines Matching +full:post +full:-
2 # SPDX-License-Identifier: CDDL-1.0
69 return t.tv_sec + t.tv_nsec * 1e-9
90 m, s = divmod(monotonic_time() - self.starttime, 60)
168 The timeout for tests is measured in wall-clock time
195 signal = '-TERM'
208 If this is not a user-initiated kill and the test has not been
214 runtime = monotonic_time() - self.result.starttime
250 ret = '%s -E -u %s %s %s' % (SUDO, user, tmpdirarg, cmd)
301 kp = Popen([SUDO, "sh", "-c",
313 kp = Popen([SUDO, "sh", "-c",
322 cmd = f'{SUDO} sh -c "echo clear > {KMEMLEAK_FILE}"'
341 cmd = f'{SUDO} sh -c "echo scan > {KMEMLEAK_FILE}"'
363 m, s = divmod(monotonic_time() - self.result.starttime, 60)
385 pad = ' ' * (80 - (len(msga) + len(msgb)))
388 # The result line is always written to the log file. If -q was
392 write_log(bytearray(result_line, encoding='utf-8'), LOG_FILE)
405 encoding='utf-8')
427 props = ['outputdir', 'timeout', 'user', 'pre', 'pre_user', 'post',
431 pre=None, pre_user=None, post=None, post_user=None, argument
436 self.post = post or ''
457 Post: %s%s
461 self.pre, pre_user, self.post, post_user, self.failsafe,
466 Check the pre/post/failsafe scripts, user and Test. Omit the Test from
469 files = [self.pre, self.pathname, self.post, self.failsafe]
488 Create Cmd instances for the pre/post/failsafe scripts. If the pre
489 script doesn't pass, skip this Test. Run the post script regardless.
502 odir = os.path.join(self.outputdir, os.path.basename(self.post))
503 posttest = Cmd(self.post, identifier=self.identifier, outputdir=odir,
550 Post: %s%s
554 self.timeout, self.user, self.pre, pre_user, self.post, post_user,
562 Check the pre/post/failsafe scripts, user and tests in this TestGroup.
566 # If the pre/post/failsafe scripts are relative pathnames, convert to
570 if len(self.post) and not os.path.isabs(self.post):
571 self.post = os.path.join(self.pathname, self.post)
573 self.post = os.path.join(self.pathname, self.post)
575 auxfiles = [self.pre, self.post, self.failsafe]
609 Create Cmd instances for the pre/post/failsafe scripts. If the pre
611 post script regardless. Run the failsafe script when a test is killed.
620 odir = os.path.join(self.outputdir, os.path.basename(self.post))
621 posttest = Cmd(self.post, outputdir=odir, timeout=self.timeout,
670 ('post', ''),
712 # Prevent pre/post/failsafe scripts from running as regular tests
713 for f in [testgroup.pre, testgroup.post, testgroup.failsafe]:
751 failed = options.runfiles - set(parsed)
868 contain files in one directory. Pre and post tests will create a
895 uniq = path.split('/', cut)[-1]
937 cmd = f'{SUDO} -c "echo scan=0 > {KMEMLEAK_FILE}"'
957 m, s = divmod(time() - self.starttime, 60)
984 os.write(sys.stdout.fileno(), bytearray(msg, encoding='utf-8'))
986 os.write(sys.stderr.fileno(), bytearray(msg, encoding='utf-8'))
1013 testcmd = [SUDO, '-n', '-u', user, TRUE]
1113 parser.add_option('-c', action='callback', callback=options_cb,
1116 parser.add_option('-d', action='store_true', default=False, dest='dryrun',
1118 parser.add_option('-D', action='store_true', default=False, dest='debug',
1120 parser.add_option('-l', action='callback', callback=options_cb,
1123 help='Read logfile and re-run tests which failed.')
1124 parser.add_option('-g', action='store_true', default=False,
1126 parser.add_option('-o', action='callback', callback=options_cb,
1129 parser.add_option('-i', action='callback', callback=options_cb,
1132 parser.add_option('-K', action='store_true', default=False, dest='kmsg',
1134 parser.add_option('-m', action='callback', callback=kmemleak_cb,
1137 parser.add_option('-p', action='callback', callback=options_cb,
1140 parser.add_option('-P', action='callback', callback=options_cb,
1141 default='', dest='post', metavar='script',
1142 type='string', help='Specify a post script.')
1143 parser.add_option('-q', action='store_true', default=False, dest='quiet',
1145 parser.add_option('-s', action='callback', callback=options_cb,
1148 parser.add_option('-S', action='callback', callback=options_cb,
1152 parser.add_option('-t', action='callback', callback=options_cb, default=60,
1155 parser.add_option('-u', action='callback', callback=options_cb,
1158 parser.add_option('-w', action='callback', callback=options_cb,
1161 parser.add_option('-x', action='callback', callback=options_cb, default='',
1164 parser.add_option('-X', action='callback', callback=options_cb, default='',
1166 help='Specify a user to execute the post script.')
1167 parser.add_option('-T', action='callback', callback=options_cb, default='',
1170 parser.add_option('-I', action='callback', callback=options_cb, default=1,