diff options
author | John Wren Kennedy <[email protected]> | 2016-02-24 21:13:41 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2017-02-11 12:57:13 -0800 |
commit | 717afc132631155beae9b8da183a4734b859140d (patch) | |
tree | 107a16059645795a9f1cfe9d66ad61325643804c /tests | |
parent | d6df043c530e850e907a8391025c2989eb7a9949 (diff) |
OpenZFS 6642 - testrunner output can be displayed in the wrong order
6643 zfstest should enforce the required privileges before running.
Reviewed by: George Wilson <[email protected]>
Reviewed by: Jonathan Mackenzie <[email protected]>
Reviewed by: Yuri Pankov <[email protected]>
Approved by: Robert Mustacchi <[email protected]>
Reviewed-by: George Melikov <[email protected]>
Reviewed-by: Giuseppe Di Natale <[email protected]>
Reviewed by: John Kennedy <[email protected]>
Ported-by: Brian Behlendorf <[email protected]
OpenZFS-issue: https://www.illumos.org/issues/6642
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/412db4e
Closes #5777
Porting notes:
- The 6643 changes were dropped a different version of this script
is used to configure the environment under Linux.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/test-runner/cmd/test-runner.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/test-runner/cmd/test-runner.py b/tests/test-runner/cmd/test-runner.py index d7727e8d8..b0ef79aaf 100755 --- a/tests/test-runner/cmd/test-runner.py +++ b/tests/test-runner/cmd/test-runner.py @@ -12,7 +12,7 @@ # # -# Copyright (c) 2013 by Delphix. All rights reserved. +# Copyright (c) 2012, 2015 by Delphix. All rights reserved. # import ConfigParser @@ -272,8 +272,10 @@ class Cmd(object): else: logger.debug('%s%s%s' % (msga, pad, msgb)) - lines = self.result.stdout + self.result.stderr - for dt, line in sorted(lines): + lines = sorted(self.result.stdout + self.result.stderr, + cmp=lambda x, y: cmp(x[0], y[0])) + + for dt, line in lines: logger.debug('%s %s' % (dt.strftime("%H:%M:%S.%f ")[:11], line)) if len(self.result.stdout): @@ -286,7 +288,7 @@ class Cmd(object): os.write(err.fileno(), '%s\n' % line) if len(self.result.stdout) and len(self.result.stderr): with open(os.path.join(self.outputdir, 'merged'), 'w') as merged: - for _, line in sorted(lines): + for _, line in lines: os.write(merged.fileno(), '%s\n' % line) |