1
Fork 0
Commit Graph

450 Commits

Author SHA1 Message Date
Matvey Kruglov 2cb46ba2f3 Use args.workdir in StatFile if it exists 2015-08-31 20:53:51 +03:00
Tom Prince 1f4a3f3298 Fix sigtermTime race.
If twisted notices that a process dies between when SIGTERM is sent,
then RunProcess.process.pid will be None, causing checkDead to fail.

In any case, the timer will be leaked, and it will be cancelled after having
been called.
2015-03-18 08:12:45 -06:00
Dustin J. Mitchell 1ef57d77b9 only use obfuscated passwords on command_version 2.16 and higher
Fixes #2969.
2014-10-25 23:01:18 -04:00
Dustin J. Mitchell fa532db1ba update comments for command_version
Based on information in #2969.
2014-10-25 16:57:58 -04:00
Aaron Sokoloski 59e447c9e1 Fix slave hanging caused by sending unicode as initialStdin for shell command 2014-04-25 09:09:02 +01:00
Dustin J. Mitchell eba6d1c2b9 Merge mmartalo/buildbot:2735 (PR #1137)
+autopep8 (?!)
2014-04-20 08:30:49 -04:00
Mihai Martalogu c5a4ad0d33 Fix #2735 pep8 > 1.4.6 has more errors 2014-04-20 11:35:47 +02:00
Dustin J. Mitchell c20712b048 replicate any() for python-2.4 2014-04-19 22:11:27 -04:00
Dustin J. Mitchell c784ec0277 work around missing os.errno on py24 2014-04-19 22:11:17 -04:00
Dustin J. Mitchell 6950deb82d replace with statements with explicit patching 2014-04-19 22:10:59 -04:00
Dustin J. Mitchell f79db2392d Can't use inline conditionals on Python-2.4 2014-04-19 22:10:36 -04:00
Dustin J. Mitchell 8722357297 don't try to fix PB on old Twisted versions 2014-04-19 21:59:51 -04:00
Ed Morley b66cc92ee5 For timeouts include the command being run in the failure string 2014-04-11 16:26:05 +01:00
Dustin J. Mitchell e707ac9b1a fix more pyflakes discovered by pyflakes-0.8.1 2014-04-03 08:44:21 -04:00
Dustin J. Mitchell 0cb72ba536 Merge lewurm/buildbot:printusedsignal (PR #1096) 2014-03-24 20:21:07 -04:00
Dustin J. Mitchell 1b6bd3effa Merge SpecLad/buildbot:win32-shell-escape (PR #1095)
+autopep8
+add r prefix to punctuation string
2014-03-24 20:17:37 -04:00
Bernhard Urban b78bd693f1 slave: print used signal to kill process in logs 2014-03-17 16:53:31 +01:00
Роман Донченко 91d92d2a53 Use win32_batch_quote in shell_quote 2014-03-16 00:40:13 +04:00
Роман Донченко 693a2cb7d0 Implement more thorough shell command line escaping on Windows
On Windows, when a command is specified as a list, it's executed via a
batch file. Previously, the shell escaping being done in the process
was quite minimal (only pipes were being escaped), and not entirely
correct (for example, an argument of 'a | b' would get escaped to
'"a ^| b"', which is wrong, since the shell ignores carets inside quotes.

This commit expands the escaping logic to cover all shell special
characters that I know of. For compatibility I kept the exception
that lone pipes are not escaped (although I'd rather I hadn't).

I expanded the test for the embedded pipe symbol into a more generic
special character test, and made it no longer Win32-only, since on any
platform it doesn't hurt to check that special characters in arguments
are correctly passed through.
2014-03-15 23:27:27 +04:00
Dustin J. Mitchell c68bbb9f0b Merge jpommerening/buildbot:slave-glob-command (PR #970)
+autopep8
2014-02-21 17:14:46 -05:00
Jonas Pommerening 32f314e6c4 Incorporate improvements from #1066
* rename sent updates `glob` -> `files` (as in ListDir)
* drop the asserts, use base.Command.requiredArgs
* catch only OSError (even that one is quite unlikely to appear) and
  send the appropriate `rc` to master
* rename `globpath` -> `globname` (as in the python docs:
  http://docs.python.org/2/library/glob.html)
2014-02-18 00:19:37 +01:00
Jonas Pommerening 87cca92063 Merge branch 'slave-fs-cmds-cleanup' into slave-glob-command
* slave-fs-cmds-cleanup: (148 commits)
  removed blank line
  send headers and errno for failed fs commands
  check rc in a callback (errback is not called)
  Fix failing test & shell command
  update steps to use requiredArgs
  replace assertions, raise ValueError instead
  replaced "except as" syntax w/ 2.4 compatible comma syntax
  Removed bare excepts
  apply 09749e7 to master
  On solaris use the tail in /usr/xpg4/bin/tail insteaf of /usr/bin/tail which does not support the -n option
  Do not catch GeneratorExit exception
  remove use of MutableMapping, not in Python 2.5
  Ignore decoding errors in atom/rss feeds; fixes #951
  Fix step None bug
  sphinx doesn't seem to support relative paths for logos anymore
  fix typo in comment
  Add systemd unit for slave.
  Add systemd service unit for master.
  add whitespace to avoid failure with Sphinx-1.2.1
  Fix failures where 'git clean' fails but could be clobbered
  ...
2014-02-18 00:19:23 +01:00
Jonas Pommerening ed9c56b524 removed blank line 2014-02-16 21:18:33 +01:00
Jonas Pommerening ce52a890e1 send headers and errno for failed fs commands 2014-02-16 20:54:54 +01:00
Jonas Pommerening d4b04b9158 check rc in a callback (errback is not called) 2014-02-16 20:53:03 +01:00
Jonas Pommerening 4baf41dc5e Fix failing test & shell command 2014-02-16 20:28:13 +01:00
Jonas Pommerening 2f1aba331f update steps to use requiredArgs 2014-02-16 19:52:15 +01:00
Jonas Pommerening 2f9e41343c replace assertions, raise ValueError instead 2014-02-16 19:38:28 +01:00
Jonas Pommerening b9a85da2ef replaced "except as" syntax w/ 2.4 compatible comma syntax 2014-02-16 19:37:00 +01:00
Jonas Pommerening 80e97e3017 Removed bare excepts 2014-02-13 13:47:47 +01:00
Yasser Lebon 09749e7fe7 On solaris use the tail in /usr/xpg4/bin/tail insteaf of /usr/bin/tail which does not support the -n option 2014-02-10 15:29:15 +01:00
Jonas Pommerening d9a1069aae pep8 (so close) 2013-11-20 01:31:52 +01:00
Jonas Pommerening 2831f24450 Added a 'glob' command to the slave.
Can be used to retrieve a list of files from the slave that match
a given pattern. (This is somewhat more portable than using shell
expansion.)
Custom steps can use this command to add filenames to a property
of the build where they may be later picked up by an uploading step.

RemoteCommand('glob', dict(path='[Bb]uild[Bb]ot-*', workdir='wkdir'))
2013-11-20 00:28:17 +01:00
Dustin J. Mitchell e8cf565e7a fix pep8 2013-11-17 14:58:05 -05:00
Dustin J. Mitchell c4062e3353 fix ordering sensitivity in listdir test 2013-11-17 14:57:24 -05:00
Dustin J. Mitchell f9fd8da29e Merge branch 'bug2531-sqash' of git://github.com/srinupiits/buildbot
Conflicts:
	master/buildbot/steps/source/git.py
	master/buildbot/test/unit/test_steps_source_git.py
	slave/buildslave/commands/base.py
	slave/buildslave/commands/registry.py
plus autopep8
2013-11-17 14:47:24 -05:00
Vladimir Rutsky 873777c696 Fix typos: "bulids", "stoppd", "superceded", "documentd" 2013-11-17 11:27:53 +04:00
Pierre Tardy ed8d49e217 autopep8 POST_PEP8_COMMIT
Signed-off-by: Pierre Tardy <pierre.tardy@intel.com>
2013-11-06 19:28:48 +01:00
Edmund wong db362d7a16 Fix E228 2013-10-28 12:30:24 +08:00
Edmund wong 6168e1f28c Fixed some has_key stragglers. 2013-10-21 17:52:29 +08:00
Edmund wong 73d2ccc8a5 Changed .has_key() to in for slave/ 2013-10-21 10:16:18 +08:00
Vladimir Rutsky 85800580d4 Fix pep8 error E111: indentation is not a multiple of four
File master/contrib/buildbot_json.py was completely excluded from pep8
analysis because it uses two spaces for indentation.
2013-10-19 03:40:48 +04:00
Elmir Jagudin 326f678a82 locally disable pylint warnings triggered by interface definitions 2013-10-01 06:45:03 +02:00
Olof Johansson 08434242ad fix anomalous-backslash-in-string (W1401) pylint warning
This warning is often triggered by regular expressions, and prefixing
to the open quotation mark will make python leave any escape sequences
alone, e.g.:

 - re.compile("\w+")
 + re.compile(r"\w+")

This solution is not specific for regular expressions, it can be applied
to any string that contains backslashes that python should not interpret.

This commit also enables the warning in common/pylintrc.
2013-09-17 20:27:39 +02:00
Mark J. Berger 5587c4acff Fixes version checking 2013-09-09 22:23:21 -04:00
Mark J. Berger 50e1caac54 Waiting for sigterm is now nonblocking 2013-09-09 19:56:27 -04:00
Mark J. Berger 12c8bbda2c Adds sigtermTime default to fake runprocess 2013-09-01 10:49:45 -04:00
Mark J. Berger 1c28dabf21 Adds test_sigterm and updates tests to reflect new parameter 2013-08-24 18:53:44 -04:00
Mark J. Berger c8162e8dac Adds sigtermTime to RemoteShellCommand
Adds the parameter sigtermTime to RemoteShellCommand. If sigtermTime is
not None, the buildslave will fire SIGTERM and wait for sigtermTime
seconds before firing SIGKILL. This fixes trac ticket #751.
2013-08-24 18:53:44 -04:00
Srinu P 81ceb910ad Clobber if workdir exists but isn't a git checkout. Fixes #2531 2013-08-21 09:45:38 +05:30