File: fileEquals.test

package info (click to toggle)
atheist 0.20110402-2
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 1,332 kB
  • ctags: 902
  • sloc: python: 4,764; xml: 626; makefile: 113; cpp: 54; ansic: 5; sh: 5
file content (19 lines) | stat: -rw-r--r-- 445 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# -*- mode: python -*-

import logging

this_file = '$testdir/$testname.test'

t1 = Test('cat %s | cat' % this_file, shell=True, desc="FileEquals")
t1.post += FileEquals(this_file)


t2 = Test('ncat --send-only -l 3010 < %s' % this_file, shell=True,
          detach=True, timeout=0)
t2.pre += Not(OpenPort(3010))


t3 = Test('ncat localhost 3010')
t3.pre += Poll(TaskRunning(t2))
t3.pre += Poll(OpenPort(3010))
t3.post += FileEquals(this_file)