Ticket #38208: depends_test.diff

File depends_test.diff, 10.6 KB (added by kurthindenburg (Kurt Hindenburg), 9 years ago)

patch that adds depends_test

  • macports1.0/macports.tcl

     
    34373437        patch       {return "depends_fetch depends_extract"}
    34383438        configure   -
    34393439        build       {return "depends_fetch depends_extract depends_build depends_lib"}
    3440         test        -
     3440        test        {return "depends_fetch depends_extract depends_build depends_lib depends_run depends_test"}
    34413441        destroot    {return "depends_fetch depends_extract depends_build depends_lib depends_run"}
    34423442        dmg         -
    34433443        pkg         -
  • port/port.tcl

     
    101101
    102102Pseudo-portnames starting with variants:, variant:, description:, depends:,
    103103depends_lib:, depends_run:, depends_build:, depends_fetch:, depends_extract:,
     104depends_test:,
    104105portdir:, homepage:, epoch:, platforms:, platform:, name:, long_description:,
    105106maintainers:, maintainer:, categories:, category:, version:, revision:, and
    106107license: each select a set of ports based on a regex search of metadata
     
    10731074
    10741075    # gather its deps
    10751076    set results {}
    1076     set deptypes {depends_fetch depends_extract depends_build depends_lib depends_run}
     1077    set deptypes {depends_fetch depends_extract depends_build depends_lib depends_run depends_test}
    10771078
    10781079    set deplist {}
    10791080    foreach type $deptypes {
     
    13671368        ^depends_run:       -
    13681369        ^depends_extract:   -
    13691370        ^depends_fetch:     -
     1371        ^depends_test:      -
    13701372        ^replaced_by:       -
    13711373        ^revision:          -
    13721374        ^subport:           -
     
    13951397            add_multiple_ports reslist [get_matching_ports $pat no regexp "depends_run"]
    13961398            add_multiple_ports reslist [get_matching_ports $pat no regexp "depends_extract"]
    13971399            add_multiple_ports reslist [get_matching_ports $pat no regexp "depends_fetch"]
     1400            add_multiple_ports reslist [get_matching_ports $pat no regexp "depends_test"]
    13981401
    13991402            set el 1
    14001403        }
     
    20552058            depends_build   1
    20562059            depends_lib     1
    20572060            depends_run     1
     2061            depends_test    1
    20582062            maintainers     1
    20592063            platforms       1
    20602064            variants        1
     
    20722076            depends_build "Build Dependencies"
    20732077            depends_run "Runtime Dependencies"
    20742078            depends_lib "Library Dependencies"
     2079            depends_test "Test Dependencies"
    20752080            description "Brief Description"
    20762081            long_description "Description"
    20772082            fullname    "Full Name: "
     
    20952100            depends_build 22
    20962101            depends_run 22
    20972102            depends_lib 22
     2103            depends_test 22
    20982104            description 22
    20992105            long_description 22
    21002106            homepage 22
     
    21142120            set options(ports_info_depends_build) yes
    21152121            set options(ports_info_depends_lib) yes
    21162122            set options(ports_info_depends_run) yes
     2123            set options(ports_info_depends_test) yes
    21172124        }
    21182125               
    21192126        # Set up our field separators
     
    21642171                ports_info_skip_line ports_info_depends_fetch
    21652172                ports_info_depends_extract ports_info_depends_build
    21662173                ports_info_depends_lib ports_info_depends_run
     2174                ports_info_depends_test
    21672175                ports_info_conflicts
    21682176                ports_info_platforms ports_info_license
    21692177                ports_info_maintainers
     
    29382946        if {[info exists options(ports_${action}_no-build)] && [string is true -strict $options(ports_${action}_no-build)]} {
    29392947            set deptypes {depends_lib depends_run}
    29402948        } else {
    2941             set deptypes {depends_fetch depends_extract depends_build depends_lib depends_run}
     2949            set deptypes {depends_fetch depends_extract depends_build depends_lib depends_run depends_test}
    29422950        }
    29432951
    29442952        array unset portinfo
     
    30133021        set deplist {}
    30143022        set deps_output {}
    30153023        set ndeps 0
    3016         array set labeldict {depends_fetch Fetch depends_extract Extract depends_build Build depends_lib Library depends_run Runtime}
     3024        array set labeldict {depends_fetch Fetch depends_extract Extract depends_build Build depends_lib Library depends_run Runtime depends_test Test}
    30173025        # get list of direct deps
    30183026        foreach type $deptypes {
    30193027            if {[info exists portinfo($type)]} {
     
    36513659        set options(ports_search_depends_build) yes
    36523660        set options(ports_search_depends_lib) yes
    36533661        set options(ports_search_depends_run) yes
     3662        set options(ports_search_depends_test) yes
    36543663    }
    36553664
    36563665    # Array to hold given filters
     
    43744383array set cmd_opts_array {
    43754384    edit        {{editor 1}}
    43764385    info        {category categories conflicts depends_fetch depends_extract
    4377                  depends_build depends_lib depends_run
     4386                 depends_build depends_lib depends_run depends_test
    43784387                 depends description epoch fullname heading homepage index license
    43794388                 line long_description
    43804389                 maintainer maintainers name patchfiles platform platforms portdir
     
    43844393    rdeps       {index no-build full}
    43854394    rdependents {full}
    43864395    search      {case-sensitive category categories depends_fetch
    4387                  depends_extract depends_build depends_lib depends_run
     4396                 depends_extract depends_build depends_lib depends_run depends_test
    43884397                 depends description epoch exact glob homepage line
    43894398                 long_description maintainer maintainers name platform
    43904399                 platforms portdir regex revision variant variants version}
  • port/portindex.tcl

     
    271271set fd [open $tempportindex w]
    272272set save_prefix ${macports::prefix}
    273273foreach key {categories depends_fetch depends_extract depends_build \
    274              depends_lib depends_run description epoch homepage \
     274             depends_lib depends_run depends_test description epoch homepage \
    275275             long_description maintainers name platforms revision variants \
    276276             version portdir replaced_by license installs_libs} {
    277277    set keepkeys($key) 1
  • port1.0/portdepends.tcl

     
    3838}
    3939
    4040# define options
    41 options depends_fetch depends_extract depends_build depends_run depends_lib depends
     41options depends_fetch depends_extract depends_build depends_run depends_lib depends_test depends
    4242# Export options via PortInfo
    43 options_export depends_fetch depends_extract depends_build depends_lib depends_run
     43options_export depends_fetch depends_extract depends_build depends_lib depends_run depends_test
    4444
    4545option_proc depends_fetch portdepends::validate_depends_options
    4646option_proc depends_extract portdepends::validate_depends_options
     
    4747option_proc depends_build portdepends::validate_depends_options
    4848option_proc depends_run portdepends::validate_depends_options
    4949option_proc depends_lib portdepends::validate_depends_options
     50option_proc depends_test portdepends::validate_depends_options
    5051
    5152# New option for the new dependency. We generate a warning because we don't handle this yet.
    5253option_proc depends portdepends::validate_depends_options_new
  • port1.0/portlint.tcl

     
    339355    global os.platform os.arch os.version version revision epoch \
    340356           description long_description platforms categories all_variants \
    341357           maintainers license homepage master_sites checksums patchfiles \
    342            depends_fetch depends_extract depends_lib depends_build \
    343            depends_run distfiles fetch.type lint_portsystem lint_platforms \
     358           depends_fetch depends_extract depends_lib depends_build depends_run \
     359           depends_test distfiles fetch.type lint_portsystem lint_platforms \
    344360           lint_required lint_optional replaced_by conflicts
    345361    set portarch [get_canonical_archs]
    346362
     
    507547    if {[info exists depends_run]} {
    508548        lappend all_depends {*}$depends_run
    509549    }
     550    if {[info exists depends_test]} {
     551        lappend all_depends {*}$depends_test
     552    }
    510553    foreach depspec $all_depends {
    511554        set dep [lindex [split $depspec :] end]
    512555        if {[catch {set res [mport_lookup $dep]} error]} {
     
    523566    }
    524567
    525568    # Check for multiple dependencies
    526     foreach deptype {depends_extract depends_lib depends_build depends_run} {
     569    foreach deptype {depends_extract depends_lib depends_build depends_run depends_test} {
    527570        if {[info exists $deptype]} {
    528571            array set depwarned {}
    529572            foreach depspec [set $deptype] {
  • port1.0/portutil.tcl

     
    14441450                        patch       { set deptypes "depends_fetch depends_extract" }
    14451451                        configure   -
    14461452                        build       { set deptypes "depends_fetch depends_extract depends_lib depends_build" }
    1447 
    1448                         test        -
     1453                        test        { set deptypes "depends_fetch depends_extract depends_lib depends_build depends_run depends_test" }
    14491454                        destroot    -
    14501455                        dmg         -
    14511456                        pkg         -
  • registry2.0/portuninstall.tcl

     
    4444# generate list of all dependencies of the port
    4545proc generate_deplist {port {optslist ""}} {
    4646
    47     set deptypes {depends_fetch depends_extract depends_build depends_lib depends_run}
     47    set deptypes {depends_fetch depends_extract depends_build depends_lib depends_run depends_test}
    4848    set all_dependencies {}
    4949    # look up deps from the saved portfile if possible
    5050    if {![catch {set mport [mportopen_installed [$port name] [$port version] [$port revision] [$port variants] $optslist]}]} {