Changes between Version 12 and Version 13 of Tests
- Timestamp:
- Sep 16, 2013, 6:01:13 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Tests
v12 v13 8 8 9 9 === Running tests === 10 11 Tests can be run only on an installed version of MacPorts (so make sure you have run 'sudo make install'). 10 12 11 13 The easiest way to run all the tests, is to use the target in the Makefile. … … 59 61 === Must know === 60 62 61 * the tests can be run only on an installed version of MacPorts (so make sure you have run 'sudo make install')62 63 * regression tests have their own directory, found in [browser:trunk/base/tests/test trunk/base/tests/test] 63 64 * 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]) … … 68 69 * use a single test proceduce for each tested proc; sub-test cases should be included in the same body 69 70 * when adding new regression tests, make sure to specify its name in the test_suite list of 'trunk/base/tests/test.tcl' 71 * variables used in tests can be set at install-time using the '[module]_test_autoconf.tcl.in' file in each module ([[https://trac.macports.org/browser/trunk/base/src/macports1.0/macports_autoconf.tcl.in | macports_test_autoconf.tcl.in]], [[https://trac.macports.org/browser/trunk/base/src/port1.0/port_autoconf.tcl.in | port_test_autoconf.tcl.in]]) 70 72 71 73 … … 82 84 83 85 # the macports_fastload.tcl file needs to be sourced so we 84 # can directly require packages later on 85 source ../../macports1.0/macports_fastload.tcl 86 87 # debug options 88 # ports_debug and ports_verbose are commented out as default 89 # need to be set before ‘mportinit’ 90 array set ui_options {} 91 #set ui_options(ports_debug) yes 92 #set ui_options(ports_verbose) yes 93 mportinit ui_options 86 # can directly require packages later on; we can use the autoconf 87 # file to get the path to the file 88 source ../port_test_autoconf.tcl 89 source $macports::autoconf::macports_tcl_dir/macports1.0/macports_fastload.tcl 90 package require macports 1.0 94 91 95 92 # source/require tested/needed files … … 113 110 file link -symbolic $pwd/tmpdir/share/macports $macports::autoconf::prefix/share/macports 114 111 close [open $pwd/tmpdir/variants.conf w+] 112 113 # debug options 114 # ports_debug and ports_verbose are commented out as default 115 # need to be set before ‘mportinit’ 116 array set ui_options {} 117 #set ui_options(ports_debug) yes 118 #set ui_options(ports_verbose) yes 119 mportinit ui_options 115 120 116 121 # if you need to use procs from macports namespace, that are just aliases, you can