Author: jilles
Date: Sun Aug 17 14:26:12 2014
New Revision: 270101
URL: http://svnweb.freebsd.org/changeset/base/270101

Log:
  sh: Don't hardcode relative paths in the tests stderr files.
  
  These paths have had to be adjusted to changes in the testsuite runner
  several times, so modify the tests to remove the need for such adjustment.
  
  A cp in functional_test.sh is now unneeded, but this matters little in
  performance.

Modified:
  head/bin/sh/tests/errors/bad-parm-exp2.2
  head/bin/sh/tests/errors/bad-parm-exp2.2.stderr
  head/bin/sh/tests/errors/bad-parm-exp3.2
  head/bin/sh/tests/errors/bad-parm-exp3.2.stderr
  head/bin/sh/tests/errors/bad-parm-exp4.2
  head/bin/sh/tests/errors/bad-parm-exp4.2.stderr
  head/bin/sh/tests/errors/bad-parm-exp5.2
  head/bin/sh/tests/errors/bad-parm-exp5.2.stderr
  head/bin/sh/tests/errors/bad-parm-exp6.2
  head/bin/sh/tests/errors/bad-parm-exp6.2.stderr
  head/bin/sh/tests/functional_test.sh

Modified: head/bin/sh/tests/errors/bad-parm-exp2.2
==============================================================================
--- head/bin/sh/tests/errors/bad-parm-exp2.2    Sun Aug 17 13:12:07 2014        
(r270100)
+++ head/bin/sh/tests/errors/bad-parm-exp2.2    Sun Aug 17 14:26:12 2014        
(r270101)
@@ -1,2 +1,2 @@
 # $FreeBSD$
-${}
+eval '${}'

Modified: head/bin/sh/tests/errors/bad-parm-exp2.2.stderr
==============================================================================
--- head/bin/sh/tests/errors/bad-parm-exp2.2.stderr     Sun Aug 17 13:12:07 
2014        (r270100)
+++ head/bin/sh/tests/errors/bad-parm-exp2.2.stderr     Sun Aug 17 14:26:12 
2014        (r270101)
@@ -1 +1 @@
-./bad-parm-exp2.2: ${}: Bad substitution
+eval: ${}: Bad substitution

Modified: head/bin/sh/tests/errors/bad-parm-exp3.2
==============================================================================
--- head/bin/sh/tests/errors/bad-parm-exp3.2    Sun Aug 17 13:12:07 2014        
(r270100)
+++ head/bin/sh/tests/errors/bad-parm-exp3.2    Sun Aug 17 14:26:12 2014        
(r270101)
@@ -1,2 +1,2 @@
 # $FreeBSD$
-${foo/}
+eval '${foo/}'

Modified: head/bin/sh/tests/errors/bad-parm-exp3.2.stderr
==============================================================================
--- head/bin/sh/tests/errors/bad-parm-exp3.2.stderr     Sun Aug 17 13:12:07 
2014        (r270100)
+++ head/bin/sh/tests/errors/bad-parm-exp3.2.stderr     Sun Aug 17 14:26:12 
2014        (r270101)
@@ -1 +1 @@
-./bad-parm-exp3.2: ${foo/}: Bad substitution
+eval: ${foo/}: Bad substitution

Modified: head/bin/sh/tests/errors/bad-parm-exp4.2
==============================================================================
--- head/bin/sh/tests/errors/bad-parm-exp4.2    Sun Aug 17 13:12:07 2014        
(r270100)
+++ head/bin/sh/tests/errors/bad-parm-exp4.2    Sun Aug 17 14:26:12 2014        
(r270101)
@@ -1,2 +1,2 @@
 # $FreeBSD$
-${foo:@abc}
+eval '${foo:@abc}'

Modified: head/bin/sh/tests/errors/bad-parm-exp4.2.stderr
==============================================================================
--- head/bin/sh/tests/errors/bad-parm-exp4.2.stderr     Sun Aug 17 13:12:07 
2014        (r270100)
+++ head/bin/sh/tests/errors/bad-parm-exp4.2.stderr     Sun Aug 17 14:26:12 
2014        (r270101)
@@ -1 +1 @@
-./bad-parm-exp4.2: ${foo:@...}: Bad substitution
+eval: ${foo:@...}: Bad substitution

Modified: head/bin/sh/tests/errors/bad-parm-exp5.2
==============================================================================
--- head/bin/sh/tests/errors/bad-parm-exp5.2    Sun Aug 17 13:12:07 2014        
(r270100)
+++ head/bin/sh/tests/errors/bad-parm-exp5.2    Sun Aug 17 14:26:12 2014        
(r270101)
@@ -1,2 +1,2 @@
 # $FreeBSD$
-${/}
+eval '${/}'

Modified: head/bin/sh/tests/errors/bad-parm-exp5.2.stderr
==============================================================================
--- head/bin/sh/tests/errors/bad-parm-exp5.2.stderr     Sun Aug 17 13:12:07 
2014        (r270100)
+++ head/bin/sh/tests/errors/bad-parm-exp5.2.stderr     Sun Aug 17 14:26:12 
2014        (r270101)
@@ -1 +1 @@
-./bad-parm-exp5.2: ${/}: Bad substitution
+eval: ${/}: Bad substitution

Modified: head/bin/sh/tests/errors/bad-parm-exp6.2
==============================================================================
--- head/bin/sh/tests/errors/bad-parm-exp6.2    Sun Aug 17 13:12:07 2014        
(r270100)
+++ head/bin/sh/tests/errors/bad-parm-exp6.2    Sun Aug 17 14:26:12 2014        
(r270101)
@@ -1,2 +1,2 @@
 # $FreeBSD$
-${#foo^}
+eval '${#foo^}'

Modified: head/bin/sh/tests/errors/bad-parm-exp6.2.stderr
==============================================================================
--- head/bin/sh/tests/errors/bad-parm-exp6.2.stderr     Sun Aug 17 13:12:07 
2014        (r270100)
+++ head/bin/sh/tests/errors/bad-parm-exp6.2.stderr     Sun Aug 17 14:26:12 
2014        (r270101)
@@ -1 +1 @@
-./bad-parm-exp6.2: ${foo...}: Bad substitution
+eval: ${foo...}: Bad substitution

Modified: head/bin/sh/tests/functional_test.sh
==============================================================================
--- head/bin/sh/tests/functional_test.sh        Sun Aug 17 13:12:07 2014        
(r270100)
+++ head/bin/sh/tests/functional_test.sh        Sun Aug 17 14:26:12 2014        
(r270101)
@@ -39,13 +39,7 @@ check()
        local out_file="${SRCDIR}/${tc}.stdout"
        [ -f "${out_file}" ] && out_flag="-o file:${out_file}"
 
-       # We need to copy the testcase scenario file because some of the
-       # testcases hardcode relative paths in the stderr/stdout.
-       #
-       # TODO: we might be able to generate this path at build time
-       cp ${SRCDIR}/${tc} .
-
-       atf_check -s exit:${tc##*.} ${err_flag} ${out_flag} ${SH} "./${tc}"
+       atf_check -s exit:${tc##*.} ${err_flag} ${out_flag} ${SH} 
"${SRCDIR}/${tc}"
 }
 
 add_testcase()
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to