Migrate tests to tests/lldb repo

This commit is contained in:
Jesus Checa Hidalgo 2022-09-12 13:17:34 +02:00
parent f76054baa3
commit 37e9a4364b
10 changed files with 10 additions and 112 deletions

6
tests/README.md Normal file
View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -1,9 +0,0 @@
#include <stdio.h>
#include <vector>
int
main ()
{
std::vector<int> v (1, 2);
std::vector<int>::iterator it(v.begin());
return 0;
}

View File

@ -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<int, std::allocator<> >) $0 = size=1 {' \
-e '\[0\] = 2' \
lldb.log \
| wc -l` -eq 2
rm lldb.log

View File

@ -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"

View File

@ -1,9 +0,0 @@
#include <stdio.h>
#include <vector>
int
main ()
{
int i = 1;
float f = 1.0;
return 0;
}

View File

@ -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