#20 tests: add support for SCL-ized LLVM 13 (llvm-toolset-13.0)
Merged 9 months ago by sergesanspaille. Opened 10 months ago by happz.
rpms/ happz/python-lit tests-add-scl-support  into  rawhide

file modified
+18 -4
@@ -1,3 +1,15 @@ 

+ #

+ # Build/PR gating tests for *LLVM 13*

+ #

+ # Compatible with various LLVM 13 distributions:

+ #

+ #   * Fedora (ursine packages)

+ #   * Centos 9 stream (ursine packages)

+ #   * RHEL-9 (ursine packages)

+ #   * RHEL-8 (Red Hat module)

+ #   * RHEL-7 (software collection)

+ #

+ 

  summary: compiler-rt tests for build/PR gating

  adjust:

    - because: "Plan to be ran when either executed locally, or executed by CI system to gate a build or PR."
@@ -6,16 +18,18 @@ 

        and trigger != commit

        and trigger != build

      enabled: false

+ 

+   - because: "When testing SCL-ized LLVM, the collection must be enabled first"

+     environment+:

+       WITH_SCL: "scl enable llvm-toolset-13.0 rust-toolset-1.58"

+     when: "collection == llvm-toolset-13.0"

+ 

  discover:

      - name: python-lit-tests

        how: fmf

        filter: "tag:-spoils-installation"

  execute:

      how: tmt

- prepare:

-     - name: packages

-       how: install

-       package: python3-lit

  provision:

    hardware:

      memory: ">= 4 GiB"

file modified
+12 -3
@@ -1,4 +1,13 @@ 

  summary: Trivial sanity test

- test: lit --version

- require:

-   - python3-lit

+ test: "$WITH_SCL ./test.sh"

+ require: []

+ adjust:

+   # Common requirements when LLVM is not SCL-ized

+   - require+:

+       - python3-lit

+     when: "collection is not defined"

+ 

+   # Requirements for SCL-ized LLVM

+   - require+:

+       - llvm-toolset-13.0-python3-lit

+     when: "collection == llvm-toolset-13.0"

@@ -0,0 +1,3 @@ 

+ #! /bin/sh -eux

+ 

+ lit --version

no initial comment

Build succeeded.

Verified with various LLVM flavors. The fail on RHEL-7.9 is a genuine llvm-toolset bug (https://bugzilla.redhat.com/show_bug.cgi?id=2032259), not a broken test.

+ tmt --context distro=fedora-36 run -vv --all provision --how connect --guest xxx report
/var/tmp/tmt/run-029
Found 1 plan.

/tests/build-gating
summary: compiler-rt tests for build/PR gating
    discover
        how: fmf
        name: python-lit-tests
        directory: /home/mprchlik/git/packages/fedora/python-lit
        hash: 8d6a950
        filter: tag:-spoils-installation
        summary: 1 test selected
            /tests/sanity
    provision
        how: connect
        guest: xxx
        user: root
        key: not provided
        distro: Fedora Linux 36 (Rawhide Prerelease)
        kernel: 5.16.0-0.rc4.29.fc36.x86_64
        summary: 1 guest provisioned
    prepare
        how: install
        summary: Install required packages
        name: requires
        package: 1 package requested
            python3-lit
        summary: 1 preparation applied
    execute
        how: tmt
        exit-first: False
            test: Trivial sanity test
                00:00:04 /tests/sanity [1/1]
        summary: 1 test executed
    report
        how: display
            pass /tests/sanity
                output.txt: /var/tmp/tmt/run-029/tests/build-gating/execute/data/tests/sanity/output.txt
        summary: 1 test passed
    finish
        summary: 0 tasks completed

total: 1 test passed
+ tmt --context distro=rhel-9 run -vv --all provision --how connect --guest xxx report
/var/tmp/tmt/run-030
Found 1 plan.

/tests/build-gating
summary: compiler-rt tests for build/PR gating
    discover
        how: fmf
        name: python-lit-tests
        directory: /home/mprchlik/git/packages/fedora/python-lit
        hash: 8d6a950
        filter: tag:-spoils-installation
        summary: 1 test selected
            /tests/sanity
    provision
        how: connect
        guest: xxx
        user: root
        key: not provided
        distro: Red Hat Enterprise Linux 9.0 Beta (Plow)
        kernel: 5.14.0-24.el9.x86_64
        summary: 1 guest provisioned
    prepare
        how: install
        summary: Install required packages
        name: requires
        package: 1 package requested
            python3-lit
        summary: 1 preparation applied
    execute
        how: tmt
        exit-first: False
            test: Trivial sanity test
                00:00:04 /tests/sanity [1/1]
        summary: 1 test executed
    report
        how: display
            pass /tests/sanity
                output.txt: /var/tmp/tmt/run-030/tests/build-gating/execute/data/tests/sanity/output.txt
        summary: 1 test passed
    finish
        summary: 0 tasks completed

total: 1 test passed
+ tmt --context distro=rhel-8 run -vv --all provision --how connect --guest xxx report
/var/tmp/tmt/run-031
Found 1 plan.

/tests/build-gating
summary: compiler-rt tests for build/PR gating
    discover
        how: fmf
        name: python-lit-tests
        directory: /home/mprchlik/git/packages/fedora/python-lit
        hash: 8d6a950
        filter: tag:-spoils-installation
        summary: 1 test selected
            /tests/sanity
    provision
        how: connect
        guest: xxx
        user: root
        key: not provided
        distro: Red Hat Enterprise Linux 8.6 Beta (Ootpa)
        kernel: 4.18.0-353.el8.x86_64
        summary: 1 guest provisioned
    prepare
        how: install
        summary: Install required packages
        name: requires
        package: 1 package requested
            python3-lit
        summary: 1 preparation applied
    execute
        how: tmt
        exit-first: False
            test: Trivial sanity test
                00:00:04 /tests/sanity [1/1]
        summary: 1 test executed
    report
        how: display
            pass /tests/sanity
                output.txt: /var/tmp/tmt/run-031/tests/build-gating/execute/data/tests/sanity/output.txt
        summary: 1 test passed
    finish
        summary: 0 tasks completed

total: 1 test passed
+ tmt --context distro=rhel-7 --context collection=llvm-toolset-13.0 run -vv --all provision --how connect --guest xxx report
/var/tmp/tmt/run-032
Found 1 plan.

/tests/build-gating
summary: compiler-rt tests for build/PR gating
    discover
        how: fmf
        name: python-lit-tests
        directory: /home/mprchlik/git/packages/fedora/python-lit
        hash: 8d6a950
        filter: tag:-spoils-installation
        summary: 1 test selected
            /tests/sanity
    provision
        how: connect
        guest: xxx
        user: root
        key: not provided
        distro: Red Hat Enterprise Linux Server 7.9 (Maipo)
        kernel: 3.10.0-1160.45.1.el7.x86_64
        summary: 1 guest provisioned
    prepare
        how: install
        summary: Install required packages
        name: requires
        package: 1 package requested
            llvm-toolset-13.0-python3-lit
        summary: 1 preparation applied
    execute
        how: tmt
        exit-first: False
            test: Trivial sanity test
                00:00:04 /tests/sanity [1/1]
        summary: 1 test executed
    report
        how: display
            fail /tests/sanity
                output.txt: /var/tmp/tmt/run-032/tests/build-gating/execute/data/tests/sanity/output.txt
        summary: 1 test failed
    finish
        summary: 0 tasks completed

total: 1 test failed

rebased onto 34cd7bb

9 months ago

Pull-Request has been merged by sergesanspaille

9 months ago

Build succeeded.