From: Nicholas Piggin <[email protected]>

Change to using a gitlab-ci test group instead of specifying all
tests in .gitlab-ci.yml, and adds a few additional tests (smp, atomics)
that are known to work in CI.

To control overhead, ppc64be is used to test 64k page size, ppc64le is
used to test 4k page size.

Signed-off-by: Nicholas Piggin <[email protected]>
Signed-off-by: Chinmay Rath <[email protected]>
---
 .gitlab-ci.yml        | 53 ++++++++-----------------------------------
 powerpc/unittests.cfg | 36 ++++++++++++++++++++++-------
 2 files changed, 37 insertions(+), 52 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index daccdfef..8608219d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -187,32 +187,15 @@ build-arm:
 build-ppc64be:
  extends: .outoftree_template
  script:
- - dnf install -y qemu-system-ppc gcc-powerpc64-linux-gnu nmap-ncat
+ - dnf install -y qemu-system-ppc gcc-powerpc64-linux-gnu
  - mkdir build
  - cd build
- - ../configure --arch=ppc64 --endian=big --cross-prefix=powerpc64-linux-gnu-
+ - ../configure --arch=ppc64 --endian=big --page-size=64k 
--cross-prefix=powerpc64-linux-gnu-
  - make -j2
- - ACCEL=tcg ./run_tests.sh
-      atomics
-      emulator
-      interrupts
-      mmu
-      rtas-get-time-of-day
-      rtas-get-time-of-day-base
-      rtas-set-time-of-day
-      selftest-migration
-      selftest-migration-skip
-      selftest-setup
-      sieve
-      smp
-      smp-smt
-      spapr_hcall
-      spapr_vpa
-      sprs
-      timebase
-      timebase-icount
-      | tee results.txt
- - if grep -q FAIL results.txt ; then exit 1 ; fi
+ - ACCEL=tcg MAX_SMP=8 ./run_tests.sh -g gitlab-ci
+   | tee results.txt
+ - grep -q PASS results.txt && ! grep -q FAIL results.txt
+
 
 build-ppc64le:
  extends: .intree_template
@@ -220,27 +203,9 @@ build-ppc64le:
  - dnf install -y qemu-system-ppc gcc-powerpc64-linux-gnu nmap-ncat
  - ./configure --arch=ppc64 --endian=little --cross-prefix=powerpc64-linux-gnu-
  - make -j2
- - ACCEL=tcg ./run_tests.sh
-      atomics
-      emulator
-      interrupts
-      mmu
-      rtas-get-time-of-day
-      rtas-get-time-of-day-base
-      rtas-set-time-of-day
-      selftest-migration
-      selftest-migration-skip
-      selftest-setup
-      sieve
-      smp
-      smp-smt
-      spapr_hcall
-      spapr_vpa
-      sprs
-      timebase
-      timebase-icount
-      | tee results.txt
- - if grep -q FAIL results.txt ; then exit 1 ; fi
+ - ACCEL=tcg MAX_SMP=8 ./run_tests.sh -g gitlab-ci
+   | tee results.txt
+ - grep -q PASS results.txt && ! grep -q FAIL results.txt
 
 build-riscv32:
  extends: .outoftree_template
diff --git a/powerpc/unittests.cfg b/powerpc/unittests.cfg
index 60c73086..168af206 100644
--- a/powerpc/unittests.cfg
+++ b/powerpc/unittests.cfg
@@ -17,17 +17,25 @@ file = selftest.elf
 smp = 2
 test_args = 'setup smp=2 mem=1024'
 qemu_params = -m 1g
-groups = selftest
+groups = selftest gitlab-ci
 
 [selftest-migration]
 file = selftest-migration.elf
 machine = pseries
 groups = selftest migration
 
+# make a kvm-only version for CI for now
+# TCG accel support with Qemu and distro release used in gitlab CI needs to 
checked.
+[selftest-migration-ci]
+file = selftest-migration.elf
+machine = pseries
+groups = nodefault selftest migration gitlab-ci
+accel = kvm
+
 [selftest-migration-skip]
 file = selftest-migration.elf
 machine = pseries
-groups = selftest migration
+groups = selftest migration gitlab-ci
 test_args = "skip"
 
 [migration-memory]
@@ -38,17 +46,19 @@ groups = migration
 [spapr_hcall]
 file = spapr_hcall.elf
 machine = pseries
+groups = gitlab-ci
 
 [spapr_vpa]
 file = spapr_vpa.elf
 machine = pseries
+groups = gitlab-ci
 
 [rtas-get-time-of-day]
 file = rtas.elf
 machine = pseries
 timeout = 5
 test_args = "get-time-of-day date=$(date +%s)"
-groups = rtas
+groups = rtas gitlab-ci
 
 [rtas-get-time-of-day-base]
 file = rtas.elf
@@ -56,35 +66,41 @@ machine = pseries
 timeout = 5
 test_args = "get-time-of-day date=$(date --date="2006-06-17 UTC" +%s)"
 qemu_params = -rtc base="2006-06-17"
-groups = rtas
+groups = rtas gitlab-ci
 
 [rtas-set-time-of-day]
 file = rtas.elf
 machine = pseries
 test_args = "set-time-of-day"
 timeout = 5
-groups = rtas
+groups = rtas gitlab-ci
 
 [emulator]
 file = emulator.elf
+groups = gitlab-ci
 
 [interrupts]
 file = interrupts.elf
+groups = gitlab-ci
 
 [mmu]
 file = mmu.elf
 smp = 2
+groups = gitlab-ci
 
 [pmu]
 file = pmu.elf
+groups = gitlab-ci
 
 [smp]
 file = smp.elf
 smp = 2
+groups = gitlab-ci
 
 [smp-smt]
 file = smp.elf
 smp = 8,threads=4
+groups = gitlab-ci
 
 # mttcg is the default most places, so add a thread=single test
 [smp-thread-single]
@@ -94,21 +110,23 @@ accel = tcg,thread=single
 
 [atomics]
 file = atomics.elf
-smp = 2
+groups = gitlab-ci
 
 [atomics-migration]
 file = atomics.elf
 machine = pseries
 test_args = "migration -m"
-groups = migration
+groups = migration gitlab-ci
 
 [timebase]
 file = timebase.elf
+groups = gitlab-ci
 
 [timebase-icount]
 file = timebase.elf
 accel = tcg
 qemu_params = -icount shift=5
+groups = gitlab-ci
 
 [h_cede_tm]
 file = tm.elf
@@ -121,12 +139,14 @@ groups = h_cede_tm
 
 [sprs]
 file = sprs.elf
+groups = gitlab-ci
 
 [sprs-migration]
 file = sprs.elf
 machine = pseries
 test_args = '-w'
-groups = migration
+groups = migration gitlab-ci
 
 [sieve]
 file = sieve.elf
+groups = gitlab-ci
-- 
2.53.0


Reply via email to