Created
June 14, 2018 13:13
-
-
Save asn-d6/41f3beefffb255904627f341cf34e5cc to your computer and use it in GitHub Desktop.
run unittests with mutated local time
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# debian: run 'service systemd-timesyncd stop' and 'service ntp stop' as root before | |
# iterate over hours | |
for h in $(seq 0 23); | |
do | |
# iterate over minutes: | |
for m in $(seq 0 10 59); | |
do echo "date --set 'tomorrow $h:$m'"; | |
# set the date | |
date --set "tomorrow $h:$m"; | |
# run the tests | |
./src/test/test; | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment