HyperDbg Debugger
Loading...
Searching...
No Matches
test-environment Namespace Reference

Functions

 copy_dir (from_dir, to_dir)
 
 main ()
 

Function Documentation

◆ copy_dir()

test-environment.copy_dir ( from_dir,
to_dir )
4def copy_dir(from_dir, to_dir) :
5 files_in_src = os.listdir(from_dir)
6
7 for file_name in files_in_src:
8 full_file_name = os.path.join(from_dir, file_name)
9 if os.path.isfile(full_file_name):
10 shutil.copy(full_file_name, os.path.join(to_dir, file_name))
11
12

◆ main()

test-environment.main ( )
13def main():
14
15 #
16 # Create script engine test files
17 #
18 print("Creating script engine test environment...")
19
20 from_dir = "..\\hyperdbg\\script-engine\\modules\\script-engine-test\\script-test-cases"
21 to_dir1 = "..\\hyperdbg\\hyperdbg-cli\\script-test-cases"
22
23 if os.path.exists(to_dir1) and os.path.isdir(to_dir1):
24 shutil.rmtree(to_dir1)
25
26 os.mkdir(to_dir1)
27
28 copy_dir(from_dir, to_dir1)
29
30 #
31 # copy to build directories
32 #
33 to_dir2 = "..\\hyperdbg\\build\\bin\\debug"
34 to_dir3 = "..\\hyperdbg\\build\\bin\\release"
35
36 if os.path.exists(to_dir2) :
37 to_dir2 = to_dir2 + "\\script-test-cases"
38
39 if os.path.exists(to_dir2) and os.path.isdir(to_dir2):
40 shutil.rmtree(to_dir2)
41
42 os.mkdir(to_dir2)
43 copy_dir(from_dir, to_dir2)
44
45 if os.path.exists(to_dir3) :
46 to_dir3 = to_dir3 + "\\script-test-cases"
47
48 if os.path.exists(to_dir3) and os.path.isdir(to_dir3):
49 shutil.rmtree(to_dir3)
50
51 os.mkdir(to_dir3)
52 copy_dir(from_dir, to_dir3)
53
54
55
56 if os.path.exists(to_dir2) :
57 to_dir2 = to_dir2 + "\\script-test-cases"
58
59
60 print("Testing environment is made successfully")
61
62
int main()
main function
Definition hyperdbg-app.cpp:113