Date: Sun, 17 Aug 2014 14:26:12 +0000 (UTC) From: Jilles Tjoelker <jilles@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270101 - in head/bin/sh/tests: . errors Message-ID: <201408171426.s7HEQCmb038602@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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()
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201408171426.s7HEQCmb038602>