Changes between Version 12 and Version 13 of Tests


Ignore:
Timestamp:
Sep 16, 2013, 6:01:13 PM (11 years ago)
Author:
marius@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Tests

    v12 v13  
    88
    99=== Running tests ===
     10
     11Tests can be run only on an installed version of MacPorts (so make sure you have run 'sudo make install').
    1012
    1113The easiest way to run all the tests, is to use the target in the Makefile.
     
    5961=== Must know ===
    6062
    61 * the tests can be run only on an installed version of MacPorts (so make sure you have run 'sudo make install')
    6263* regression tests have their own directory, found in [browser:trunk/base/tests/test trunk/base/tests/test]
    6364* 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])
     
    6869* use a single test proceduce for each tested proc; sub-test cases should be included in the same body
    6970* 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]])
    7072
    7173
     
    8284
    8385# 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
     88source ../port_test_autoconf.tcl
     89source $macports::autoconf::macports_tcl_dir/macports1.0/macports_fastload.tcl
     90package require macports 1.0
    9491
    9592# source/require tested/needed files
     
    113110file link -symbolic $pwd/tmpdir/share/macports $macports::autoconf::prefix/share/macports
    114111close [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’
     116array set ui_options {}
     117#set ui_options(ports_debug)   yes
     118#set ui_options(ports_verbose) yes
     119mportinit ui_options
    115120
    116121# if you need to use procs from macports namespace, that are just aliases, you can