File: remove_gen.mtest

package info (click to toggle)
atheist 0.20110402-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,348 kB
  • sloc: python: 4,764; xml: 626; makefile: 113; cpp: 54; ansic: 5; sh: 5
file content (15 lines) | stat: -rw-r--r-- 326 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# -*- mode: python; coding: utf-8 -*-

f = "/tmp/generated"
g = Test('touch %s' % f)
g.post += FileExists(f)
g.gen  += f

# Don't remove file until all other tasks finished
d = Daemon('while true; do if [ ! -f %s ]; then exit 1; fi; done' % f,
           shell=True, delay=2)
d.pre += FileExists(f)
d.post += FileExists(f)