[MacPorts] #56016: make test uses the installed version of MacPorts, not the just-built one

MacPorts noreply at macports.org
Mon Mar 12 07:04:43 UTC 2018


#56016: make test uses the installed version of MacPorts, not the just-built one
------------------------+--------------------
 Reporter:  ryandesign  |      Owner:
     Type:  defect      |     Status:  new
 Priority:  Normal      |  Milestone:
Component:  base        |    Version:  2.4.99
 Keywords:              |       Port:
------------------------+--------------------
 `make test` uses some combination of the already installed MacPorts and
 the just-built one. This can cause tests to fail if the installed version
 doesn't have the same capabilities as the built version.

 For example, when I had MacPorts 2.4.2 installed, and then cloned master
 and ran `./configure` and `make` and `make test` (without running `sudo
 make install`), the "Sed in place" test failed, saying it `can't read
 "portutil::autoconf::sed_ext_flag": no such variable`.
 `portutil::autoconf::sed_ext_flag` was removed in
 [209e78f57a3886d1091948c17948fcd4928c855c/macports-base] and no remnant of
 it remains in master, so it must have gotten that from the installed copy
 of MacPorts 2.4.2.

 {{{
 ==== reinplace Reinplace  unit test. "Sed in place" functionality. FAILED
 ==== Contents of test case:

     reinplace s/Macports/MacPorts/1 $file
     catch {set f [open $file r]}
     set cont [read -nonewline $f]
     if { $cont != "MacPorts reinplace unit test?" } {
         return "FAIL: reinplace no args."
     }
     close $f

     reinplace -E s/test?/testing/1 $file
     catch {set f [open $file r]}
     set cont [read -nonewline $f]
     if { $cont != "MacPorts reinplace unit testing?" } {
         return "FAIL: reinplace (-E) extended regex."
     }
     close $f

     reinplace -W $second s/Macports/MP/1 file
     catch {set f [open $second/file r]}
     set cont [read -nonewline $f]
     if { $cont != "MP reinplace unit test?" } {
         return "FAIL: reinplace (-W) relative path."
     }
     close $f

     reinplace -n s/unit/testing/1 $file
     catch {set f [open $file r]}
     set cont [read -nonewline $f]
     if { $cont != "" } {
         return "FAIL: reinplace (-n) suppress output."
     }
     close $f

     return "Reinplace successful."


 ---- Test generated error; Return code was: 1
 ---- Return code should have been one of: 0 2
 ---- errorInfo: can't read "portutil::autoconf::sed_ext_flag": no such
 variable
     while executing
 "if {$portutil::autoconf::sed_ext_flag eq "N/A"} {
                 ui_debug "sed extended regexp not available"
                 return -code error "rei..."
     (procedure "reinplace" line 80)
     invoked from within
 "reinplace -E s/test?/testing/1 $file"
     ("uplevel" body line 10)
     invoked from within
 "uplevel 1 $script"
 ---- errorCode: NONE
 ==== reinplace FAILED
 }}}

--
Ticket URL: <https://trac.macports.org/ticket/56016>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list