Skip to content

Instantly share code, notes, and snippets.

@asn-d6
Created June 14, 2018 13:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asn-d6/41f3beefffb255904627f341cf34e5cc to your computer and use it in GitHub Desktop.
Save asn-d6/41f3beefffb255904627f341cf34e5cc to your computer and use it in GitHub Desktop.
run unittests with mutated local time
#!/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