Skip to content

[ci] Cppyy tests - fix pytest failing #233

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
Apr 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 6 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -889,6 +889,9 @@ jobs:
sudo apt install git g++ debhelper devscripts gnupg python3 valgrind
sudo apt autoremove
sudo apt clean
# Install libraries used by the cppyy test suite
sudo apt install libeigen3-dev
sudo apt install libboost-all-dev

- name: Install deps on MacOS
if: runner.os == 'macOS'
Expand All @@ -900,6 +903,8 @@ jobs:
brew link --overwrite "$pkg"
done
brew upgrade
brew install eigen
brew install boost
pip install distro pytest

- name: Restore Cache LLVM/Clang runtime build directory
Expand Down Expand Up @@ -1156,9 +1161,6 @@ jobs:
continue-on-error: true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maximusron Maybe worth removing this line as part of this PR, so its clearer when this PR is a sucess without consulting the ci output.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's probably a good idea.

Copy link
Collaborator Author

@aaronj0 aaronj0 Apr 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will probably error out very fast, even if everything runs smoothly because the failing cppyy tests output stderr to the console.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, let's do that in a separate PR then..

if: ${{ (runner.os != 'windows') && (matrix.cppyy == 'On') && (matrix.xeus-clang-repl != 'On') }}
run: |
# Install libraries used by the cppyy test suite
sudo apt install libeigen3-dev
sudo apt install libboost-all-dev
# Run the tests
source .venv/bin/activate
cd cppyy/test
Expand All @@ -1170,23 +1172,7 @@ jobs:
python -m pip install numba
echo ::endgroup::
echo ::group::Run complete test suite
python -m pytest --tb=short -ra -sv> pytest_dump.log 2>&1 || :
last_line=$(tail -n 1 pytest_dump.log)
passed=$(echo "$last_line" | grep -oP "\d+ passed")
failed=$(echo "$last_line" | grep -oP "\d+ failed")
skipped=$(echo "$last_line" | grep -oP "\d+ skipped")
xpassed=$(echo "$last_line" | grep -oP "\d+ xpassed")
xfailed=$(echo "$last_line" | grep -oP "\d+ xfailed")
errors=$(echo "$last_line" | grep -oP "\d+ errors")
echo -e "\e[32mPASS: $passed\e[0m"
echo -e "\e[31mFAIL: $failed\e[0m"
echo -e "\e[33mSKIP: $skipped\e[0m"
echo -e "\e[33mXPASS: $xpassed\e[0m"
echo -e "\e[33mXFAIL: $xfailed\e[0m"
echo -e "\e[33mERRORS: $errors\e[0m"
echo ::endgroup::
echo "Cppyy Test Logs:"
tail -n1 pytest_dump.log
python -m pytest
echo ::group::Crashing Test Logs
# See if we don't have a crash that went away
# Comment out all xfails but the ones that have a run=False condition.
Expand Down
Loading