From owner-svn-src-head@FreeBSD.ORG Fri Jul 25 01:29:23 2014 Return-Path: <owner-svn-src-head@FreeBSD.ORG> Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E932AE10; Fri, 25 Jul 2014 01:29:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD5D92F7A; Fri, 25 Jul 2014 01:29:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6P1TNgK017146; Fri, 25 Jul 2014 01:29:23 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6P1TNeT017138; Fri, 25 Jul 2014 01:29:23 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201407250129.s6P1TNeT017138@svn.freebsd.org> From: Julio Merino <jmmv@FreeBSD.org> Date: Fri, 25 Jul 2014 01:29:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269084 - in head: tools/build/mk usr.bin/units/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 25 Jul 2014 01:29:24 -0000 Author: jmmv Date: Fri Jul 25 01:29:22 2014 New Revision: 269084 URL: http://svnweb.freebsd.org/changeset/base/269084 Log: Fix structure of new tests (r268794) for usr.bin/units. - Make sure the tests go into the right directory. The location was wrong so they were overwriting the bin/chown tests! - Use the right naming scheme for the test program. - Remove the svn:executable property from the shell script. Added: - copied unchanged from r269083, head/usr.bin/units/tests/units_basics.sh Directory Properties: head/usr.bin/units/tests/basics_test.sh (props changed) Deleted: head/usr.bin/units/tests/units_basics.sh Modified: head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.bin/units/tests/Makefile Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Fri Jul 25 00:35:43 2014 (r269083) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Fri Jul 25 01:29:22 2014 (r269084) @@ -4167,6 +4167,7 @@ OLD_FILES+=usr/share/aclocal/atf-c.m4 OLD_FILES+=usr/share/aclocal/atf-common.m4 OLD_FILES+=usr/share/aclocal/atf-sh.m4 OLD_DIRS+=usr/share/aclocal +OLD_FILES+=usr/tests/bin/chown/units_basics OLD_FILES+=usr/tests/usr.bin/atf/Kyuafile OLD_FILES+=usr/tests/usr.bin/atf/atf-sh/Kyuafile OLD_FILES+=usr/tests/usr.bin/atf/atf-sh/atf_check_test Modified: head/usr.bin/units/tests/Makefile ============================================================================== --- head/usr.bin/units/tests/Makefile Fri Jul 25 00:35:43 2014 (r269083) +++ head/usr.bin/units/tests/Makefile Fri Jul 25 01:29:22 2014 (r269084) @@ -2,8 +2,8 @@ .include <bsd.own.mk> -TESTSDIR= ${TESTSBASE}/bin/chown +TESTSDIR= ${TESTSBASE}/usr.bin/units -TAP_TESTS_SH= units_basics +TAP_TESTS_SH= basics_test .include <bsd.test.mk> Copied: head/usr.bin/units/tests/basics_test.sh (from r269083, head/usr.bin/units/tests/units_basics.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/units/tests/basics_test.sh Fri Jul 25 01:29:22 2014 (r269084, copy of r269083, head/usr.bin/units/tests/units_basics.sh) @@ -0,0 +1,22 @@ +#!/bin/sh +# $FreeBSD$ + +base=`basename $0` + +echo "1..3" + +assert_equals() { + testnum="$1" + expected="$2" + fn="$3" + if [ "$expected" = "$($fn)" ] + then + echo "ok $testnum - $fn" + else + echo "not ok $testnum - $fn" + fi +} + +assert_equals 1 1 "units -t ft ft" +assert_equals 2 12 "units -t ft in" +assert_equals 3 0.083333333 "units -t in ft"