Skip to content

Commit 1b4b4e9

Browse files
committed
+ Start porting auto tests to git
1 parent 0ed4fe7 commit 1b4b4e9

File tree

3 files changed

+55
-9
lines changed

3 files changed

+55
-9
lines changed

Diff for: distrib/screenshot.h

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#ifndef DISTRIB_SCREENSHOT_INTERNAL_H
2+
#define DISTRIB_SCREENSHOT_INTERNAL_H
3+
14

25
void TakeScreenshot(){
36
char * buffer = new char[54 + 1024*768*3];
@@ -40,3 +43,6 @@ void callGlfwWindowHint(int target, int hint){
4043
#define glfwSwapBuffers(a) TakeScreenshot(); break;
4144
#define glfwGetTime() Zero()
4245
#define glfwWindowHint(a,b) callGlfwWindowHint(a,b)
46+
47+
48+
#endif

Diff for: distrib/tests_potiron.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,24 @@
22

33
Clean()
44

5-
HgUpdate33()
5+
GitUpdate33()
66
PatchAll()
77
Build_VC11Express_64()
88
RunAll()
9+
Build_VC14Express_64()
10+
RunAll()
911
Build_CodeBlocks()
1012
RunAll()
1113

1214
Clean()
1315

14-
HgUpdate21()
16+
GitUpdate21()
1517
PatchAll()
16-
Build_VC11Express_64()
18+
Build_VC14Express_64()
1719
RunAll()
1820

1921
Clean()
20-
HgUpdate33()
22+
GitUpdate33()
2123

2224

2325

Diff for: distrib/utils.py

+43-5
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88
import math
99
from time import sleep
1010

11-
CMakePath = r'C:\Program Files (x86)\CMake 2.8\bin\cmake.exe'
11+
CMakePath = r'C:\Program Files (x86)\CMake\bin\cmake.exe'
1212
VisualStudio10Path = r'C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.com'
1313
VisualStudio11ExpressPath = r'C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\WDExpress.exe'
14+
VisualStudio14ExpressPath = r'C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\WDExpress.exe'
1415
CodeBlocksPath = r'C:\Program Files (x86)\CodeBlocks\codeblocks.exe'
1516

1617
def SetCMakePath(path):
@@ -78,12 +79,19 @@ def InsertScreenshotCode(path):
7879
for line in fileinput.input(path, inplace = 1): # Does a list of files, and writes redirects STDOUT to the file in question
7980
print line.replace("#include <glfw3.h>", "#include <glfw3.h>\n#include \"distrib/screenshot.h\" // added by insertscreenshot.py; should NOT be committed !"),
8081

81-
def HgUpdate21():
82+
def __HgUpdate21():
8283
os.system('hg update --clean "2.1 branch"')
8384

84-
def HgUpdate33():
85+
def GitUpdate21():
86+
os.system('git checkout -f origin/2.1_branch')
87+
88+
def __HgUpdate33():
8589
os.system('hg update --clean "default"')
8690

91+
def GitUpdate33():
92+
os.system('git checkout -f origin/master')
93+
94+
8795
def Build_VC10_32():
8896
print "Building with Visual Studio 10, 32 bits"
8997
global CMakePath
@@ -118,7 +126,7 @@ def Build_VC11Express_32():
118126
global CMakePath
119127
global VisualStudio11ExpressPath
120128
if os.path.exists("build_VC11_32") == False:
121-
os.makedirs("build_VC110_32")
129+
os.makedirs("build_VC11_32")
122130
os.chdir("build_VC11_32")
123131
with open(os.devnull, "w") as fnull:
124132
print "Running CMake..."
@@ -142,6 +150,36 @@ def Build_VC11Express_64():
142150
os.chdir("..")
143151

144152

153+
def Build_VC14Express_32():
154+
print "Building with Visual Studio 14 Express Desktop, 32 bits"
155+
global CMakePath
156+
global VisualStudio14ExpressPath
157+
if os.path.exists("build_VC14_32") == False:
158+
os.makedirs("build_VC14_32")
159+
os.chdir("build_VC14_32")
160+
with open(os.devnull, "w") as fnull:
161+
print "Running CMake..."
162+
subprocess.call( [CMakePath, '-G', 'Visual Studio 14', '-D', 'INCLUDE_DISTRIB:bool=true', '../../'], stdout=fnull, stderr=fnull )
163+
print "Compiling everything..."
164+
subprocess.call( [VisualStudio14ExpressPath, '/build', 'RelWithDebInfo', 'Tutorials.sln'], stdout=fnull, stderr=fnull )
165+
os.chdir("..")
166+
167+
def Build_VC14Express_64():
168+
print "Building with Visual Studio 14 Express Desktop, 64 bits"
169+
global CMakePath
170+
global VisualStudio14ExpressPath
171+
if os.path.exists("build_VC14_64") == False:
172+
os.makedirs("build_VC14_64")
173+
os.chdir("build_VC14_64")
174+
with open(os.devnull, "w") as fnull:
175+
print "Running CMake..."
176+
subprocess.call( [CMakePath, '-G', 'Visual Studio 14 Win64', '-D', 'INCLUDE_DISTRIB:bool=true', '../../'], stdout=fnull, stderr=fnull )
177+
print "Compiling everything..."
178+
subprocess.call( [VisualStudio14ExpressPath, '/build', 'RelWithDebInfo', 'Tutorials.sln'], stdout=fnull, stderr=fnull )
179+
os.chdir("..")
180+
181+
182+
145183
def Build_CodeBlocks():
146184
print "Building with Code::Blocks, ?? bits"
147185
global CMakePath
@@ -267,7 +305,7 @@ def OptimusForceNVIDIA():
267305
print "Forcing NVidia GPU (on Optimus system)..."
268306
subprocess.call(["selectoptimus.exe", "NVIDIA"])
269307

270-
def Package(path):
308+
def __Package(path):
271309
print "Packaging into " + path + " ..."
272310
cwd = os.getcwd()
273311
os.chdir("..");

0 commit comments

Comments
 (0)