- optparser.error('program must be specified')
-
- test = TestCase(
- name = os.path.basename(args[0]),
- args = args,
- cwd = options.cwd,
- build = options.build,
- results = options.results,
- )
+ optparser.error('an argument must be specified')
+
+ if not os.path.exists(options.results):
+ os.makedirs(options.results)
+
+ test = TestCase()
+
+ if args[0].endswith('.trace'):
+ test.trace_file = args[0]
+ else:
+ test.cmd = args
+ test.cwd = options.cwd