Opened 12 years ago

Closed 12 years ago

#19206 closed Cleanup/optimization (duplicate)

Stale tmp files after running the testsuite.

Reported by: Florian Apolloner Owned by: nobody
Component: Testing framework Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Florian Apolloner)

As seen on the ci, Django's testsuite leaves some data behind:

4.1k	./django_Esgc5K/tmpuI9dnf
8.2k	./django_Esgc5K/tmpeTp_A1/tests
8.2k	./django_Esgc5K/tmpeTp_A1/foo
21k	./django_Esgc5K/tmpeTp_A1
4.1k	./django_Esgc5K/tmp5wdSuu
33k	./django_Esgc5K
37k	./tmpSyauUn/x86
41k	./tmpSyauUn/amd64
4.1k	./tmpSyauUn/minidumps
779k	./tmpSyauUn/extensions/fxdriver@googlecode.com/resource/modules
816k	./tmpSyauUn/extensions/fxdriver@googlecode.com/resource
2.5M	./tmpSyauUn/extensions/fxdriver@googlecode.com/platform/Linux_x86-gcc3/components
2.5M	./tmpSyauUn/extensions/fxdriver@googlecode.com/platform/Linux_x86-gcc3
1.4M	./tmpSyauUn/extensions/fxdriver@googlecode.com/platform/WINNT_x86-msvc/components
1.4M	./tmpSyauUn/extensions/fxdriver@googlecode.com/platform/WINNT_x86-msvc
2.6M	./tmpSyauUn/extensions/fxdriver@googlecode.com/platform/Linux_x86_64-gcc3/components
2.6M	./tmpSyauUn/extensions/fxdriver@googlecode.com/platform/Linux_x86_64-gcc3
6.4M	./tmpSyauUn/extensions/fxdriver@googlecode.com/platform
25k	./tmpSyauUn/extensions/fxdriver@googlecode.com/content
2.9M	./tmpSyauUn/extensions/fxdriver@googlecode.com/components
11M	./tmpSyauUn/extensions/fxdriver@googlecode.com
11M	./tmpSyauUn/extensions
4.1k	./tmpSyauUn/webapps
8.2k	./tmpSyauUn/bookmarkbackups
4.1k	./tmpSyauUn/Cache/D
4.1k	./tmpSyauUn/Cache/2
4.1k	./tmpSyauUn/Cache/A
4.1k	./tmpSyauUn/Cache/1
4.1k	./tmpSyauUn/Cache/7
4.1k	./tmpSyauUn/Cache/6
4.1k	./tmpSyauUn/Cache/0
4.1k	./tmpSyauUn/Cache/F
4.1k	./tmpSyauUn/Cache/8
4.1k	./tmpSyauUn/Cache/4
4.1k	./tmpSyauUn/Cache/E
4.1k	./tmpSyauUn/Cache/C
4.1k	./tmpSyauUn/Cache/B
4.1k	./tmpSyauUn/Cache/5
4.1k	./tmpSyauUn/Cache/9
4.1k	./tmpSyauUn/Cache/3
111k	./tmpSyauUn/Cache
4.1k	./tmpSyauUn/startupCache
29M	./tmpSyauUn
4.1k	./tmpz38m5u
37k	./hsperfdata_jenkins
11M	./tmpjTVehh/test_upload
11M	./tmpjTVehh
11M	./tmpgeUZWe/test_upload
11M	./tmpgeUZWe

extensions/fxdriver@… seems to be coming from selenium, but the rest is from us, we should try to get rid of those! The folders with test_upload are coming from regressiontests/file_uploads and regressiontests/admin_views -- I have no idea yet on how to add a cleanup routine there (yet).

Change History (8)

comment:1 by Florian Apolloner, 12 years ago

The selenium part of the tests is now fixed by upgrading selenium on the buildserver.

comment:2 by Florian Apolloner, 12 years ago

Description: modified (diff)

comment:3 by Roman Gladkov, 12 years ago

In tests don't have exit from selenium at end of tests. need use selenium.quit() for to close session

(django)django|master ⇒ grep -rl selenium.close tests
(django)django|master ⇒ grep -rl selenium.quit tests
(django)django|master ⇒

Last edited 12 years ago by Roman Gladkov (previous) (diff)

comment:4 by Łukasz Rekucki, 12 years ago

At some point, I was thinking about adding suffix=__module__ (apart from prefix=django) to every tmpdir/tmpfile call, so it's easier to track which test didn't cleanup. Do you think it's a good idea?

comment:5 by Claude Paroz, 12 years ago

Component: UncategorizedTesting framework
Triage Stage: UnreviewedAccepted
Type: UncategorizedCleanup/optimization

comment:6 by Claude Paroz <claude@…>, 12 years ago

In 73245b3285f63694d2c63c9b197165dc6d9cfd4e:

Prevented file_upload tests to leave files behind

Refs #19206.

comment:7 by Claude Paroz <claude@…>, 12 years ago

In 2f9f211da867d872a0d3576c3ac515d74f5798cd:

[1.5.x] Prevented file_upload tests to leave files behind

Refs #19206.
Backport of 73245b3 from master.

comment:8 by Aymeric Augustin, 12 years ago

Resolution: duplicate
Status: newclosed

This is a duplicate of #17215. Let's follow up over there.

Note: See TracTickets for help on using tickets.
Back to Top