File: test.py

package info (click to toggle)
libaws 20.2-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 16,656 kB
  • sloc: ada: 95,505; python: 2,270; ansic: 1,017; makefile: 829; xml: 235; javascript: 202; java: 112; sh: 106
file content (35 lines) | stat: -rw-r--r-- 737 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from test_support import *
import os

def create_res(name,content):
    f=open(name,'w')
    f.write(content)
    f.close();

def gen(c):
    if os.environ.get("OS") == "Windows_NT":
        return c * 20;
    else:
        return c * 50;

os.mkdir('rout')

D='dir1_' + gen('x')
SD=D + '/' + 'sdir_' + gen('y')
SSD=SD + '/' + 'ssdir_' + gen('z')

os.mkdir(D)
os.mkdir(SD)
os.mkdir(SSD)

create_res(D + '/text1.txt', 'text 1')
create_res(D + '/text2.txt', 'text 2')
create_res(SD + '/text3.txt', 'text 3')
create_res(SD + '/text4.txt', 'text 4')
create_res(SSD + '/text5-DEMO.txt', 'text 5')
create_res(SSD + '/N-text6.txt', 'text 6')

exec_cmd('awsres',
         ['-q', '-r', 'rdemo', '-R', '-o', 'rout', D])

build_and_run('deep_res');