tests/test-inotify-debuginotify.t
author Matt Mackall <mpm@selenic.com>
Wed, 28 Mar 2012 12:02:38 -0500
branchstable
changeset 16299 853ffcafecfa
parent 12451 17ebf11bff81
child 18590 104e120416ec
permissions -rw-r--r--
tests: remove sleep/startup/shutdown races from test-hup


  $ "$TESTDIR/hghave" inotify || exit 80
  $ hg init
  $ echo "[extensions]" >> $HGRCPATH
  $ echo "inotify=" >> $HGRCPATH

inserve

  $ hg inserve -d --pid-file=hg.pid
  $ cat hg.pid >> "$DAEMON_PIDS"

let the daemon finish its stuff

  $ sleep 1

empty

  $ hg debuginotify
  directories being watched:
    /
    .hg/
  $ mkdir a
  $ sleep 1

only 'a

  $ hg debuginotify
  directories being watched:
    /
    .hg/
    a/
  $ rmdir a
  $ sleep 1

empty again

  $ hg debuginotify
  directories being watched:
    /
    .hg/
  $ kill `cat hg.pid`