Boost logo

Boost Testing :

From: Reece Dunn (msclrhd_at_[hidden])
Date: 2006-02-26 04:51:41

Vladimir Prus wrote:
>Reece Dunn wrote:
> > I have found another issue with After doing a V2 run,
> > status contains directories and filenames that have a character that is
> > displayed as a square (unrepresentable). I.e., it is testing for Unicode
> > characters. However, when is removing a previous boost
> > I get the following error:
>Strange. Then stock version of should have the same problem
>I did not change anything. Maybe it's just was never detected.

This was fixed in the Boost version of using:
   shutils.rmtree( unicode( path ))

(see my updated that fixes this issue and an issue when
running monitored builds).

> > Another question: I am using cygwin bash to run the regression tools,
> > running a Windows version of python, so is it possible to detect this
> > situation and use the unix/cygwin tools?
>Can you clarify?

At the moment, is using cmd.exe and del to perform the
regression tests when I use a Windows version of Python, even though I have
cygwin installed. Since I have cygwin installed, I would like to use rm,
tee, etc. even if I am running the Windows version of Python.

This can be fixed by using this function:

def platform_id():
    if sys.platform == 'win32':
        # Try to use the tee command (part of cygwin and mingw
        text = 'Is this really cygwin?'
        file = 'cygwin-test.tst'
        os.system( 'echo %s 2>&1 | tee %s 2>&1 >nul' % ( text, file ))

        # If the test file exists, then we have tee...
        if os.path.exists( file ):
            line = open( file ).readline().replace( ' \r\n', '' )
            os.unlink( file )

            # If the file contains the text we outputted, assume the cygwin
            # tools are available...
            if line == text:
                return 'cygtools'

    return sys.platform

Also, my cygwin version of python chokes on the call to platform.system():

Traceback (most recent call last):
  File "./", line 918, in ?
    commands[ command ]( **accept_args( args ) )
  File "./", line 804, in accept_args
    options = {
  File "./", line 107, in platform_name
    return platform.system()
AttributeError: 'module' object has no attribute 'system'

The fix is to have:

def platform_name():
    if sys.platform == 'win32':
        return 'Windows'
    elif sys.platform == 'cygwin':
        return 'Windows/Cygwin'

    return platform.system()

- Reece

Boost-testing list run by mbergal at