Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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