From 70befc76497f0a501a814e28ce810cfe27bd0322 Mon Sep 17 00:00:00 2001 From: Max Tropets Date: Fri, 25 Oct 2024 13:41:39 +0000 Subject: [PATCH] WIP --- .github/workflows/ci.yml | 17 ++++++++++++++++- CMakeLists.txt | 16 +++++----------- tests/tests.sh | 16 ++-------------- 3 files changed, 23 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a3fa431d21..bca3fc3c730 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -115,7 +115,7 @@ jobs: # Dependencies tdnf -y install openssl-devel libuv-devel # Test dependencies - tdnf -y install libarrow-devel parquet-libs-devel + tdnf -y install libarrow-devel parquet-libs-devel lldb shell: bash - uses: actions/checkout@v4 @@ -131,3 +131,18 @@ jobs: CC=`which clang` CXX=`which clang++` cmake -GNinja -DCOMPILE_TARGET=virtual -DCMAKE_BUILD_TYPE=Debug -DLVI_MITIGATIONS=OFF -DUSE_LIBCXX=OFF .. ninja shell: bash + + - name: "Test virtual" + run: | + set -ex + cd build + rm -rf /github/home/.cache + mkdir -p /github/home/.cache + export ASAN_SYMBOLIZER_PATH=$(realpath /usr/bin/llvm-symbolizer-15) + # Unit tests + ./tests.sh --output-on-failure -L unit -j$(nproc --all) + # All other acceptably fast tests, mostly end-to-end + ./tests.sh --timeout 360 --output-on-failure -LE "benchmark|protocolstest|suite|unit" + # Partitions tests + ./tests.sh --timeout 240 --output-on-failure -L partitions -C partitions + shell: bash diff --git a/CMakeLists.txt b/CMakeLists.txt index 65992691c8b..2b82af8428a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -807,17 +807,11 @@ if(BUILD_TESTS) http_parser.host ) - add_unit_test( - endorsements_test - ${CMAKE_CURRENT_SOURCE_DIR}/src/node/test/endorsements.cpp - ) - set_property( - TEST endorsements_test - APPEND - PROPERTY - ENVIRONMENT - "TEST_ENDORSEMENTS_PATH=${CMAKE_CURRENT_SOURCE_DIR}/tests/uvm_endorsements" - ) + # add_unit_test( endorsements_test + # ${CMAKE_CURRENT_SOURCE_DIR}/src/node/test/endorsements.cpp ) set_property( + # TEST endorsements_test APPEND PROPERTY ENVIRONMENT + # "TEST_ENDORSEMENTS_PATH=${CMAKE_CURRENT_SOURCE_DIR}/tests/uvm_endorsements" + # ) add_unit_test( historical_queries_test diff --git a/tests/tests.sh b/tests/tests.sh index 6b5f09a6987..ac6969174cc 100755 --- a/tests/tests.sh +++ b/tests/tests.sh @@ -5,9 +5,8 @@ set -e echo "Setting up Python environment..." -if [ ! -f "env/bin/activate" ] - then - python3 -m venv env +if [ ! -f "env/bin/activate" ]; then + python3 -m venv env fi source env/bin/activate @@ -16,17 +15,6 @@ pip install -q -U -e ../python/ pip install -q -U -r ../tests/requirements.txt echo "Python environment successfully setup" -# We can delete it when -# lldb is included in the CI images -if ! command -v lldb; then - SUDO="" - if [ "$EUID" != 0 ]; then - SUDO="sudo" - fi - $SUDO apt update - $SUDO apt install -y lldb -fi - # Export where the VENV has been set, so tests running # a sandbox.sh can inherit it rather create a new one VENV_DIR=$(realpath env)