Browse Source

On CI, use a tmpfs for ZUUL_TEST_ROOT

Profiling shows git operations take significant time. They are done in
sub directories of a temporary directory optionally set via environment
variable ZUUL_TEST_ROOT.

Set ZUUL_TEST_ROOT at the jobs level.
When set, have test-setup to create a tmpfs.

Change-Id: I7923448aed1543593ace2cd9458b6c1b3ea60737
tags/3.16.0
Antoine Musso 8 months ago
parent
commit
6eb3753dde
2 changed files with 26 additions and 0 deletions
  1. +20
    -0
      .zuul.yaml
  2. +6
    -0
      tools/test-setup.sh

+ 20
- 0
.zuul.yaml View File

@@ -199,12 +199,22 @@
- playbooks/zuul-migrate/.*
nodeset: ubuntu-xenial
timeout: 3600 # 60 minutes
vars:
test_setup_environment:
ZUUL_TEST_ROOT: /tmp/zuul-test
tox_environment:
ZUUL_TEST_ROOT: /tmp/zuul-test
- tox-py37:
irrelevant-files:
- zuul/cmd/migrate.py
- playbooks/zuul-migrate/.*
timeout: 3600 # 60 minutes
nodeset: ubuntu-bionic
vars:
test_setup_environment:
ZUUL_TEST_ROOT: /tmp/zuul-test
tox_environment:
ZUUL_TEST_ROOT: /tmp/zuul-test
- zuul-build-dashboard
- zuul-build-dashboard-multi-tenant
- nodejs-npm-run-lint:
@@ -245,12 +255,22 @@
- playbooks/zuul-migrate/.*
nodeset: ubuntu-xenial
timeout: 3600 # 60 minutes
vars:
test_setup_environment:
ZUUL_TEST_ROOT: /tmp/zuul-test
tox_environment:
ZUUL_TEST_ROOT: /tmp/zuul-test
- tox-py37:
irrelevant-files:
- zuul/cmd/migrate.py
- playbooks/zuul-migrate/.*
timeout: 3600 # 60 minutes
nodeset: ubuntu-bionic
vars:
test_setup_environment:
ZUUL_TEST_ROOT: /tmp/zuul-test
tox_environment:
ZUUL_TEST_ROOT: /tmp/zuul-test
- zuul-build-dashboard
- nodejs-npm-run-lint:
vars:


+ 6
- 0
tools/test-setup.sh View File

@@ -12,6 +12,12 @@ sudo service zookeeper stop
DATADIR=$(sed -n -e 's/^dataDir=//p' /etc/zookeeper/conf/zoo.cfg)
sudo mount -t tmpfs -o nodev,nosuid,size=500M none $DATADIR

# Prepare a tmpfs for Zuul test root
if [[ -n "${ZUUL_TEST_ROOT:-}" ]]; then
sudo mkdir -p "$ZUUL_TEST_ROOT"
sudo mount -t tmpfs -o noatime,nodev,nosuid,size=64M none "$ZUUL_TEST_ROOT"
fi

# Be sure mysql and zookeeper are started.
sudo service mysql start
sudo service postgresql start


Loading…
Cancel
Save