Skip to content

Commit

Permalink
add ci for checking timebombs
Browse files Browse the repository at this point in the history
  • Loading branch information
samuel40791765 committed Oct 1, 2024
1 parent 36e0307 commit b5d3004
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/actions-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,18 @@ jobs:
cmake -GNinja -Btest_build_dir
ninja -C test_build_dir run_tests
time-bomb-check-test-run:
runs-on: ubuntu-latest
steps:
- name: Git clone the repository
uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update -o Acquire::Languages=none -o Acquire::Translation=none
sudo apt-get install ninja-build
- name: Checking for Time-bombs Test Run
run: ./tests/ci/run_timebomb_check.sh

macOS-x86:
if: github.repository_owner == 'aws'
needs: [sanity-test-run]
Expand Down
13 changes: 13 additions & 0 deletions tests/ci/run_timebomb_check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
trap 'sudo timedatectl set-ntp 1' EXIT

sudo timedatectl set-ntp 0
sudo date -s "+10 years"
cmake -GNinja -Btest_build_dir
ninja -C test_build_dir

# Update the system time and check for any potential time bomb tests in the future.
# Integration tests can't connect to endpoints properly with a misaligned system time,
# so we only check crypto_test and ssl_test.
./test_build_dir/crypto/crypto_test
./test_build_dir/ssl/ssl_test

0 comments on commit b5d3004

Please sign in to comment.