0

I'm looking for a way to run only failed pytests during last build.

I've tried --lf option for pytest but it did not help, I guess it is so because of teamcity.

Does anyone faced the same problem?

Rabodaber
  • 163
  • 2
  • 9
  • 1
    You'd probably need to get teamcity to store the `.cache` directory somehow. – The Compiler Aug 31 '16 at 10:54
  • 1
    I would check these assumptions: 1st your working directory is not changing during test runs and 2nd your tests are being executed on the same build agent. – grundic Sep 06 '16 at 12:05
  • @grundic Yeah, same idea came into my mind, but we are using a small pull of agents. As far as I know Teamcity provides an ability to specify agents for build, not specific run. – Rabodaber Sep 07 '16 at 15:37
  • @grundic guess working directory might be a problem, tried on the same agent without success – Rabodaber Sep 08 '16 at 09:06
  • @Rabodaber, you should be able to check working directory from the logs of Teamcity, it should be printed somewhere at the beginning of the build. – grundic Sep 08 '16 at 11:02

1 Answers1

0

Thanks to usefull answer, I figured out what was wrong with teamcity.

Multiple builds were using same checkout directory, what caused problems.

As @grundic mentioned:

  1. check that your working directory is not changing

  2. use same agent

Rabodaber
  • 163
  • 2
  • 9