File: SConstruct

package info (click to toggle)
scons 4.4.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 45,476 kB
  • sloc: xml: 199,987; python: 133,450; javascript: 4,671; sh: 1,007; perl: 493; ruby: 229; ansic: 180; java: 139; makefile: 134; f90: 108; cpp: 71; yacc: 39; lex: 10
file content (24 lines) | stat: -rw-r--r-- 809 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import sys
import os
import threading

import random
PORT = random.randint(10000, 60000)

sys.path.append(os.getcwd())
from teststate import server_thread

# this thread will setup a sever for the different tasks to talk to
# and act as a manager of IPC and the different tasks progressing
# the test through different states
x = threading.Thread(target=server_thread, args=(PORT,))
x.daemon = True
x.start()

MyCopy = Builder(action=[[sys.executable, 'mycopy.py', '$TARGET', '$SOURCE', str(PORT)]])
Fail = Builder(action=[[sys.executable, 'myfail.py', '$TARGETS', '$SOURCE', str(PORT)]])
env = Environment(BUILDERS={'MyCopy' : MyCopy, 'Fail' : Fail})
env.Fail(target='f3', source='f3.in')
env.MyCopy(target='f4', source='f4.in')
env.MyCopy(target='f5', source='f5.in')
env.MyCopy(target='f6', source='f6.in')