# HG changeset patch # User Matt Harbison # Date 1619900033 14400 # Node ID 9e3979a25bfee23b6035bcea596f16cc2aac7716 # Parent a12819559ccb2bf8a10a8cfe4dc510e130ed77d3 tests: stabilize test-persistent-nodemap.t on Windows Several issues here: - Hooks can't invoke shell scripts on Windows, so use `sh` to launch - `dd` in MSYS only recognizes `status=noxfer` - The `PATH` updating triggered a massive slowdown, but is no longer needed I have no idea why, but removing the `PATH` update substantially increased the speed of the test. It was running finishing at ~4:30 with `--debug` and ~14:50 without it, but now completes in ~2:20 on my Windows laptop. Differential Revision: https://phab.mercurial-scm.org/D10636 diff -r a12819559ccb -r 9e3979a25bfe tests/test-persistent-nodemap.t --- a/tests/test-persistent-nodemap.t Sun May 02 19:54:08 2021 -0400 +++ b/tests/test-persistent-nodemap.t Sat May 01 16:13:53 2021 -0400 @@ -474,17 +474,16 @@ Another process does not see the pending nodemap content during run. - $ PATH=$RUNTESTDIR/testlib/:$PATH $ echo qpoasp > a $ hg ci -m a2 \ - > --config "hooks.pretxnclose=wait-on-file 20 sync-repo-read sync-txn-pending" \ + > --config "hooks.pretxnclose=sh \"$RUNTESTDIR/testlib/wait-on-file\" 20 sync-repo-read sync-txn-pending" \ > --config "hooks.txnclose=touch sync-txn-close" > output.txt 2>&1 & (read the repository while the commit transaction is pending) - $ wait-on-file 20 sync-txn-pending && \ + $ sh "$RUNTESTDIR/testlib/wait-on-file" 20 sync-txn-pending && \ > hg debugnodemap --metadata && \ - > wait-on-file 20 sync-txn-close sync-repo-read + > sh "$RUNTESTDIR/testlib/wait-on-file" 20 sync-txn-close sync-repo-read uid: ???????????????? (glob) tip-rev: 5004 tip-node: 2f5fb1c06a16834c5679d672e90da7c5f3b1a984 @@ -792,7 +791,9 @@ $ datafilepath=`ls corruption-test-repo/.hg/store/00changelog*.nd` $ f -s $datafilepath corruption-test-repo/.hg/store/00changelog-*.nd: size=121088 (glob) - $ dd if=$datafilepath bs=1000 count=10 of=$datafilepath-tmp status=none + $ dd if=$datafilepath bs=1000 count=10 of=$datafilepath-tmp status=noxfer + 10+0 records in + 10+0 records out $ mv $datafilepath-tmp $datafilepath $ f -s $datafilepath corruption-test-repo/.hg/store/00changelog-*.nd: size=10000 (glob)