Ticket #835 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

fix windows test failures

Reported by: dustin Owned by:
Priority: critical Milestone: 0.8.1
Version: 0.7.12 Keywords: windows
Cc:

Description

Now that maruel has set up two windows slaves, we need to get their test failures fixed. This is not a 0.8.0 blocker!

[FAIL]: buildbot.test.unit.test_db_dbspec.DBSpec.test_fromURL_sqlitePercentSub

Traceback (most recent call last):
  File "C:slaveslave-win7-py26uilduildbot	estunit	est_db_dbspec.py", line 42, in test_fromURL_sqlitePercentSub
    connargs=(os.path.join(basedir, "x/state.sqlite"),))
  File "C:slaveslave-win7-py26uilduildbot	estunit	est_db_dbspec.py", line 30, in failUnlessConnection
    raise unittest.FailTest("; ".join(errs))
twisted.trial.unittest.FailTest: unexpected connargs: ('/foo/bar/x/state.sqlite',), expected ('/foo/bar\x/state.sqlite',)
===============================================================================
[FAIL]: buildbot.test.unit.test_slave_commands_base.TestShellCommand.testCommandMaxTime

Traceback (most recent call last):
  File "C:slaveslave-win7-py26uilduildbot	estunit	est_slave_commands_base.py", line 151, in check
    self.failUnless({'rc': -1} in b.updates, b.updates)
twisted.trial.unittest.FailTest: [{'header': 'sleep 10; echo hello
 in dir test_slave_commands_base.shellcommand.maxtime
 watching logfiles {}
 argv: sleep 10; echo hello
 environment:
  ALLUSERSPROFILE=C:\ProgramData
  APPDATA=C:\Users\user\AppData\Roaming
  CLIENTNAME=MARUEL-Z600
  COMMONPROGRAMFILES=C:\Program Files (x86)\Common Files
  COMMONPROGRAMFILES(X86)=C:\Program Files (x86)\Common Files
  COMMONPROGRAMW6432=C:\Program Files\Common Files
  COMPUTERNAME=WIN7-BB
  COMSPEC=C:\Windows\system32\cmd.exe
  FP_NO_HOST_CHECK=NO
  HOMEDRIVE=C:
  HOMEPATH=\Users\user
  LOCALAPPDATA=C:\Users\user\AppData\Local
  LOGONSERVER=\\WIN7-BB
  NUMBER_OF_PROCESSORS=2
  OS=Windows_NT
  PATH=C:\Program Files (x86)\CollabNet\Subversion Client;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\python26;c:\python26\scripts;C:\Program Files (x86)\Git\bin
  PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
  PROCESSOR_ARCHITECTURE=x86
  PROCESSOR_ARCHITEW6432=AMD64
  PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 15 Stepping 6, GenuineIntel
  PROCESSOR_LEVEL=6
  PROCESSOR_REVISION=0f06
  PROGRAMDATA=C:\ProgramData
  PROGRAMFILES=C:\Program Files (x86)
  PROGRAMFILES(X86)=C:\Program Files (x86)
  PROGRAMW6432=C:\Program Files
  PROMPT=$P$G
  PSMODULEPATH=C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
  PUBLIC=C:\Users\Public
  PWD=C:\slave\slave-win7-py26\build\_trial_temp\test_slave_commands_base.shellcommand.maxtime
  PYTHONPATH=.;.
  PYTHON_EGG_CACHE=../
  SESSIONNAME=RDP-Tcp#0
  SYSTEMDRIVE=C:
  SYSTEMROOT=C:\Windows
  TEMP=C:\Users\user\AppData\Local\Temp
  TMP=C:\Users\user\AppData\Local\Temp
  USERDOMAIN=win7-bb
  USERNAME=user
  USERPROFILE=C:\Users\user
  WINDIR=C:\Windows
 closing stdin
 using PTY: False
'}, {'header': '
command timed out: 5 seconds elapsed, killing pid 980
'}, {'rc': 1}, {'header': 'elapsedTime=6.000000
'}]
===============================================================================
[FAIL]: buildbot.test.unit.test_slave_commands_base.TestShellCommand.testCommandTimeout

Traceback (most recent call last):
  File "C:slaveslave-win7-py26uilduildbot	estunit	est_slave_commands_base.py", line 137, in check
    self.failUnless({'rc': -1} in b.updates, b.updates)
twisted.trial.unittest.FailTest: [{'header': 'sleep 10; echo hello
 in dir test_slave_commands_base.shellcommand.timeout (timeout 5 secs)
 watching logfiles {}
 argv: sleep 10; echo hello
 environment:
  ALLUSERSPROFILE=C:\ProgramData
  APPDATA=C:\Users\user\AppData\Roaming
  CLIENTNAME=MARUEL-Z600
  COMMONPROGRAMFILES=C:\Program Files (x86)\Common Files
  COMMONPROGRAMFILES(X86)=C:\Program Files (x86)\Common Files
  COMMONPROGRAMW6432=C:\Program Files\Common Files
  COMPUTERNAME=WIN7-BB
  COMSPEC=C:\Windows\system32\cmd.exe
  FP_NO_HOST_CHECK=NO
  HOMEDRIVE=C:
  HOMEPATH=\Users\user
  LOCALAPPDATA=C:\Users\user\AppData\Local
  LOGONSERVER=\\WIN7-BB
  NUMBER_OF_PROCESSORS=2
  OS=Windows_NT
  PATH=C:\Program Files (x86)\CollabNet\Subversion Client;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\python26;c:\python26\scripts;C:\Program Files (x86)\Git\bin
  PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
  PROCESSOR_ARCHITECTURE=x86
  PROCESSOR_ARCHITEW6432=AMD64
  PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 15 Stepping 6, GenuineIntel
  PROCESSOR_LEVEL=6
  PROCESSOR_REVISION=0f06
  PROGRAMDATA=C:\ProgramData
  PROGRAMFILES=C:\Program Files (x86)
  PROGRAMFILES(X86)=C:\Program Files (x86)
  PROGRAMW6432=C:\Program Files
  PROMPT=$P$G
  PSMODULEPATH=C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
  PUBLIC=C:\Users\Public
  PWD=C:\slave\slave-win7-py26\build\_trial_temp\test_slave_commands_base.shellcommand.timeout
  PYTHONPATH=.;.
  PYTHON_EGG_CACHE=../
  SESSIONNAME=RDP-Tcp#0
  SYSTEMDRIVE=C:
  SYSTEMROOT=C:\Windows
  TEMP=C:\Users\user\AppData\Local\Temp
  TMP=C:\Users\user\AppData\Local\Temp
  USERDOMAIN=win7-bb
  USERNAME=user
  USERPROFILE=C:\Users\user
  WINDIR=C:\Windows
 closing stdin
 using PTY: False
'}, {'header': '
command timed out: 5 seconds without output, killing pid 2436
'}, {'rc': 1}, {'header': 'elapsedTime=6.000000
'}]
===============================================================================
[FAIL]: buildbot.test.unit.test_slave_commands_base.TestShellCommand.testKeepStderr

Traceback (most recent call last):
  File "C:slaveslave-win7-py26uilduildbot	estunit	est_slave_commands_base.py", line 97, in check
    self.failUnless({'stderr': 'hello
'} in b.updates)
twisted.trial.unittest.FailTest: None
===============================================================================
[FAIL]: buildbot.test.unit.test_slave_commands_base.TestShellCommand.testKeepStdout

Traceback (most recent call last):
  File "C:slaveslave-win7-py26uilduildbot	estunit	est_slave_commands_base.py", line 110, in check
    self.failUnless({'stdout': 'hello
'} in b.updates)
twisted.trial.unittest.FailTest: None
===============================================================================
[FAIL]: buildbot.test.unit.test_slave_commands_base.TestShellCommand.testStart

Traceback (most recent call last):
  File "C:slaveslave-win7-py26uilduildbot	estunit	est_slave_commands_base.py", line 36, in check
    self.failUnless({'stdout': 'hello
'} in b.updates)
twisted.trial.unittest.FailTest: None

===============================================================================
[FAIL]: buildbot.test.unit.test_slave_commands_base.TestShellCommand.testStderr

Traceback (most recent call last):
  File "C:slaveslave-win7-py26uilduildbot	estunit	est_slave_commands_base.py", line 73, in check
    self.failIf({'stderr': 'hello
'} not in b.updates)
twisted.trial.unittest.FailTest: None
===============================================================================
[FAIL]: buildbot.test.unit.test_slave_commands_base.TestShellCommand.testStringCommand

Traceback (most recent call last):
  File "C:slaveslave-win7-py26uilduildbot	estunit	est_slave_commands_base.py", line 123, in check
    self.failUnless({'stdout': 'hello
'} in b.updates)
twisted.trial.unittest.FailTest: None
===============================================================================
[ERROR]: buildbot.test.regressions.test_change_properties.TestChangeProperties.testDBGetChangeByNumber


Traceback (most recent call last):
  File "C:slaveslave-win7-py26uilduildbot	est
egressions	est_change_properties.py", line 31, in tearDown
    shutil.rmtree(self.basedir)
  File "c:Python26libshutil.py", line 221, in rmtree
    onerror(os.remove, fullname, sys.exc_info())
  File "c:Python26libshutil.py", line 219, in rmtree
    os.remove(fullname)
exceptions.WindowsError: [Error 32] Le processus ne peut pas acc�r au fichier car ce fichier est utilis�ar un autre processus: 'ChangeProperties\state.sqlite'
===============================================================================
[ERROR]: buildbot.test.regressions.test_change_properties.TestChangeProperties.testDBGetChangeNumberedNow

Traceback (most recent call last):
  File "C:slaveslave-win7-py26uilduildbot	est
egressions	est_change_properties.py", line 18, in setUp
    shutil.rmtree(self.basedir)
  File "c:Python26libshutil.py", line 221, in rmtree
    onerror(os.remove, fullname, sys.exc_info())
  File "c:Python26libshutil.py", line 219, in rmtree
    os.remove(fullname)
exceptions.WindowsError: [Error 32] Le processus ne peut pas acc�r au fichier car ce fichier est utilis�ar un autre processus: 'ChangeProperties\state.sqlite'
===============================================================================
[ERROR]: buildbot.test.regressions.test_import_unicode_changes.TestUnicodeChanges.testAsciiChange

Traceback (most recent call last):
  File "C:slaveslave-win7-py26uilduildbot	est
egressions	est_import_unicode_changes.py", line 71, in testAsciiChange
    sm.upgrade(quiet=True)
  File "C:slaveslave-win7-py26uilduildbotdbschemamanager.py", line 56, in upgrade
    upg.upgrade()
  File "C:slaveslave-win7-py26uilduildbotdbschemav1.py", line 246, in upgrade
    self.migrate_changes()
  File "C:slaveslave-win7-py26uilduildbotdbschemav1.py", line 317, in migrate_changes
    source = cPickle.load(open(changes_pickle,"rb"))
exceptions.ImportError: No module named test_import_unicode_changes

===============================================================================
[ERROR]: buildbot.test.regressions.test_import_unicode_changes.TestUnicodeChanges.testNonUnicodeChange

Traceback (most recent call last):
  File "C:slaveslave-win7-py26uilduildbot	est
egressions	est_import_unicode_changes.py", line 24, in setUp
    shutil.rmtree(self.basedir)
  File "c:Python26libshutil.py", line 221, in rmtree
    onerror(os.remove, fullname, sys.exc_info())
  File "c:Python26libshutil.py", line 219, in rmtree
    os.remove(fullname)
exceptions.WindowsError: [Error 32] Le processus ne peut pas acc�r au fichier car ce fichier est utilis�ar un autre processus: 'UnicodeChanges\state.sqlite'
===============================================================================
[ERROR]: buildbot.test.regressions.test_import_unicode_changes.TestUnicodeChanges.testUTF16Change

Traceback (most recent call last):
  File "C:slaveslave-win7-py26uilduildbot	est
egressions	est_import_unicode_changes.py", line 94, in testUTF16Change
    sm.upgrade(quiet=True)
  File "C:slaveslave-win7-py26uilduildbotdbschemamanager.py", line 56, in upgrade
    upg.upgrade()
  File "C:slaveslave-win7-py26uilduildbotdbschemav1.py", line 246, in upgrade
    self.migrate_changes()
  File "C:slaveslave-win7-py26uilduildbotdbschemav1.py", line 317, in migrate_changes
    source = cPickle.load(open(changes_pickle,"rb"))
exceptions.ImportError: No module named changes

===============================================================================
[ERROR]: buildbot.test.regressions.test_import_unicode_changes.TestUnicodeChanges.testUnicodeChange

Traceback (most recent call last):
  File "C:slaveslave-win7-py26uilduildbot	est
egressions	est_import_unicode_changes.py", line 24, in setUp
    shutil.rmtree(self.basedir)
  File "c:Python26libshutil.py", line 221, in rmtree
    onerror(os.remove, fullname, sys.exc_info())
  File "c:Python26libshutil.py", line 219, in rmtree
    os.remove(fullname)
exceptions.WindowsError: [Error 32] Le processus ne peut pas acc�r au fichier car ce fichier est utilis�ar un autre processus: 'UnicodeChanges\state.sqlite'
===============================================================================
[ERROR]: buildbot.test.unit.test_db_dbspec.DBSpec.test_fromURL_sqliteAbsolutePathNoBasedir

Traceback (most recent call last):
  File "C:slaveslave-win7-py26uilduildbot	estunit	est_db_dbspec.py", line 51, in test_fromURL_sqliteAbsolutePathNoBasedir
    d = dbspec.DBSpec.from_url("sqlite:////tmp/state.sqlite")
  File "C:slaveslave-win7-py26uilduildbotdbdbspec.py", line 146, in from_url
    database = os.path.join(basedir, database)
  File "c:Python26lib
tpath.py", line 82, in join
    if path[1:2] != ":" or b[1:2] == ":":
exceptions.TypeError: 'NoneType' object is unsubscriptable
===============================================================================
[ERROR]: buildbot.test.unit.test_db_dbspec.DBSpec.test_fromURL_sqliteArgs

Traceback (most recent call last):
  File "C:slaveslave-win7-py26uilduildbot	estunit	est_db_dbspec.py", line 61, in test_fromURL_sqliteArgs
    d = dbspec.DBSpec.from_url("sqlite:////tmp/state.sqlite?foo=bar")
  File "C:slaveslave-win7-py26uilduildbotdbdbspec.py", line 146, in from_url
    database = os.path.join(basedir, database)
  File "c:Python26lib
tpath.py", line 82, in join
    if path[1:2] != ":" or b[1:2] == ":":
exceptions.TypeError: 'NoneType' object is unsubscriptable
===============================================================================
[ERROR]: buildbot.test.unit.test_db_schema_master.DBSchemaManager.test_upgrade_full

Traceback (most recent call last):
  File "C:slaveslave-win7-py26uilduildbot	estunit	est_db_schema_master.py", line 200, in test_upgrade_full
    self.sm.upgrade(quiet=True)
  File "C:slaveslave-win7-py26uilduildbotdbschemamanager.py", line 56, in upgrade
    upg.upgrade()
  File "C:slaveslave-win7-py26uilduildbotdbschemav1.py", line 246, in upgrade
    self.migrate_changes()
  File "C:slaveslave-win7-py26uilduildbotdbschemav1.py", line 317, in migrate_changes
    source = cPickle.load(open(changes_pickle,"rb"))
exceptions.ImportError: No module named copy_reg

[ERROR]: buildbot.test.regressions.test_change_properties.TestChangeProperties.testDBGetChangeByNumber

Traceback (most recent call last):
  File "/home/user/slave/slave-xp-cygwin-1.7/build/buildbot/test/regressions/test_change_properties.py", line 24, in setUp
    self.sm.upgrade()
  File "/home/user/slave/slave-xp-cygwin-1.7/build/buildbot/db/schema/manager.py", line 56, in upgrade
    upg.upgrade()
  File "/home/user/slave/slave-xp-cygwin-1.7/build/buildbot/db/schema/v2.py", line 9, in upgrade
    self.set_version()
  File "/home/user/slave/slave-xp-cygwin-1.7/build/buildbot/db/schema/v2.py", line 32, in set_version
    c.execute("""UPDATE version set version = 2 where version = 1""")
pysqlite2.dbapi2.OperationalError: unable to open database file
===============================================================================
[ERROR]: buildbot.test.regressions.test_change_properties.TestChangeProperties.testDBGetChangeNumberedNow

Traceback (most recent call last):
  File "/home/user/slave/slave-xp-cygwin-1.7/build/buildbot/test/regressions/test_change_properties.py", line 18, in setUp
    shutil.rmtree(self.basedir)
  File "/usr/lib/python2.5/shutil.py", line 180, in rmtree
    onerror(os.remove, fullname, sys.exc_info())
  File "/usr/lib/python2.5/shutil.py", line 178, in rmtree
    os.remove(fullname)
exceptions.OSError: [Errno 16] Device or resource busy: 'ChangeProperties/state.sqlite'
===============================================================================
[ERROR]: buildbot.test.regressions.test_import_unicode_changes.TestUnicodeChanges.testAsciiChange

Traceback (most recent call last):
  File "/home/user/slave/slave-xp-cygwin-1.7/build/buildbot/test/regressions/test_import_unicode_changes.py", line 71, in testAsciiChange
    sm.upgrade(quiet=True)
  File "/home/user/slave/slave-xp-cygwin-1.7/build/buildbot/db/schema/manager.py", line 56, in upgrade
    upg.upgrade()
  File "/home/user/slave/slave-xp-cygwin-1.7/build/buildbot/db/schema/v2.py", line 9, in upgrade
    self.set_version()
  File "/home/user/slave/slave-xp-cygwin-1.7/build/buildbot/db/schema/v2.py", line 32, in set_version
    c.execute("""UPDATE version set version = 2 where version = 1""")
pysqlite2.dbapi2.OperationalError: unable to open database file
===============================================================================
[ERROR]: buildbot.test.regressions.test_import_unicode_changes.TestUnicodeChanges.testNonUnicodeChange

Traceback (most recent call last):
  File "/home/user/slave/slave-xp-cygwin-1.7/build/buildbot/test/regressions/test_import_unicode_changes.py", line 24, in setUp
    shutil.rmtree(self.basedir)
  File "/usr/lib/python2.5/shutil.py", line 180, in rmtree
    onerror(os.remove, fullname, sys.exc_info())
  File "/usr/lib/python2.5/shutil.py", line 178, in rmtree
    os.remove(fullname)
exceptions.OSError: [Errno 16] Device or resource busy: 'UnicodeChanges/state.sqlite'
===============================================================================
[ERROR]: buildbot.test.regressions.test_import_unicode_changes.TestUnicodeChanges.testUTF16Change

Traceback (most recent call last):
  File "/home/user/slave/slave-xp-cygwin-1.7/build/buildbot/test/regressions/test_import_unicode_changes.py", line 24, in setUp
    shutil.rmtree(self.basedir)
  File "/usr/lib/python2.5/shutil.py", line 180, in rmtree
    onerror(os.remove, fullname, sys.exc_info())
  File "/usr/lib/python2.5/shutil.py", line 178, in rmtree
    os.remove(fullname)
exceptions.OSError: [Errno 16] Device or resource busy: 'UnicodeChanges/state.sqlite'
===============================================================================
[ERROR]: buildbot.test.regressions.test_import_unicode_changes.TestUnicodeChanges.testUnicodeChange

Traceback (most recent call last):
  File "/home/user/slave/slave-xp-cygwin-1.7/build/buildbot/test/regressions/test_import_unicode_changes.py", line 24, in setUp
    shutil.rmtree(self.basedir)
  File "/usr/lib/python2.5/shutil.py", line 180, in rmtree
    onerror(os.remove, fullname, sys.exc_info())
  File "/usr/lib/python2.5/shutil.py", line 178, in rmtree
    os.remove(fullname)
exceptions.OSError: [Errno 16] Device or resource busy: 'UnicodeChanges/state.sqlite'

Change History

comment:1 Changed 3 years ago by marcusl

The remove-problems is probably due to the filesystem differences. On Windows, you can't unlink an open file, whereas on *nix it's possible, the file goes away once all open handles to it are closed.

comment:2 Changed 3 years ago by dustin

Yeah - it looks like some of the tests aren't closing their db correctly.

The other problems are more mysterious, though.

comment:3 Changed 3 years ago by dustin

  • Keywords windows added

comment:4 Changed 3 years ago by Dustin J. Mitchell

fix assumption of unix paths in test; refs #835

Changeset: 2c35fc1b781ad44cc1809631e600e81c051f4931

comment:5 Changed 3 years ago by Dustin J. Mitchell

fix windows test failure due to pathsep (refs #835)

Changeset: e2b10b8819089301c6c09e5cafc9516bc0e2443a

comment:6 Changed 3 years ago by Dustin J. Mitchell

don't try to join basedir when it is None (refs #835)

Changeset: b384d561f2d4b5aae8b09181161f0cb338ba4699

comment:7 Changed 3 years ago by Dustin J. Mitchell

env vars do not get native newlines .. so don't test for newlines at all (refs #835)

Changeset: a0a586f251f65587ef48ffe6c53b5e77c23364f6

comment:8 Changed 3 years ago by dustin

  • Status changed from new to closed
  • Resolution set to fixed

And with that, for the moment our windows failures are fixed!

comment:9 Changed 3 years ago by Dustin J. Mitchell

fix assumption of unix paths in test; refs #835

Changeset: 2c35fc1b781ad44cc1809631e600e81c051f4931

comment:10 Changed 3 years ago by Dustin J. Mitchell

fix windows test failure due to pathsep (refs #835)

Changeset: e2b10b8819089301c6c09e5cafc9516bc0e2443a

Note: See TracTickets for help on using tickets.