Skip to content
Snippets Groups Projects
Commit 8c46be69 authored by Simon McVittie's avatar Simon McVittie
Browse files

tests: Time how long is taken for various aspects of containers test

parent 2c3d19e9
No related branches found
No related tags found
1 merge request!322Update populate-depot.py
...@@ -321,7 +321,7 @@ relocatable-install:production: ...@@ -321,7 +321,7 @@ relocatable-install:production:
- _build/production/pressure-vessel-bin+src.tar.gz - _build/production/pressure-vessel-bin+src.tar.gz
when: on_success when: on_success
.i386_dependencies: &i386_dependencies .test_dependencies: &test_dependencies
- | - |
set -eux set -eux
...@@ -331,6 +331,7 @@ relocatable-install:production: ...@@ -331,6 +331,7 @@ relocatable-install:production:
apt-get -y --no-install-recommends install \ apt-get -y --no-install-recommends install \
libc6-i386 \ libc6-i386 \
libgl1-mesa-dri:i386 \ libgl1-mesa-dri:i386 \
time \
${NULL+} ${NULL+}
.test_template: .test_template:
...@@ -354,8 +355,8 @@ test:debian-10: ...@@ -354,8 +355,8 @@ test:debian-10:
extends: .test_template extends: .test_template
image: debian:buster-slim image: debian:buster-slim
script: script:
- *test_dependencies
- ./tests/pressure-vessel/prepare-test-depots.sh - ./tests/pressure-vessel/prepare-test-depots.sh
- *i386_dependencies
- | - |
set -eux set -eux
...@@ -367,8 +368,8 @@ test:ubuntu-18.04: ...@@ -367,8 +368,8 @@ test:ubuntu-18.04:
extends: .test_template extends: .test_template
image: ubuntu:18.04 image: ubuntu:18.04
script: script:
- *test_dependencies
- ./tests/pressure-vessel/prepare-test-depots.sh - ./tests/pressure-vessel/prepare-test-depots.sh
- *i386_dependencies
- | - |
set -eux set -eux
...@@ -380,8 +381,8 @@ test:ubuntu-20.04: ...@@ -380,8 +381,8 @@ test:ubuntu-20.04:
extends: .test_template extends: .test_template
image: ubuntu:20.04 image: ubuntu:20.04
script: script:
- *test_dependencies
- ./tests/pressure-vessel/prepare-test-depots.sh - ./tests/pressure-vessel/prepare-test-depots.sh
- *i386_dependencies
- | - |
set -eux set -eux
......
...@@ -93,6 +93,7 @@ import shutil ...@@ -93,6 +93,7 @@ import shutil
import struct import struct
import sys import sys
import tempfile import tempfile
import time
import unittest import unittest
try: try:
...@@ -524,6 +525,9 @@ class TestContainers(BaseTest): ...@@ -524,6 +525,9 @@ class TestContainers(BaseTest):
if not os.path.isdir(runtime): if not os.path.isdir(runtime):
self.skipTest('{} not found'.format(runtime)) self.skipTest('{} not found'.format(runtime))
start_time = time.time()
logger.info('Testing: %s', test_name)
artifacts = os.path.join( artifacts = os.path.join(
self.artifacts, self.artifacts,
test_name, test_name,
...@@ -829,6 +833,11 @@ class TestContainers(BaseTest): ...@@ -829,6 +833,11 @@ class TestContainers(BaseTest):
require_flag_file=require_flag_file, require_flag_file=require_flag_file,
) )
logger.info(
'Time elapsed in %s: %.1f',
test_name, time.time() - start_time,
)
def _assert_mutable_sysroot( def _assert_mutable_sysroot(
self, self,
tree: str, tree: str,
......
...@@ -25,7 +25,7 @@ else ...@@ -25,7 +25,7 @@ else
fi fi
for suite in $suites; do for suite in $suites; do
python3 ./pressure-vessel/populate-depot.py \ time python3 ./pressure-vessel/populate-depot.py \
--depot="$builddir/depots/$suite" \ --depot="$builddir/depots/$suite" \
--include-archives \ --include-archives \
--no-versioned-directories \ --no-versioned-directories \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment