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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sebastian Steinlechner
pykat
Commits
24c51432
Commit
24c51432
authored
11 years ago
by
Daniel Brown
Browse files
Options
Downloads
Patches
Plain Diff
removing more chdir
parent
0a19a809
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/web/web_interface.py
+9
-9
9 additions, 9 deletions
pykat/testing/web/web_interface.py
pykat/testing/web_server.py
+2
-3
2 additions, 3 deletions
pykat/testing/web_server.py
with
11 additions
and
12 deletions
pykat/testing/web/web_interface.py
+
9
−
9
View file @
24c51432
...
...
@@ -374,10 +374,10 @@ def finesse_get_test_progress():
@app.route
(
'
/finesse/get_branches
'
,
methods
=
[
"
POST
"
])
def
finesse_get_branches
():
os
.
chdir
(
os
.
path
.
join
(
app
.
instance_path
,
"
finesse_src
"
)
)
SRC_PATH
=
os
.
path
.
join
(
app
.
instance_path
,
"
finesse_src
"
)
try
:
[
out
,
err
]
=
utils
.
git
(
"
branch
-a
"
)
[
out
,
err
]
=
utils
.
git
(
[
"
branch
"
,
"
-a
"
],
cwd
=
SRC_PATH
)
except
Exception
as
ex
:
print
"
git branch error :
"
+
str
(
ex
)
...
...
@@ -392,15 +392,15 @@ def finesse_get_branches():
@app.route
(
'
/finesse/get_<count>_<branch>_logs
'
,
methods
=
[
'
POST
'
])
def
finesse_get_log
(
count
,
branch
):
os
.
chdir
(
os
.
path
.
join
(
app
.
instance_path
,
"
finesse_src
"
))
SRC_PATH
=
os
.
path
.
join
(
app
.
instance_path
,
"
finesse_src
"
)
try
:
[
out
,
err
]
=
utils
.
git
([
"
checkout
"
,
branch
])
[
out
,
err
]
=
utils
.
git
([
"
pull
"
])
[
out
,
err
]
=
utils
.
git
([
"
checkout
"
,
branch
]
,
cwd
=
SRC_PATH
)
[
out
,
err
]
=
utils
.
git
([
"
pull
"
]
,
cwd
=
SRC_PATH
)
except
Exception
as
ex
:
print
"
git pull error :
"
+
str
(
ex
)
[
out
,
err
]
=
utils
.
git
([
"
log
"
,
"
--max-count={0}
"
.
format
(
count
),
"
--pretty=oneline
"
])
[
out
,
err
]
=
utils
.
git
([
"
log
"
,
"
--max-count={0}
"
.
format
(
count
),
"
--pretty=oneline
"
]
,
cwd
=
SRC_PATH
)
log_entries
=
out
.
split
(
"
\n
"
)
...
...
@@ -599,7 +599,7 @@ def setInterval(interval):
@setInterval
(
600
)
def
checkLatestCommits
():
global
latest_commit_id_tested
out
=
utils
.
git
([
"
--git-dir
"
,
SRC_GIT_PATH
,
"
log
"
,
latest_commit_id_tested
[:
8
]
+
"
..HEAD
"
,
'
--pretty=format:
"
%H
"'
])
out
=
utils
.
git
([
"
log
"
,
latest_commit_id_tested
[:
8
]
+
"
..HEAD
"
,
'
--pretty=format:
"
%H
"'
]
,
cwd
=
SRC_GIT_PATH
)
print
"
Checking latest commits...
"
commits_not_tested
=
[]
...
...
This diff is collapsed.
Click to expand it.
pykat/testing/web_server.py
+
2
−
3
View file @
24c51432
...
...
@@ -32,14 +32,13 @@ def start(instance_path,port=5000, debug=True, ip="0.0.0.0", git_bin="/usr/bin/g
print
"
finesse src folder didn
'
t exist, cloning now...
"
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
"
)
utils
.
git
(
"
pull
"
,
cwd
=
os
.
path
.
join
(
app
.
instance_path
,
"
finesse_src
"
)
)
# need local copy of 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
"
]
,
cwd
=
os
.
path
.
join
(
app
.
instance_path
,
"
finesse_src
"
)
)
# load up the actual interface code
import
pykat.testing.web.web_interface
...
...
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