Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pykat
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
finesse
pykat
Commits
0ce64fb3
Commit
0ce64fb3
authored
11 years ago
by
Daniel Brown
Browse files
Options
Downloads
Patches
Plain Diff
fixing somethings to get working on python 2.6 and git
parent
2bfc6dc0
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
pykat/testing/utils.py
+3
-3
3 additions, 3 deletions
pykat/testing/utils.py
pykat/testing/web_server.py
+11
-7
11 additions, 7 deletions
pykat/testing/web_server.py
with
14 additions
and
10 deletions
pykat/testing/utils.py
+
3
−
3
View file @
0ce64fb3
import
subprocess
as
sub
import
os
GIT_BIN
=
"
c:
\\
cygwin64
\\
bin
\\
git
"
GIT_BIN
=
"
/usr/
bin
/
git
"
class
RunException
(
Exception
):
def
__init__
(
self
,
returncode
,
args
,
err
,
out
):
...
...
@@ -23,13 +23,13 @@ def git(args):
print
os
.
getcwd
()
p
=
sub
.
Popen
(
cmd
,
stdout
=
sub
.
PIPE
,
stderr
=
sub
.
PIPE
)
p
=
sub
.
Popen
(
cmd
,
stdout
=
sub
.
PIPE
,
stderr
=
sub
.
PIPE
,
shell
=
True
)
out
,
err
=
p
.
communicate
()
if
p
.
returncode
!=
0
:
print
"
STDERR:
"
+
err
print
"
STDOUT:
"
+
err
raise
RunException
(
p
.
returncode
,
args
,
err
,
out
)
raise
RunException
(
p
.
poll
()
,
args
,
err
,
out
)
return
[
out
,
err
]
This diff is collapsed.
Click to expand it.
pykat/testing/web_server.py
+
11
−
7
View file @
0ce64fb3
...
...
@@ -3,7 +3,7 @@ import sys
from
flask
import
Flask
from
pykat.testing
import
utils
def
start
(
instance_path
,
port
=
5000
,
debug
=
False
):
def
start
(
instance_path
,
port
=
5000
,
debug
=
True
,
ip
=
"
0.0.0.0
"
):
global
app
print
"
starting web server...
"
...
...
@@ -21,27 +21,28 @@ def start(instance_path,port=5000, debug=False):
from
pykat.testing.web
import
app
if
(
app
.
instance_path
!=
instance_path
):
print
app
.
instance_path
,
instance_path
raise
Exception
(
"
Instance path of Flask app didn
'
t match the requested value
"
)
# load up the actual interface code
import
pykat.testing.web.web_interface
# need local copy of src
if
not
os
.
path
.
exists
(
"
./
finesse_src
"
):
if
not
os
.
path
.
exists
(
os
.
path
.
join
(
app
.
instance_path
,
"
finesse_src
"
)
)
:
print
"
finesse src folder didn
'
t exist, cloning now...
"
utils
.
git
(
"
clone
git://gitmaster.atlas.aei.uni-hannover.de/finesse/src.git
finesse_src
"
)
utils
.
git
(
[
"
clone
"
,
"
git://gitmaster.atlas.aei.uni-hannover.de/finesse/src.git
"
,
"
finesse_src
"
]
)
else
:
os
.
chdir
(
os
.
path
.
join
(
app
.
instance_path
,
"
finesse_src
"
))
# get the latest version for logs etc.
utils
.
git
(
"
pull
"
)
# need local copy of test
if
not
os
.
path
.
exists
(
"
./
finesse_test
"
):
if
not
os
.
path
.
exists
(
os
.
path
.
join
(
app
.
instance_path
,
"
finesse_test
"
)
)
:
print
"
finesse test folder didn
'
t exist, cloning now...
"
utils
.
git
(
"
clone
git://gitmaster.atlas.aei.uni-hannover.de/finesse/test.git
finesse_test
"
)
utils
.
git
(
[
"
clone
"
,
"
git://gitmaster.atlas.aei.uni-hannover.de/finesse/test.git
"
,
"
finesse_test
"
]
)
app
.
secret_key
=
os
.
urandom
(
24
)
app
.
run
(
debug
=
debug
,
port
=
int
(
port
))
app
.
run
(
debug
=
debug
,
port
=
int
(
port
)
,
host
=
ip
)
if
__name__
==
"
__main__
"
:
n
=
len
(
sys
.
argv
)
...
...
@@ -71,3 +72,6 @@ start_test_server usage:
start
(
instance_path
,
port
=
port
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment