aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2020-09-12 02:57:18 +0530
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2020-09-11 23:27:15 +0000
commit1945f381b21efb40ca1411c0ffb6ea76dd835e27 (patch)
tree11764c95b70be669b70a22a905961da6112b7b46
parentc7adeac137a41dcf7187a11259cdabd190ea9c47 (diff)
downloadmeson-1945f381b21efb40ca1411c0ffb6ea76dd835e27.zip
meson-1945f381b21efb40ca1411c0ffb6ea76dd835e27.tar.gz
meson-1945f381b21efb40ca1411c0ffb6ea76dd835e27.tar.bz2
unit tests: Print total time taken for running tests
-rwxr-xr-xrun_unittests.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/run_unittests.py b/run_unittests.py
index bace349..5524c9e 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-import typing as T
+import time
import stat
import subprocess
import re
@@ -9052,4 +9052,8 @@ def main():
if __name__ == '__main__':
print('Meson build system', mesonbuild.coredata.version, 'Unit Tests')
- raise SystemExit(main())
+ start = time.monotonic()
+ try:
+ raise SystemExit(main())
+ finally:
+ print('Total time: {:.3f} seconds'.format(time.monotonic() - start))