ci: Set date in LAVA DUTs from NTP servers
authorTomeu Vizoso <tomeu.vizoso@collabora.com>
Fri, 31 Jul 2020 04:51:47 +0000 (06:51 +0200)
committerTomeu Vizoso <tomeu.vizoso@collabora.com>
Fri, 31 Jul 2020 12:14:38 +0000 (14:14 +0200)
The MinIO server is sometimes complaining about the submitted date being
too off.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6135>

.gitlab-ci.yml
.gitlab-ci/create-rootfs.sh
.gitlab-ci/generate_lava.py
.gitlab-ci/lava-deqp.yml.jinja2
.gitlab-ci/lava-gitlab-ci.yml
.gitlab-ci/lava-tracie.yml.jinja2

index 7f4e269742a61031d9fe4a066f722d527b57074b..144b541bf6bec3f530202d895c8ecde33f5addba 100644 (file)
@@ -355,7 +355,7 @@ arm64_test:
   extends:
     - .use-arm_test-base
   variables:
-    FDO_DISTRIBUTION_TAG: &arm64_test "2020-07-28-libdrm"
+    FDO_DISTRIBUTION_TAG: &arm64_test "2020-07-31-ntp"
 
 .use-arm64_test:
   variables:
index 4f4609ed4c6cc37c8e35720452b0451f2a52af0b..fdb1f587f367bed91e8fb9f43cb2a95ead4b9498 100644 (file)
@@ -41,6 +41,7 @@ apt-get -y install --no-install-recommends \
     python3-pytest \
     python3-requests \
     python3-yaml \
+    sntp \
     wget \
     xz-utils
 
index 6f887c5f90bf16689285e9ed675dfaaff1e06b5c..66b898841f4439b58ac8edc42f79b4df9fb427df 100755 (executable)
@@ -43,10 +43,6 @@ values['tags'] = args.lava_tags
 values['env_vars'] = env_vars
 values['deqp_version'] = args.deqp_version
 
-# We need a sane date to check certificates, but don't want to wait to get
-# time from the network after boot.
-values['date'] = datetime.datetime.now().strftime("%Y%m%d %H%M")
-
 f = open(os.path.splitext(os.path.basename(args.template))[0], "w")
 f.write(template.render(values))
 f.close()
index 639f1d1f40e88d38efdb7fd53f5d358ccbc19417..5ec39337b7324d2dd41d48e0c960b4951a9e478d 100644 (file)
@@ -73,7 +73,7 @@ actions:
           - mkdir -p /dev/pts
           - mount -t devpts devpts /dev/pts
           - echo "nameserver 8.8.8.8" > /etc/resolv.conf
-          - date "+%Y%m%d %H%M" -s "{{ date }}"
+          - for i in 1 2 3; do sntp -sS pool.ntp.org && break || sleep 2; done
 
 
 {% if env_vars %}
index 7501d09233cda728827fda6e3fae6b273e04601c..dd6b481050896a5b76604326d39f07b505eb31d1 100644 (file)
@@ -1,5 +1,5 @@
 variables:
-  DISTRIBUTION_TAG: "2020-07-28-x86"
+  DISTRIBUTION_TAG: "2020-07-31-ntp-2"
 
 .kernel+rootfs:
   stage: container-2
index 0811c6724fe70c36dcf1964f2824e5b6b3b6f476..d0109bc24688d50e620f4a8c9edd29c99346b1e6 100644 (file)
@@ -73,7 +73,7 @@ actions:
           - mkdir -p /dev/pts
           - mount -t devpts devpts /dev/pts
           - echo "nameserver 8.8.8.8" > /etc/resolv.conf
-          - date "+%Y%m%d %H%M" -s "{{ date }}"
+          - for i in 1 2 3; do sntp -sS pool.ntp.org && break || sleep 2; done
 
 
 {% if env_vars %}