From 8881818dfbd831631c0d0e2479a27390b0d27e54 Mon Sep 17 00:00:00 2001
From: Eric Timmons <etimmons@mit.edu>
Date: Sat, 15 May 2021 11:44:59 -0400
Subject: [PATCH] Add REQUIRE upgrade tests to CI

The original upgrade tests were disabled by default for being too slow. They're
too slow because they test with a wide range of previous ASDF versions.

Add new tests that run only if the full upgrade test suite is not run. These
test upgrading only from the implementation provided ASDF. This is much faster
because than testing every old version. Plus, it matches the real world upgrade
conditions for the vast majority of users.

This catches #72.
---
 gitlab-ci.yml | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 96 insertions(+)

diff --git a/gitlab-ci.yml b/gitlab-ci.yml
index f989279f0..7502f1705 100644
--- a/gitlab-ci.yml
+++ b/gitlab-ci.yml
@@ -102,6 +102,15 @@ Build asdf-tools:
   rules:
     - if: $RUN_UPGRADE_TESTS
 
+.REQUIRE upgrade tests:
+  extends: .Upgrade tests
+  variables:
+    ASDF_UPGRADE_TEST_TAGS: REQUIRE
+  rules:
+    - if: $RUN_UPGRADE_TESTS
+      when: never
+    - when: on_success
+
 .Scripting regression tests:
   extends: .Regression tests
   before_script:
@@ -120,6 +129,15 @@ Build asdf-tools:
   rules:
     - if: $ENABLE_ASDF_TOOLS && $RUN_UPGRADE_TESTS
 
+.REQUIRE scripting upgrade tests:
+  extends: .Scripting upgrade tests
+  variables:
+    ASDF_UPGRADE_TEST_TAGS: REQUIRE
+  rules:
+    - if: $ENABLE_ASDF_TOOLS && $RUN_UPGRADE_TESTS
+      when: never
+    - if: $ENABLE_ASDF_TOOLS
+
 ###############################################################################
 # Actual test jobs - Makefile based harness
 ###############################################################################
@@ -145,6 +163,12 @@ ABCL upgrade tests:
   variables:
     l: abcl
 
+ABCL REQUIRE upgrade tests:
+  extends: .REQUIRE upgrade tests
+  image: $ABCL_IMAGE:$ABCL_TAG
+  variables:
+    l: abcl
+
 CCL regression tests:
   extends: .Regression tests
   image: $CCL_IMAGE:$CCL_TAG
@@ -157,6 +181,12 @@ CCL upgrade tests:
   variables:
     l: ccl
 
+CCL REQUIRE upgrade tests:
+  extends: .REQUIRE upgrade tests
+  image: $CCL_IMAGE:$CCL_TAG
+  variables:
+    l: ccl
+
 Clasp regression tests:
   extends: .Regression tests
   image: $CLASP_IMAGE:$CLASP_TAG
@@ -169,6 +199,12 @@ Clasp upgrade tests:
   variables:
     l: clasp
 
+Clasp REQUIRE upgrade tests:
+  extends: .REQUIRE upgrade tests
+  image: $CLASP_IMAGE:$CLASP_TAG
+  variables:
+    l: clasp
+
 CLISP regression tests:
   extends: .Regression tests
   image: $CLISP_IMAGE:$CLISP_TAG
@@ -181,6 +217,12 @@ CLISP upgrade tests:
   variables:
     l: clisp
 
+CLISP REQUIRE upgrade tests:
+  extends: .REQUIRE upgrade tests
+  image: $CLISP_IMAGE:$CLISP_TAG
+  variables:
+    l: clisp
+
 CMUCL regression tests:
   extends: .Regression tests
   image: $CMUCL_IMAGE:$CMUCL_TAG
@@ -193,6 +235,12 @@ CMUCL upgrade tests:
   variables:
     l: cmucl
 
+CMUCL REQUIRE upgrade tests:
+  extends: .REQUIRE upgrade tests
+  image: $CMUCL_IMAGE:$CMUCL_TAG
+  variables:
+    l: cmucl
+
 ECL regression tests:
   extends: .Regression tests
   image: $ECL_IMAGE:$ECL_TAG
@@ -205,6 +253,12 @@ ECL upgrade tests:
   variables:
     l: ecl
 
+ECL REQUIRE upgrade tests:
+  extends: .REQUIRE upgrade tests
+  image: $ECL_IMAGE:$ECL_TAG
+  variables:
+    l: ecl
+
 SBCL regression tests:
   extends: .Regression tests
   image: $SBCL_IMAGE:$SBCL_TAG
@@ -217,6 +271,12 @@ SBCL upgrade tests:
   variables:
     l: sbcl
 
+SBCL REQUIRE upgrade tests:
+  extends: .REQUIRE upgrade tests
+  image: $SBCL_IMAGE:$SBCL_TAG
+  variables:
+    l: sbcl
+
 
 ###############################################################################
 # Actual test jobs - lisp scripting based harness
@@ -234,6 +294,12 @@ ABCL scripting upgrade tests:
   variables:
     l: abcl
 
+ABCL REQUIRE scripting upgrade tests:
+  extends: .REQUIRE scripting upgrade tests
+  image: $ABCL_IMAGE:$ABCL_TAG
+  variables:
+    l: abcl
+
 CCL scripting regression tests:
   extends: .Scripting regression tests
   image: $CCL_IMAGE:$CCL_TAG
@@ -246,6 +312,12 @@ CCL scripting upgrade tests:
   variables:
     l: ccl
 
+CCL REQUIRE scripting upgrade tests:
+  extends: .REQUIRE scripting upgrade tests
+  image: $CCL_IMAGE:$CCL_TAG
+  variables:
+    l: ccl
+
 Clasp scripting regression tests:
   extends: .Scripting regression tests
   image: $CLASP_IMAGE:$CLASP_TAG
@@ -270,6 +342,12 @@ CLISP scripting upgrade tests:
   variables:
     l: clisp
 
+CLISP REQUIRE scripting upgrade tests:
+  extends: .REQUIRE scripting upgrade tests
+  image: $CLISP_IMAGE:$CLISP_TAG
+  variables:
+    l: clisp
+
 CMUCL scripting regression tests:
   extends: .Scripting regression tests
   image: $CMUCL_IMAGE:$CMUCL_TAG
@@ -282,6 +360,12 @@ CMUCL scripting upgrade tests:
   variables:
     l: cmucl
 
+CMUCL REQUIRE scripting upgrade tests:
+  extends: .REQUIRE scripting upgrade tests
+  image: $CMUCL_IMAGE:$CMUCL_TAG
+  variables:
+    l: cmucl
+
 ECL scripting regression tests:
   extends: .Scripting regression tests
   image: $ECL_IMAGE:$ECL_TAG
@@ -294,6 +378,12 @@ ECL scripting upgrade tests:
   variables:
     l: ecl
 
+ECL REQUIRE scripting upgrade tests:
+  extends: .REQUIRE scripting upgrade tests
+  image: $ECL_IMAGE:$ECL_TAG
+  variables:
+    l: ecl
+
 SBCL scripting regression tests:
   extends: .Scripting regression tests
   image: $SBCL_IMAGE:$SBCL_TAG
@@ -305,3 +395,9 @@ SBCL scripting upgrade tests:
   image: $SBCL_IMAGE:$SBCL_TAG
   variables:
     l: sbcl
+
+SBCL REQUIRE scripting upgrade tests:
+  extends: .REQUIRE scripting upgrade tests
+  image: $SBCL_IMAGE:$SBCL_TAG
+  variables:
+    l: sbcl
-- 
GitLab