Skip to content

Commit

Permalink
CI: Check test with -j 1
Browse files Browse the repository at this point in the history
Try to find which test hangs in the CI.

Signed-off-by: Juergen Repp <[email protected]>
  • Loading branch information
JuergenReppSIT committed Mar 18, 2024
1 parent a516076 commit a352573
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 29 deletions.
49 changes: 25 additions & 24 deletions .ci/docker.run
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ if [ "$GEN_FUZZ" == "1" ]; then
./configure --with-fuzzing=libfuzzer --enable-tcti-fuzzing \
--disable-tcti-device --disable-tcti-mssim --disable-tcti-swtpm \
--disable-shared --with-crypto="$WITH_CRYPTO"
make -j$(nproc) check
make -j 2 check
exit 0
fi

Expand All @@ -57,7 +57,8 @@ echo "PWD: $(pwd)"
echo "ls -la ../ $(ls -la ../)"

../configure --with-crypto=$WITH_CRYPTO $CONFIGURE_OPTIONS
make -j$(nproc)
make prepare-check
make -j 2
popd

if [ "$WITH_CRYPTO" == "none" ]; then
Expand All @@ -80,23 +81,23 @@ if ldconfig -p 2>/dev/null| grep libasan > /dev/null && ldconfig -p 2>/dev/null|
fi

if [ "$SCANBUILD" == "yes" ]; then
scan-build --status-bugs ../configure --enable-unit --enable-self-generated-certificate --enable-integration --with-crypto=$WITH_CRYPTO $CONFIGURE_OPTIONS
scan-build --status-bugs ../configure --disable-unit --enable-self-generated-certificate --enable-integration --with-crypto=$WITH_CRYPTO $CONFIGURE_OPTIONS
elif [ "$CC" == "clang" ]; then
../configure --enable-unit --enable-self-generated-certificate --enable-integration --with-maxloglevel=none --with-crypto=$WITH_CRYPTO $CONFIGURE_OPTIONS
../configure --disable-unit --enable-self-generated-certificate --enable-integration --with-maxloglevel=none --with-crypto=$WITH_CRYPTO $CONFIGURE_OPTIONS
else
if [ "$WITH_TCTI" == "mssim" ]; then
../configure $SANITIZER_OPTION --disable-tcti-swtpm --enable-unit --enable-self-generated-certificate --enable-integration --with-crypto=$WITH_CRYPTO $CONFIGURE_OPTIONS
../configure $SANITIZER_OPTION --disable-tcti-swtpm --disable-unit --enable-self-generated-certificate --enable-integration --with-crypto=$WITH_CRYPTO $CONFIGURE_OPTIONS
else
../configure $SANITIZER_OPTION --with-maxloglevel=none --enable-debug=yes --enable-unit --enable-self-generated-certificate --enable-integration --with-crypto=$WITH_CRYPTO $CONFIGURE_OPTIONS
../configure $SANITIZER_OPTION --with-maxloglevel=none --enable-debug=yes --disable-unit --enable-self-generated-certificate --enable-integration --with-crypto=$WITH_CRYPTO $CONFIGURE_OPTIONS
fi
fi

if [ "$SCANBUILD" == "yes" ]; then
scan-build --status-bugs make -j
scan-build --status-bugs make -j 2
elif [ "$CC" == "clang" ]; then
make -j distcheck
make -j 2 distcheck
else
make -j check
make -j 2 check
fi

popd
Expand All @@ -107,35 +108,35 @@ pushd ./config_test
if [ "$CC" == "gcc" ]; then
# No TCTI - expect to fail
echo "========================== START TEST - NO TCTI =========================="
(../configure --disable-doxygen-doc --enable-unit --enable-self-generated-certificate --enable-integration --disable-tcti-swtpm --disable-tcti-mssim --disable-tcti-device && exit 1) || echo "failed as expected";
(../configure --disable-doxygen-doc --disable-unit --enable-self-generated-certificate --enable-integration --disable-tcti-swtpm --disable-tcti-mssim --disable-tcti-device && exit 1) || echo "failed as expected";
# only device TCTI
echo "========================== START TEST - device TCTI =========================="
mkdir -p ./dev/tpm0 && ../configure --disable-doxygen-doc --enable-unit --enable-self-generated-certificate --enable-integration --disable-tcti-swtpm --disable-tcti-mssim --enable-tcti-device --with-device=./dev/tpm0
make -j check TESTS="test/unit/tcti-device" && rm -rf ./dev
mkdir -p ./dev/tpm0 && ../configure --disable-doxygen-doc --disable-unit --enable-self-generated-certificate --enable-integration --disable-tcti-swtpm --disable-tcti-mssim --enable-tcti-device --with-device=./dev/tpm0
make -j 2 check TESTS="test/unit/tcti-device" && rm -rf ./dev
# only mssim TCTI
echo "========================== START TEST - mssim TCTI =========================="
../configure --disable-doxygen-doc --enable-unit --enable-self-generated-certificate --enable-integration --disable-tcti-swtpm --enable-tcti-mssim --disable-tcti-device
make -j check TESTS="test/unit/tcti-mssim"
../configure --disable-doxygen-doc --disable-unit --enable-self-generated-certificate --enable-integration --disable-tcti-swtpm --enable-tcti-mssim --disable-tcti-device
make -j 2 check TESTS="test/unit/tcti-mssim"
# device and mssim TCTIs
echo "========================== START TEST - mssim & device TCTI =========================="
../configure --disable-doxygen-doc --enable-unit --enable-self-generated-certificate --enable-integration --disable-tcti-swtpm --enable-tcti-mssim --enable-tcti-device
make -j check TESTS="test/unit/tcti-device test/unit/tcti-mssim"
../configure --disable-doxygen-doc --disable-unit --enable-self-generated-certificate --enable-integration --disable-tcti-swtpm --enable-tcti-mssim --enable-tcti-device
make -j 2 check TESTS="test/unit/tcti-device test/unit/tcti-mssim"
# only swtmp TCTI
echo "========================== START TEST - swtpm TCTI =========================="
../configure --disable-doxygen-doc --enable-unit --enable-self-generated-certificate --enable-integration --enable-tcti-swtpm --disable-tcti-mssim --disable-tcti-device
make -j check TESTS="test/unit/tcti-swtpm"
../configure --disable-doxygen-doc --disable-unit --enable-self-generated-certificate --enable-integration --enable-tcti-swtpm --disable-tcti-mssim --disable-tcti-device
make -j 2 check TESTS="test/unit/tcti-swtpm"
# swtmp and device TCTIs
echo "========================== START TEST - swtpm & device TCTI =========================="
../configure --disable-doxygen-doc --enable-unit --enable-self-generated-certificate --enable-integration --enable-tcti-swtpm --disable-tcti-mssim --enable-tcti-device
make -j check TESTS="test/unit/tcti-swtpm test/unit/tcti-device"
../configure --disable-doxygen-doc --disable-unit --enable-self-generated-certificate --enable-integration --enable-tcti-swtpm --disable-tcti-mssim --enable-tcti-device
make -j 2 check TESTS="test/unit/tcti-swtpm test/unit/tcti-device"
# swtmp and mssim TCTIs
echo "========================== START TEST - swtpm & mssim TCTI =========================="
../configure --disable-doxygen-doc --enable-unit --enable-self-generated-certificate --enable-integration --enable-tcti-swtpm --enable-tcti-mssim --disable-tcti-device
make -j check TESTS="test/unit/tcti-swtpm test/unit/tcti-mssim"
../configure --disable-doxygen-doc --disable-unit --enable-self-generated-certificate --enable-integration --enable-tcti-swtpm --enable-tcti-mssim --disable-tcti-device
make -j 2 check TESTS="test/unit/tcti-swtpm test/unit/tcti-mssim"
# all TCTIs
echo "========================== START TEST - swtpm & mssim & device TCTI =========================="
../configure --disable-doxygen-doc --enable-unit --enable-self-generated-certificate --enable-integration --enable-tcti-swtpm --enable-tcti-mssim --enable-tcti-device
make -j check TESTS="test/unit/tcti-swtpm test/unit/tcti-mssim test/unit/tcti-device"
../configure --disable-doxygen-doc --disable-unit --enable-self-generated-certificate --enable-integration --enable-tcti-swtpm --enable-tcti-mssim --enable-tcti-device
make -j 2 check TESTS="test/unit/tcti-swtpm test/unit/tcti-mssim test/unit/tcti-device"
fi # CC == gcc
popd
fi # TEST_TCTI_CONFIG
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ jobs:
if: "!contains(github.ref, 'coverity_scan')"
strategy:
matrix:
docker_image: [ubuntu-20.04, fedora-32, opensuse-leap, ubuntu-22.04, alpine-3.15]
compiler: [gcc, clang]
docker_image: [ubuntu-20.04 ]
compiler: [gcc ]
steps:
- name: Check out repository
uses: actions/checkout@v2
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
run: cat $(find ../ -name test-suite.log) || true
test-tcti-config:
runs-on: ubuntu-latest
if: "!contains(github.ref, 'coverity_scan')"
if: "contains(github.ref, 'coverity_scan')"
steps:
- name: Check out repository
uses: actions/checkout@v2
Expand All @@ -65,10 +65,10 @@ jobs:
run: cat $(find ../ -name test-suite.log) || true
test-mbedtls:
runs-on: ubuntu-latest
if: "!contains(github.ref, 'coverity_scan')"
if: "contains(github.ref, 'coverity_scan')"
strategy:
matrix:
docker_image: [ubuntu-20.04, ubuntu-22.04-mbedtls-3.1]
docker_image: [ubuntu-20.04 ]
steps:
- name: Check out repository
uses: actions/checkout@v2
Expand Down

0 comments on commit a352573

Please sign in to comment.