2
0

run_tests.sh 864 B

123456789101112131415161718192021222324
  1. #!/bin/bash
  2. apt-get update && apt-get install -yq build-essential autotools-dev lsb-release pkg-config automake autoconf libtool-bin clang-tools-7
  3. apt-get install -yq cmake uuid-dev libssl-dev colorized-logs
  4. sed -i '/cotire/d' ./CMakeLists.txt
  5. mkdir -p scan-build
  6. scan-build-7 -o ./scan-build/ cmake .
  7. mkdir -p tests/unit/logs
  8. make -j`nproc --all` |& tee ./unit-tests-build-result.txt
  9. exitstatus=${PIPESTATUS[0]}
  10. echo $exitstatus > ./build-status.txt
  11. echo 0 > tests/unit/run-tests-status.txt
  12. export TEST_ARTIFACT_FILE=/__w/libks/libks/tests/unit/logs/artifacts.html
  13. env CTEST_OUTPUT_ON_FAILURE=1 make test |& tee >(ansi2html > $TEST_ARTIFACT_FILE)
  14. exitstatus=${PIPESTATUS[0]}
  15. ls -al
  16. ls -al tests/unit/logs
  17. echo "Exist status is $exitstatus"
  18. if [ "$exitstatus" != "0" ]]; then
  19. echo "TEST_ARTIFACT_FILE=$TEST_ARTIFACT_FILE" >> $GITHUB_OUTPUT
  20. fi
  21. exit $exitstatus