Patchwork [stable] tests: cat error messages are different on Solaris

login
register
mail settings
Submitter Danek Duvall
Date July 21, 2014, 6:29 p.m.
Message ID <f75eb0e20a84a3aba3e4.1405967359@smelly>
Download mbox | patch
Permalink /patch/5188/
State Accepted
Commit a5168eb9b2bc488f42809872d22321a9825bc738
Headers show

Comments

Danek Duvall - July 21, 2014, 6:29 p.m.
# HG changeset patch
# User Danek Duvall <danek.duvall@oracle.com>
# Date 1405967244 25200
#      Mon Jul 21 11:27:24 2014 -0700
# Branch stable
# Node ID f75eb0e20a84a3aba3e49baf9276aec420d2485c
# Parent  c67868cfe14f8b48584716f6431e0068c57ad03c
tests: cat error messages are different on Solaris
Matt Mackall - July 21, 2014, 9:14 p.m.
On Mon, 2014-07-21 at 11:29 -0700, danek.duvall@oracle.com wrote:
> # HG changeset patch
> # User Danek Duvall <danek.duvall@oracle.com>
> # Date 1405967244 25200
> #      Mon Jul 21 11:27:24 2014 -0700
> # Branch stable
> # Node ID f75eb0e20a84a3aba3e49baf9276aec420d2485c
> # Parent  c67868cfe14f8b48584716f6431e0068c57ad03c
> tests: cat error messages are different on Solaris

Queued, thanks.

Patch

diff --git a/contrib/check-code.py b/contrib/check-code.py
--- a/contrib/check-code.py
+++ b/contrib/check-code.py
@@ -168,6 +168,8 @@  utestpats = [
     (r'^  .*: largefile \S+ not available from file:.*/.*[^)]$', winglobmsg),
     (r'^  .*file://\$TESTTMP',
      'write "file:/*/$TESTTMP" + (glob) to match on windows too'),
+    (r'^  (cat|find): .*: No such file or directory',
+     'use test -f to test for file existence'),
   ],
   # warnings
   [
diff --git a/tests/test-histedit-edit.t b/tests/test-histedit-edit.t
--- a/tests/test-histedit-edit.t
+++ b/tests/test-histedit-edit.t
@@ -233,8 +233,7 @@  check saving last-message.txt, at first
   > EOF
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   abort: emulating unexpected abort
-  $ cat .hg/last-message.txt
-  cat: .hg/last-message.txt: No such file or directory
+  $ test -f .hg/last-message.txt
   [1]
 
   $ cat >> .hg/hgrc <<EOF
diff --git a/tests/test-issue3084.t b/tests/test-issue3084.t
--- a/tests/test-issue3084.t
+++ b/tests/test-issue3084.t
@@ -165,8 +165,7 @@  Ensure that .hg/largefiles isn't created
   $ chmod 755 .hg
 #endif
 
-  $ find .hg/largefiles
-  find: `.hg/largefiles': No such file or directory
+  $ test -f .hg/largefiles
   [1]
 
 ancestor is "normal":
diff --git a/tests/test-mq-qfold.t b/tests/test-mq-qfold.t
--- a/tests/test-mq-qfold.t
+++ b/tests/test-mq-qfold.t
@@ -182,8 +182,7 @@  and that combination of '--edit' and '--
   refresh interrupted while patch was popped! (revert --all, qpush to recover)
   abort: emulating unexpected abort
   [255]
-  $ cat .hg/last-message.txt
-  cat: .hg/last-message.txt: No such file or directory
+  $ test -f .hg/last-message.txt
   [1]
 
 (reset applied patches and directory status)
diff --git a/tests/test-mq-qnew.t b/tests/test-mq-qnew.t
--- a/tests/test-mq-qnew.t
+++ b/tests/test-mq-qnew.t
@@ -268,8 +268,7 @@  Test saving last-message.txt
   $ HGEDITOR="sh $TESTTMP/editor.sh" hg qnew -e patch
   abort: emulating unexpected abort
   [255]
-  $ cat .hg/last-message.txt
-  cat: .hg/last-message.txt: No such file or directory
+  $ test -f .hg/last-message.txt
   [1]
 
 (test that editor is invoked and commit message is saved into
diff --git a/tests/test-mq-qrefresh-replace-log-message.t b/tests/test-mq-qrefresh-replace-log-message.t
--- a/tests/test-mq-qrefresh-replace-log-message.t
+++ b/tests/test-mq-qrefresh-replace-log-message.t
@@ -133,8 +133,7 @@  Test saving last-message.txt:
   refresh interrupted while patch was popped! (revert --all, qpush to recover)
   abort: emulating unexpected abort
   [255]
-  $ cat .hg/last-message.txt
-  cat: .hg/last-message.txt: No such file or directory
+  $ test -f .hg/last-message.txt
   [1]
 
 (reset applied patches and directory status)
diff --git a/tests/test-subrepo-svn.t b/tests/test-subrepo-svn.t
--- a/tests/test-subrepo-svn.t
+++ b/tests/test-subrepo-svn.t
@@ -672,11 +672,9 @@  Test sanitizing ".hg/hgrc" in subrepo
   $ cd tc
   $ grep ' s$' .hgsubstate
   16 s
-  $ cat s/.hg/hgrc
-  cat: s/.hg/hgrc: No such file or directory
+  $ test -f s/.hg/hgrc
   [1]
-  $ cat s/sub/.hg/hgrc
-  cat: s/sub/.hg/hgrc: No such file or directory
+  $ test -f s/sub/.hg/hgrc
   [1]
 
 Test that sanitizing is omitted in meta data area:
diff --git a/tests/test-tag.t b/tests/test-tag.t
--- a/tests/test-tag.t
+++ b/tests/test-tag.t
@@ -242,8 +242,7 @@  at first, test saving last-message.txt
   $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg tag custom-tag -e
   abort: pretag.test-saving-lastmessage hook exited with status 1
   [255]
-  $ cat .hg/last-message.txt
-  cat: .hg/last-message.txt: No such file or directory
+  $ test -f .hg/last-message.txt
   [1]
 
 (test that editor is invoked and commit message is saved into