changeset 52020:4b347e9429e7

tests: stabilize `test-split-legacy-inline-changelog.t` on Windows The `tar` command is unable to process "C:\path\to\foo.tar" style paths, which is how `$TESTDIR` is constructed. It also didn't work with `$TESTDIR_FORWARD_SLASH`- both failed with: tar: Cannot connect to C: resolve failed [128] But `cat` can handle it if the path is quoted, and `tar` can read from stdin.
author Matt Harbison <matt_harbison@yahoo.com>
date Mon, 07 Oct 2024 21:48:36 -0400
parents b99f0b76acf9
children f0bee30af890
files tests/test-split-legacy-inline-changelog.t
diffstat 1 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-split-legacy-inline-changelog.t	Mon Oct 07 19:11:54 2024 -0400
+++ b/tests/test-split-legacy-inline-changelog.t	Mon Oct 07 21:48:36 2024 -0400
@@ -18,7 +18,8 @@
 
   $ mkdir sanity-check
   $ cd sanity-check
-  $ tar xf $TESTDIR/bundles/inlined-changelog.tar
+  $ cat "$TESTDIR/bundles/inlined-changelog.tar" |  tar xf -
+
   $ cd inlined-changelog
   $ hg root
   $TESTTMP/sanity-check/inlined-changelog
@@ -55,7 +56,7 @@
 
   $ mkdir simple-commit
   $ cd simple-commit
-  $ tar xf $TESTDIR/bundles/inlined-changelog.tar
+  $ cat "$TESTDIR/bundles/inlined-changelog.tar" |  tar xf -
   $ cd inlined-changelog
   $ hg up --quiet
   $ hg log -GT '[{rev}] {desc}\n'
@@ -85,7 +86,7 @@
 
   $ mkdir pretxnclose-commit
   $ cd pretxnclose-commit
-  $ tar xf $TESTDIR/bundles/inlined-changelog.tar
+  $ cat "$TESTDIR/bundles/inlined-changelog.tar" |  tar xf -
   $ cat >> inlined-changelog/.hg/hgrc <<EOF
   > [hooks]
   > pretxnclose=hg log -r tip -T "pre-txn tip rev: {rev}\n"
@@ -121,7 +122,7 @@
 
   $ mkdir simple-local-push
   $ cd simple-local-push
-  $ tar xf $TESTDIR/bundles/inlined-changelog.tar
+  $ cat "$TESTDIR/bundles/inlined-changelog.tar" |  tar xf -
   $ hg log -R inlined-changelog -T '[{rev}] {desc}\n'
   [0] first commit
 
@@ -166,7 +167,7 @@
 
   $ mkdir pretxnchangegroup-local-push
   $ cd pretxnchangegroup-local-push
-  $ tar xf $TESTDIR/bundles/inlined-changelog.tar
+  $ cat "$TESTDIR/bundles/inlined-changelog.tar" |  tar xf -
   $ cat >> inlined-changelog/.hg/hgrc <<EOF
   > [hooks]
   > pretxnchangegroup=hg log -r tip -T "pre-txn tip rev: {rev}\n"
@@ -214,7 +215,7 @@
 
   $ mkdir simple-ssh-push
   $ cd simple-ssh-push
-  $ tar xf $TESTDIR/bundles/inlined-changelog.tar
+  $ cat "$TESTDIR/bundles/inlined-changelog.tar" |  tar xf -
   $ hg log -R inlined-changelog -T '[{rev}] {desc}\n'
   [0] first commit
 
@@ -259,7 +260,7 @@
 
   $ mkdir pretxnchangegroup-ssh-push
   $ cd pretxnchangegroup-ssh-push
-  $ tar xf $TESTDIR/bundles/inlined-changelog.tar
+  $ cat "$TESTDIR/bundles/inlined-changelog.tar" |  tar xf -
   $ cat >> inlined-changelog/.hg/hgrc <<EOF
   > [hooks]
   > pretxnchangegroup=hg log -r tip -T "pre-txn tip rev: {rev}\n"