Ticket #11377: clock_changes_test.sh

File clock_changes_test.sh, 345 bytes (added by Dave Bacher <dbacher@…>, 7 years ago)

Test harness to run clock_changes and set the system clock

Line 
1#!/bin/bash
2
3sudo echo "Setup sudo authentication"
4
5test_type=${1:-until}
6wait_timeout=${2:-5}
7
8echo "Starting test to wait for $wait_timeout seconds"
9./clock_changes --type $test_type --time $wait_timeout &
10echo "Adjusting time to 01:00:00"
11sudo date -s 01:00:00
12echo "Waiting..."
13wait
14echo "Test complete, please check your system clock"
15date