onqtam | 1586ea2 | 2016-05-21 18:02:26 +0300 | [diff] [blame] | 1 | #!/usr/bin/python2.7 |
| 2 | |
| 3 | import os |
| 4 | import sys |
| 5 | |
| 6 | os.chdir("../") |
| 7 | |
| 8 | if not os.path.exists("build"): os.makedirs("build") |
| 9 | if not os.path.exists("build-mingw"): os.makedirs("build-mingw") |
| 10 | |
| 11 | res = 0 |
| 12 | |
| 13 | os.chdir("build") |
| 14 | res = res + os.system("cmake .. -G \"Visual Studio 14 2015 Win64\""); |
| 15 | res = res + os.system("cmake .. -DTEST_MODE=COLLECT"); |
| 16 | res = res + os.system("cmake --build ."); |
| 17 | res = res + os.system("ctest -C Debug --output-on-failure"); |
| 18 | res = res + os.system("cmake .. -DTEST_MODE=COMPARE"); |
| 19 | res = res + os.system("ctest -C Debug --output-on-failure"); |
| 20 | os.chdir("../") |
| 21 | |
| 22 | os.chdir("build-mingw") |
| 23 | res = res + os.system("cmake .. -G \"MinGW Makefiles\" -DCMAKE_BUILD_TYPE=Debug"); |
| 24 | res = res + os.system("cmake .. -G \"MinGW Makefiles\""); |
| 25 | res = res + os.system("cmake .. -DTEST_MODE=COMPARE"); |
| 26 | res = res + os.system("cmake --build ."); |
| 27 | res = res + os.system("ctest --output-on-failure"); |
| 28 | os.chdir("../") |
| 29 | |
| 30 | os.chdir("scripts") |
| 31 | |
| 32 | if res != 0: |
| 33 | print "!!! OMGOMGOMG SOMETHING FAILED!\n" |
| 34 | print "!!! OMGOMGOMG SOMETHING FAILED!\n" |
| 35 | print "!!! OMGOMGOMG SOMETHING FAILED!\n" |
| 36 | sys.exit(1) |