mirror of https://github.com/vitalif/openscad
make mingwcon.bat work better. improve git error message for test print.
parent
c3a3710cb4
commit
8fb483c0ea
|
@ -1,3 +1,10 @@
|
|||
# Openscad Test Console
|
||||
#
|
||||
# Script to make it easier to pull up a command-line console or
|
||||
# running Ctest under Windows(TM)
|
||||
#
|
||||
# public domain, by Don Bright <hugh.m.bright@gmail.com>
|
||||
|
||||
import os,sys
|
||||
|
||||
thisfile_abspath=os.path.abspath(__file__)
|
||||
|
@ -21,9 +28,13 @@ print 'searching for ctest.exe'
|
|||
ctestpath=''
|
||||
for basedir in 'C:/Program Files','C:/Program Files (x86)':
|
||||
if os.path.isdir(basedir):
|
||||
for root,dirs,files in os.walk(basedir):
|
||||
if 'ctest.exe' in files:
|
||||
ctestpath=os.path.join(root,'ctest.exe')
|
||||
pflist = os.listdir(basedir)
|
||||
for subdir in pflist:
|
||||
if 'cmake' in subdir.lower():
|
||||
for root,dirs,files in os.walk(subdir):
|
||||
if 'ctest.exe' in files:
|
||||
ctestpath=os.path.join(root,'ctest.exe')
|
||||
|
||||
if not os.path.isfile(ctestpath):
|
||||
print 'error, cant find ctest.exe'
|
||||
else:
|
||||
|
@ -33,20 +44,12 @@ else:
|
|||
|
||||
#cmd = 'start "OpenSCAD Test console" /wait /d c:\\temp cmd.exe'
|
||||
#cmd = 'start /d "'+starting_dir+'" cmd.exe "OpenSCAD Test Console"'
|
||||
cmd = 'start /d "'+starting_dir+'" "cmd.exe /k mingwcon.bat"'
|
||||
cmd = 'start /d "'+starting_dir+'" cmd.exe "/k mingwcon.bat"'
|
||||
print 'opening console: running ',cmd
|
||||
os.system( cmd )
|
||||
|
||||
# figure out how to run convert script
|
||||
# dont use mingw64 in linbuild path?
|
||||
|
||||
# run a batch file with greeting
|
||||
|
||||
# auto find 'ctest' binary and add to path?
|
||||
# auto find 'python' binary and add to path?
|
||||
|
||||
# info on running ctest
|
||||
# and link to doc/testing.txt and ctest website
|
||||
#
|
||||
# figure out better windows prompt, can it be set?
|
||||
|
||||
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
@echo off
|
||||
@echo Welcome to the OpenSCAD test console. Please see ..\doc\testing.txt
|
||||
@echo for full instructions. Usage examples:
|
||||
@echo Welcome to the OpenSCAD test console. Basic commands:
|
||||
@echo.
|
||||
@echo ctest :: run standard set of tests
|
||||
@echo ctest -C All :: run all tests
|
||||
@echo ctest -R cgal.*circle :: run all tests named 'cgal ... circle'
|
||||
@echo.
|
||||
@echo (For full instructions please see ..\doc\testing.txt)
|
||||
@echo.
|
||||
@echo ctest ::# run standard set of tests
|
||||
@echo ctest -C All ::# run all tests
|
||||
@echo ctest -R cgal.*circle ::# run all tests named 'cgal ... circle'
|
||||
@echo on
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ def read_gitinfo():
|
|||
out = 'Git branch: ' + branch + ' from origin ' + origin + '\n'
|
||||
out += 'Git upstream: ' + upstream + '\n'
|
||||
except:
|
||||
out = 'Problem running git'
|
||||
out = 'Git branch: Unknown (could not run git)\n'
|
||||
return out
|
||||
|
||||
def read_sysinfo(filename):
|
||||
|
|
Loading…
Reference in New Issue