Skip to content
Snippets Groups Projects
  1. Jun 16, 2017
  2. Jun 07, 2017
  3. May 23, 2017
    • Matt Harbison's avatar
      killdaemons: close pid file before killing processes · f840b2621cce
      Matt Harbison authored
      With #serve enabled on Windows, I was getting occasional stacktraces like this:
      
        Errored test-hgweb-json.t: Traceback (most recent call last):
          File "./run-tests.py", line 724, in run
            self.tearDown()
          File "./run-tests.py", line 805, in tearDown
            killdaemons(entry)
          File "./run-tests.py", line 540, in killdaemons
            logfn=vlog)
          File "...\tests\killdaemons.py", line 94, in killdaemons
            os.unlink(pidfile)
        WindowsError: [Error 32] The process cannot access the file because it is
           being used by another process: '...\\hgtests.zmpqj3\\child80\\daemon.pids'
      
      Adrian suggested using util.posixfile, which works.  However, the 'mercurial'
      package isn't in sys.path when invoking run-tests.py, and it isn't clear that
      hacking[1] it in is a good thing (especially for test-run-tests.t, which uses an
      installation in a temp folder).
      
      I tried using ProcessMonitor to figure out what the other process is, but that
      monitoring slows things down to such a degree that the issue doesn't occur.  I
      was ready to blame the virus scanner, but it happens without that too.
      
      Looking at the code, I don't see anything that would have the pid file open.
      But I was able to get through about 20 full test runs without an issue with this
      minor change, whereas before it was pretty certain to hit this at least once in
      two or three runs.
      
      [1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-May/097907.html
      f840b2621cce
  4. Aug 18, 2016
  5. Apr 16, 2016
  6. Jun 08, 2015
  7. Apr 11, 2015
    • Augie Fackler's avatar
      python3: update killdaemons and run-tests print and exception syntax · 0adc22a0b6b3
      Augie Fackler authored
      test-run-tests.t still passes fine on Python 2.6. run-tests.py --local
      no longer fails with syntax errors, and now fails looking for xrange.
      
      Most changes done with
      
      2to3 -w -f numliterals -f except -f print tests/run-tests.py tests/killdaemons.py
      
      after which one import was fixed in run-tests and a __future__ import
      was added.
      0adc22a0b6b3
  8. Apr 29, 2014
  9. Mar 10, 2014
  10. Feb 12, 2014
  11. Jan 17, 2014
  12. Aug 20, 2012
  13. Aug 19, 2012
  14. Apr 14, 2010
  15. Jul 05, 2009
  16. Nov 07, 2008
Loading