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
d7760736
Commit
d7760736
authored
11 years ago
by
Daniel Brown
Browse files
Options
Downloads
Patches
Plain Diff
storing built kat files for future use by nobuild options
parent
6483b91e
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
pykat/testing/test.py
+21
-11
21 additions, 11 deletions
pykat/testing/test.py
pykat/testing/utils.py
+1
-1
1 addition, 1 deletion
pykat/testing/utils.py
pykat/testing/web/web_interface.py
+21
-1
21 additions, 1 deletion
pykat/testing/web/web_interface.py
with
43 additions
and
13 deletions
pykat/testing/test.py
+
21
−
11
View file @
d7760736
...
@@ -60,12 +60,6 @@ class FinesseTestProcess(Thread):
...
@@ -60,12 +60,6 @@ class FinesseTestProcess(Thread):
self
.
TEST_DIR
=
TEST_DIR
self
.
TEST_DIR
=
TEST_DIR
self
.
BASE_DIR
=
BASE_DIR
self
.
BASE_DIR
=
BASE_DIR
if
os
.
path
.
exists
(
self
.
BASE_DIR
):
print
"
Deleting previous base_dir
"
+
BASE_DIR
shutil
.
rmtree
(
self
.
BASE_DIR
)
os
.
mkdir
(
self
.
BASE_DIR
)
self
.
emails
=
""
self
.
emails
=
""
if
type
(
nobuild
)
is
str
:
if
type
(
nobuild
)
is
str
:
...
@@ -135,6 +129,13 @@ class FinesseTestProcess(Thread):
...
@@ -135,6 +129,13 @@ class FinesseTestProcess(Thread):
# Firstly we need to build the latest version of finesse
# Firstly we need to build the latest version of finesse
if
not
self
.
nobuild
:
if
not
self
.
nobuild
:
if
os
.
path
.
exists
(
self
.
BASE_DIR
):
print
"
Deleting previous base_dir
"
+
self
.
BASE_DIR
shutil
.
rmtree
(
self
.
BASE_DIR
)
os
.
mkdir
(
self
.
BASE_DIR
)
print
"
deleting build dir...
"
+
BUILD_PATH
print
"
deleting build dir...
"
+
BUILD_PATH
if
os
.
path
.
exists
(
BUILD_PATH
):
if
os
.
path
.
exists
(
BUILD_PATH
):
shutil
.
rmtree
(
BUILD_PATH
)
shutil
.
rmtree
(
BUILD_PATH
)
...
@@ -171,13 +172,22 @@ class FinesseTestProcess(Thread):
...
@@ -171,13 +172,22 @@ class FinesseTestProcess(Thread):
if
not
os
.
path
.
exists
(
FINESSE_EXE
):
if
not
os
.
path
.
exists
(
FINESSE_EXE
):
raise
Exception
(
"
Kat file was not found in
"
+
FINESSE_EXE
)
raise
Exception
(
"
Kat file was not found in
"
+
FINESSE_EXE
)
out
=
None
# check version numbers match up
# check version numbers match up
out
=
utils
.
runcmd
([
FINESSE_EXE
])
out
=
utils
.
runcmd
([
FINESSE_EXE
,
"
-v
"
])
shortid
=
out
[
0
].
split
(
"
\n
"
)[
2
].
split
(
"
(build
"
)[
-
1
].
rstrip
(
"
)
"
).
split
(
"
-
"
)[
-
1
].
lstrip
(
"
g
"
)
# I am sure there is a regex expression that could make this
# easier but I am being lazy
out
=
out
[
0
]
out
=
out
.
split
(
"
\n
"
)
out
=
out
[
0
].
split
(
"
(
"
)[
1
].
split
(
"
)
"
)
out
=
out
[
0
].
split
(
"
-
"
)[
-
1
]
shortid
=
out
.
lstrip
(
"
g
"
)
if
shortid
!=
self
.
git_commit
[
0
:
len
(
shortid
)]:
if
shortid
!=
self
.
git_commit
[
0
:
len
(
shortid
)]:
raise
Exception
(
"
Version of kat did not match the version that it was requested to build
. Not sure why...
"
)
raise
Exception
(
"
Version of kat
{0}
did not match the version that it was requested to build
{1}.
"
.
format
(
shortid
,
self
.
git_commit
[
0
:
len
(
shortid
)])
)
self
.
built
=
True
self
.
built
=
True
...
...
This diff is collapsed.
Click to expand it.
pykat/testing/utils.py
+
1
−
1
View file @
d7760736
...
@@ -20,7 +20,7 @@ def runcmd(args, cwd="."):
...
@@ -20,7 +20,7 @@ def runcmd(args, cwd="."):
out
,
err
=
p
.
communicate
()
out
,
err
=
p
.
communicate
()
if
p
.
returncode
!=
0
:
if
p
.
returncode
!=
0
:
print
"
STDERR:
"
+
err
print
"
STDERR:
"
+
err
k
print
"
STDOUT:
"
+
out
print
"
STDOUT:
"
+
out
raise
RunException
(
p
.
returncode
,
args
,
err
,
out
)
raise
RunException
(
p
.
returncode
,
args
,
err
,
out
)
...
...
This diff is collapsed.
Click to expand it.
pykat/testing/web/web_interface.py
+
21
−
1
View file @
d7760736
...
@@ -115,6 +115,26 @@ class FinesseProcessWatcher(Thread):
...
@@ -115,6 +115,26 @@ class FinesseProcessWatcher(Thread):
print
"
Watcher is continuing
"
print
"
Watcher is continuing
"
try
:
try
:
# store a copy of the kat file for future use if a nobuild is
# requested from the user.
if
sys
.
platform
==
"
win32
"
:
EXE
=
"
.exe
"
else
:
EXE
=
""
KAT_EXE
=
os
.
path
.
join
(
app
.
instance_path
,
"
tests
"
,
str
(
self
.
process_to_watch
.
test_id
),
"
build
"
,
"
kat
"
+
EXE
)
KAT_STORE_PATH
=
os
.
path
.
join
(
app
.
instance_path
,
"
kat_store
"
)
KAT_STORE_EXE
=
os
.
path
.
join
(
KAT_STORE_PATH
,
"
kat_
"
+
str
(
self
.
process_to_watch
.
get_version
())
+
EXE
)
if
not
os
.
path
.
exists
(
KAT_STORE_PATH
):
os
.
mkdir
(
KAT_STORE_PATH
)
if
os
.
path
.
exists
(
KAT_EXE
):
if
os
.
path
.
exists
(
KAT_STORE_EXE
):
os
.
remove
(
KAT_STORE_EXE
)
shutil
.
copyfile
(
KAT_EXE
,
KAT_STORE_EXE
)
testdoc
=
db
.
get
(
'
testid
'
,
testdoc
=
db
.
get
(
'
testid
'
,
self
.
process_to_watch
.
test_id
,
self
.
process_to_watch
.
test_id
,
with_doc
=
True
)[
"
doc
"
]
with_doc
=
True
)[
"
doc
"
]
...
...
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