[MacPorts] Tests modified

MacPorts noreply at macports.org
Sun Sep 8 13:19:43 PDT 2013


Page "Tests" was changed by ryandesign at macports.org
Diff URL: <https://trac.macports.org/wiki/Tests?action=diff&version=11>
Revision 11
Comment: use TracLinks; simplify markup; fix typos
Changes:
-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: Tests
=========================================================================
--- Tests (version: 10)
+++ Tests (version: 11)
@@ -1,8 +1,8 @@
 === Intro ===
 
-The MacPorts testing framework uses [[http://wiki.tcl.tk/1502 | tcltest]] for its unit tests as well as regression tests. The framework has been developed during GSoC 13 by Marius Coțofană.
+The MacPorts testing framework uses [http://wiki.tcl.tk/1502 tcltest] for its unit tests as well as regression tests. The framework has been developed during GSoC 13 by Marius Coțofană.
 
-To keep things simple, each module of MacPorts ([[https://trac.macports.org/browser/trunk/base/src/macports1.0 | macports1.0]], [[https://trac.macports.org/browser/trunk/base/src/package1.0 | package1.0]], [[https://trac.macports.org/browser/trunk/base/src/port1.0 | port1.0]], [[https://trac.macports.org/browser/trunk/base/src/registry2.0 | registry2.0]]) has it's own 'tests/' directory. Each Tcl script in a module (e.g. [[https://trac.macports.org/browser/trunk/base/src/macports1.0/macports.tcl | macports.tcl]]) has its own test script located in the 'test' directory, with the same name and the '.test' extension (e.g. [[https://trac.macports.org/browser/trunk/base/src/macports1.0/tests/macports.test | macports.test]]). Every proc in a script (e.g. [[https://trac.macports.org/browser/trunk/base/src/macports1.0/macports.tcl#L334 | proc macports::findBinary]]) should have it's own test proc (e.g. [[https://trac.macports.org/browser/trunk/base/src/macports1.0/tests/macports.test#L334 | test findBinary]]) in the corresponding test file. Test procs should maintain the order in the original script and should be independent one of another.
+To keep things simple, each module of MacPorts ([browser:trunk/base/src/macports1.0 macports1.0], [browser:trunk/base/src/package1.0 package1.0], [browser:trunk/base/src/port1.0 port1.0], [browser:trunk/base/src/registry2.0 registry2.0]) has its own 'tests/' directory. Each Tcl script in a module (e.g. [browser:trunk/base/src/macports1.0/macports.tcl macports.tcl]) has its own test script located in the 'test' directory, with the same name and the '.test' extension (e.g. [browser:trunk/base/src/macports1.0/tests/macports.test macports.test]). Every proc in a script (e.g. [browser:trunk/base/src/macports1.0/macports.tcl#L334 proc macports::findBinary]) should have its own test proc (e.g. [browser:trunk/base/src/macports1.0/tests/macports.test#L334 test findBinary]) in the corresponding test file. Test procs should maintain the order in the original script and should be independent one of another.
 
 Maintainer: marius [at] macports.org
 
@@ -13,12 +13,12 @@
 make test
 }}}
 
-Each 'tests/' directory has a [[https://trac.macports.org/browser/branches/gsoc13-tests/src/macports1.0/tests/test.tcl | test.tcl]] file, used by the make target to run all tests and format the output, making it easy to read. The script just runs the tests individually, printing the test file name, the total number of tests, number of passed, skipped, failed as well as constraints or errors of failed tests. This is one possible output when running macports.test:
+Each 'tests/' directory has a [browser:branches/gsoc13-tests/src/macports1.0/tests/test.tcl test.tcl] file, used by the make target to run all tests and format the output, making it easy to read. The script just runs the tests individually, printing the test file name, the total number of tests, number of passed, skipped, failed as well as constraints or errors of failed tests. This is one possible output when running macports.test:
 {{{
 Total:31 Passed:31 Failed:00 Skipped:00  macports.test
 }}}
 
-Many tests need root privileges to run correctly, but will be auto skipped in the other case. Constarints are printed just bellow the final result, together with the number of test cases that require it, as so:
+Many tests need root privileges to run correctly, but will be auto skipped in the other case. Constraints are printed just below the final result, together with the number of test cases that require it, as so:
 {{{
 Total:31 Passed:24 Failed:00 Skipped:07  macports.test
     Constraint: 7	root
@@ -53,20 +53,20 @@
 tclsh macports.test -match mportclose
 }}}
 
-Regression tests can be found in [[https://trac.macports.org/browser/trunk/base/tests/test | trunk/base/tests/test]] and can be  run just as unit tests, using 'make test' from the parent directory.
+Regression tests can be found in [browser:trunk/base/tests/test trunk/base/tests/test] and can be  run just as unit tests, using 'make test' from the parent directory.
 
 
 === Must know ===
 
-* the tests can be run only on an installed version of Macports ( so make sure you have run 'sudo make install' )
-* regression tests have their own directory, found in [[https://trac.macports.org/browser/trunk/base/tests/test | trunk/base/tests/test]]
-* each module of MacPorts (port1.0, macports1.0, package1.0) has its own ‘tests/’ directory where the test files are located and also additional files needed ([[https://trac.macports.org/browser/branches/gsoc13-tests/src/macports1.0/tests/Portfile | Portfile]], [[https://trac.macports.org/browser/branches/gsoc13-tests/src/macports1.0/tests/test.tcl | test.tcl]])
+* the tests can be run only on an installed version of MacPorts (so make sure you have run 'sudo make install')
+* regression tests have their own directory, found in [browser:trunk/base/tests/test trunk/base/tests/test]
+* each module of MacPorts (port1.0, macports1.0, package1.0) has its own ‘tests/’ directory where the test files are located and also additional files needed ([browser:branches/gsoc13-tests/src/macports1.0/tests/Portfile Portfile], [browser:branches/gsoc13-tests/src/macports1.0/tests/test.tcl test.tcl])
 * each file in a module has a corresponding test file (.test extension) in the ‘tests/’ directory
 * each proc in a file has a corresponding test case (test proc_name) in the
 * each test case must be independent from each other, so they can be run individually if needed
-* each test must clan all auxiliary files or directories it creates and revert all port it installs
+* each test must clean all auxiliary files or directories it creates and revert all ports it installs
 * use a single test proceduce for each tested proc; sub-test cases should be included in the same body
-* when adding new regression tests, make sure to specify its name in the test_suite list of ' trunk/base/tests/test.tcl '
+* when adding new regression tests, make sure to specify its name in the test_suite list of 'trunk/base/tests/test.tcl'
 
 
 === Sample file ===
@@ -154,16 +154,16 @@
 
 === Additional files ===
 
-* In all tests we use this [[https://trac.macports.org/browser/branches/gsoc13-tests/src/macports1.0/tests/Portfile | Portfile]].
-* This is the [[https://trac.macports.org/browser/branches/gsoc13-tests/src/macports1.0/tests/test.tcl | test.tcl]] file used to run and parse the output of all the tests in a module.
-* A worker_init copy, without using sub-interpreters [[https://trac.macports.org/browser/branches/gsoc13-tests/src/package1.0/tests/library.tcl | library.tcl ]].
-* Example of [[https://trac.macports.org/browser/branches/gsoc13-tests/src/macports1.0/tests/sources.conf | sources.conf ]].
-* An example of a test file [[https://trac.macports.org/browser/branches/gsoc13-tests/src/macports1.0/tests/macports.test | macports.test ]].
-* A [[https://trac.macports.org/browser/branches/gsoc13-tests/tests/test/library.tcl | library.tcl]] of useful procs in regression testing.
+* In all tests we use this [browser:branches/gsoc13-tests/src/macports1.0/tests/Portfile Portfile].
+* This is the [browser:branches/gsoc13-tests/src/macports1.0/tests/test.tcl test.tcl] file used to run and parse the output of all the tests in a module.
+* A worker_init copy, without using sub-interpreters [browser:branches/gsoc13-tests/src/package1.0/tests/library.tcl library.tcl].
+* Example of [browser:branches/gsoc13-tests/src/macports1.0/tests/sources.conf sources.conf].
+* An example of a test file [browser:branches/gsoc13-tests/src/macports1.0/tests/macports.test macports.test].
+* A [browser:branches/gsoc13-tests/tests/test/library.tcl library.tcl] of useful procs in regression testing.
 
 
 === Resources ===
 
-* [[http://wiki.tcl.tk/1502 | Tcltest official wiki page]]\\
-* [[http://web.archive.org/web/20080617153002/www.tclscripting.com/articles/apr06/article1.html | Getting started with tcltest]]\\
-* [[http://www.tcl.tk/man/tcl8.5/TclCmd/tcltest.htm | Official tcltest documentation]]\\
+* [http://wiki.tcl.tk/1502 Tcltest official wiki page]
+* [http://web.archive.org/web/20080617153002/www.tclscripting.com/articles/apr06/article1.html Getting started with tcltest]
+* [http://www.tcl.tk/man/tcl8.5/TclCmd/tcltest.htm Official tcltest documentation]
-------8<------8<------8<------8<------8<------8<------8<------8<--------

--
Page URL: <https://trac.macports.org/wiki/Tests>
MacPorts <http://www.macports.org/>
Ports system for OS X

This is an automated message. Someone added your email address to be
notified of changes on 'Tests' page.
If it was not you, please report to .


More information about the macports-changes mailing list