Patchwork [3,of,4,STABLE] tests: put temporary file outside the working directory for test portability

login
register
mail settings
Submitter Katsunori FUJIWARA
Date Oct. 29, 2016, 9:20 p.m.
Message ID <6e04f4ec487501d48eff.1477776039@juju>
Download mbox | patch
Permalink /patch/17226/
State Accepted
Headers show

Comments

Katsunori FUJIWARA - Oct. 29, 2016, 9:20 p.m.
# HG changeset patch
# User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
# Date 1477775709 -32400
#      Sun Oct 30 06:15:09 2016 +0900
# Branch stable
# Node ID 6e04f4ec487501d48effcd2864a1c7f73ad6d8de
# Parent  9843e3d9f4b6ad004624ebf5c6a3e7e480c28c27
tests: put temporary file outside the working directory for test portability

test-largefiles-update.t creates temporary file exec-bit.patch inside
the working directory for no-execbit platform specific test, but
subsequent tests aren't aware of it.

On execbit platform, subsequent tests can run successfully, because
exec-bit.patch isn't created.

But on no-execbit platform, this temporary file makes subsequent tests
show "? exec-bit.patch" at each "hg status".

Patch

diff --git a/tests/test-largefiles-update.t b/tests/test-largefiles-update.t
--- a/tests/test-largefiles-update.t
+++ b/tests/test-largefiles-update.t
@@ -712,7 +712,7 @@  bit correctly on the platform being unaw
 
   $ hg update -q -C 4
 
-  $ cat > exec-bit.patch <<EOF
+  $ cat > ../exec-bit.patch <<EOF
   > # HG changeset patch
   > # User test
   > # Date 0 0
@@ -725,8 +725,8 @@  bit correctly on the platform being unaw
   > old mode 100644
   > new mode 100755
   > EOF
-  $ hg import --exact --bypass exec-bit.patch
-  applying exec-bit.patch
+  $ hg import --exact --bypass ../exec-bit.patch
+  applying ../exec-bit.patch
   $ hg status -A --rev tip large2
   C large2