diff --git a/src/python/devtest/os/Environment.py b/src/python/devtest/os/Environment.py index efa3026..7450ea2 100644 --- a/src/python/devtest/os/Environment.py +++ b/src/python/devtest/os/Environment.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- from datetime import datetime +#import dateutil.parser from .Connections import Connections from jwutils import Options from jwutils.log import * @@ -14,7 +15,11 @@ class Environment: for ft in self.features: slog(INFO, " {}".format(ft)) self.cmd = cmd - self.time_stamp = datetime.now().strftime("%Y%m%d-%H%M%S") + fmt = "%Y%m%d-%H%M%S" + #self.time_stamp = (datetime.now() if args.time_stamp is None else dateutil.parser.parse(args.time_stamp)).strftime("%Y%m%d-%H%M%S") + self.time_stamp = (datetime.now() if args.time_stamp is None else datetime.strptime(args.time_stamp, fmt)).strftime(fmt) + self.tag = args.tag + slog(INFO, "Tag = {}\n".format(self.tag)) self.connections = Connections() for spec in args.connection: self.connections.append(spec) diff --git a/src/python/devtest/os/MachineCmd.py b/src/python/devtest/os/MachineCmd.py index 395d9df..e335383 100644 --- a/src/python/devtest/os/MachineCmd.py +++ b/src/python/devtest/os/MachineCmd.py @@ -19,6 +19,8 @@ class MachineCmd(jwutils.Cmd): # export p.add_argument( "--shutdown-timeout", help="Timeout for a machine to complete an ACPI shutdown request in ms", default=60000) p.add_argument( "--poweroff-timeout", help="Timeout for a machine to complete a poweroff request in ms", default=100) p.add_argument( "--features", help="Comma-separated list of features that are passed to the test cases for interpretation", default='') + p.add_argument( "--time-stamp", help="Time stamp used for output tagging and file names", default=None) + p.add_argument( "--tag", help="Tag used for output tagging and file names", default=None) # TODO: Don't pollute list of generic machine options with Qemu specific stuff p.add_argument("-R", "--root-part-number", help="Number of root partition (starting from 1)")