From 37e9a4364bef72fd1456d188637ac4421d1ab922 Mon Sep 17 00:00:00 2001 From: Jesus Checa Hidalgo Date: Mon, 12 Sep 2022 13:17:34 +0200 Subject: [PATCH] Migrate tests to tests/lldb repo --- tests/README.md | 6 ++++++ tests/build-gating.fmf | 6 ++++-- tests/lldb-dwz/main.fmf | 17 --------------- tests/lldb-dwz/test.sh | 9 -------- tests/lldb-std-vector-prettyprint/main.fmf | 10 --------- tests/lldb-std-vector-prettyprint/test.cpp | 9 -------- tests/lldb-std-vector-prettyprint/test.sh | 13 ------------ tests/python-embedded-interpreter/main.fmf | 24 ---------------------- tests/python-embedded-interpreter/test.cpp | 9 -------- tests/python-embedded-interpreter/test.sh | 19 ----------------- 10 files changed, 10 insertions(+), 112 deletions(-) create mode 100644 tests/README.md delete mode 100644 tests/lldb-dwz/main.fmf delete mode 100755 tests/lldb-dwz/test.sh delete mode 100644 tests/lldb-std-vector-prettyprint/main.fmf delete mode 100644 tests/lldb-std-vector-prettyprint/test.cpp delete mode 100755 tests/lldb-std-vector-prettyprint/test.sh delete mode 100644 tests/python-embedded-interpreter/main.fmf delete mode 100644 tests/python-embedded-interpreter/test.cpp delete mode 100755 tests/python-embedded-interpreter/test.sh diff --git a/tests/README.md b/tests/README.md new file mode 100644 index 0000000..9ae51d5 --- /dev/null +++ b/tests/README.md @@ -0,0 +1,6 @@ +# Gating testplans for lldb + +The tests for lldb are in a separate repo: https://src.fedoraproject.org/tests/lldb +This directory should contain only fmf plans (such as build-gating.fmf) which import +the tests from the tests repo. This can be done using the "url" parameter of the +plan's "discover" step. Reference: https://tmt.readthedocs.io/en/stable/spec/plans.html#fmf diff --git a/tests/build-gating.fmf b/tests/build-gating.fmf index 5d88abc..ed38b0a 100644 --- a/tests/build-gating.fmf +++ b/tests/build-gating.fmf @@ -31,10 +31,12 @@ adjust: discover: - name: lldb-tests how: fmf + url: https://src.fedoraproject.org/tests/lldb.git + ref: main - name: upstream-llvm-integration-testsuite how: fmf - url: https://src.fedoraproject.org/rpms/llvm.git - ref: rawhide + url: https://src.fedoraproject.org/tests/llvm.git + ref: main test: integration-test-suite execute: how: tmt diff --git a/tests/lldb-dwz/main.fmf b/tests/lldb-dwz/main.fmf deleted file mode 100644 index 5105d08..0000000 --- a/tests/lldb-dwz/main.fmf +++ /dev/null @@ -1,17 +0,0 @@ -summary: "Test that lldb doesn't crash with dwz debuginfo" -test: "$WITH_SCL ./test.sh" -require: - - coreutils-debuginfo -adjust: - # Common requirements when LLVM is not SCL-ized - - require+: - - lldb - when: "collection is not defined" - - # Requirements for SCL-ized LLVM - - require+: - - llvm-toolset-13.0-lldb - when: "collection == llvm-toolset-13.0" - - require+: - - llvm-toolset-14.0-lldb - when: "collection == llvm-toolset-14.0" diff --git a/tests/lldb-dwz/test.sh b/tests/lldb-dwz/test.sh deleted file mode 100755 index d9f8a31..0000000 --- a/tests/lldb-dwz/test.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -eux - -lldb -b -o 'b main' -o run -o c -- true 2>&1 | tee lldb.log - -# lldb should report unsupported dwarf data, yet shouldn't crash -grep "unsupported DW_FORM values" lldb.log -grep "stop reason = breakpoint" lldb.log -# Ensure the process ends successfully (no crashes) -grep -E "Process [0-9]+ exited with status = 0" lldb.log diff --git a/tests/lldb-std-vector-prettyprint/main.fmf b/tests/lldb-std-vector-prettyprint/main.fmf deleted file mode 100644 index b76414a..0000000 --- a/tests/lldb-std-vector-prettyprint/main.fmf +++ /dev/null @@ -1,10 +0,0 @@ -summary: "Test lldb std::vector pretty printer" -test: "$WITH_SCL ./test.sh" -require: - - gcc-c++ - - lldb -adjust: - # rhbz#2077932 rhbz#2082508 - - because: "std::vector pretty printer does not work properly in RHEL<9 due to older libstdc++" - enabled: false - when: distro < rhel-9 \ No newline at end of file diff --git a/tests/lldb-std-vector-prettyprint/test.cpp b/tests/lldb-std-vector-prettyprint/test.cpp deleted file mode 100644 index 397efa4..0000000 --- a/tests/lldb-std-vector-prettyprint/test.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include -#include -int -main () -{ - std::vector v (1, 2); - std::vector::iterator it(v.begin()); - return 0; -} diff --git a/tests/lldb-std-vector-prettyprint/test.sh b/tests/lldb-std-vector-prettyprint/test.sh deleted file mode 100755 index c87edea..0000000 --- a/tests/lldb-std-vector-prettyprint/test.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -eux - -g++ -g test.cpp - -lldb -b -o 'breakpoint set --file test.cpp --line 7' -o run -o 'p v' -- a.out | tee lldb.log - -test `grep \ - -e '(std::vector >) $0 = size=1 {' \ - -e '\[0\] = 2' \ - lldb.log \ - | wc -l` -eq 2 - -rm lldb.log diff --git a/tests/python-embedded-interpreter/main.fmf b/tests/python-embedded-interpreter/main.fmf deleted file mode 100644 index 94c8a46..0000000 --- a/tests/python-embedded-interpreter/main.fmf +++ /dev/null @@ -1,24 +0,0 @@ -summary: "Test lldb embedded interpreter (rhbz#1567262)" -description: "Ensure that lldb depends on python3-lldb" -test: "$WITH_SCL ./test.sh" -require: - - gcc-c++ -adjust: - # Common requirements when LLVM is not SCL-ized - - require+: - - lldb - environment+: - LLDB_PACKAGE: lldb - when: "collection is not defined" - - # Requirements for SCL-ized LLVM - - require+: - - llvm-toolset-13.0-lldb - environment+: - LLDB_PACKAGE: llvm-toolset-13.0-lldb - when: "collection == llvm-toolset-13.0" - - require+: - - llvm-toolset-14.0-lldb - environment+: - LLDB_PACKAGE: llvm-toolset-14.0-lldb - when: "collection == llvm-toolset-14.0" diff --git a/tests/python-embedded-interpreter/test.cpp b/tests/python-embedded-interpreter/test.cpp deleted file mode 100644 index 78427c2..0000000 --- a/tests/python-embedded-interpreter/test.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include -#include -int -main () -{ - int i = 1; - float f = 1.0; - return 0; -} diff --git a/tests/python-embedded-interpreter/test.sh b/tests/python-embedded-interpreter/test.sh deleted file mode 100755 index 52b42e4..0000000 --- a/tests/python-embedded-interpreter/test.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -eux - -# Verify the formal side of things, lldb should really depend on its Python bits. -rpm -q --requires "$LLDB_PACKAGE" | grep python3-lldb - -# Sanity test -g++ -g test.cpp - -lldb -b -o 'breakpoint set --file test.cpp --line 9' \ - -o run -o 'p i' -o 'p f'\ - -- a.out | tee lldb.log - -test `grep \ - -e '(int) $0 = 1' \ - -e '(float) $1 = 1' \ - lldb.log \ - | wc -l` -eq 2 - -rm lldb.log