Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-webui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue 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
caosdb
Software
caosdb-webui
Commits
545ed256
Verified
Commit
545ed256
authored
4 years ago
by
Timm Fitschen
Browse files
Options
Downloads
Patches
Plain Diff
BUG: fixed keep-test-server make target
parent
2c402fbc
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
makefile
+2
-2
2 additions, 2 deletions
makefile
misc/unit_test_http_server.py
+7
-3
7 additions, 3 deletions
misc/unit_test_http_server.py
with
9 additions
and
5 deletions
makefile
+
2
−
2
View file @
545ed256
...
@@ -92,7 +92,7 @@ run-test-server: test
...
@@ -92,7 +92,7 @@ run-test-server: test
$(
MISC_DIR
)
/unit_test_http_server.py
$(
PORT
)
$(
TIMEOUT
)
False
$(
PUBLIC_DIR
)
$(
MISC_DIR
)
/unit_test_http_server.py
$(
PORT
)
$(
TIMEOUT
)
False
$(
PUBLIC_DIR
)
keep-test-server
:
test
keep-test-server
:
test
$(
MISC_DIR
)
/unit_test_http_server.py
$(
PORT
)
$(
TIMEOUT
)
True
$(
PUBLIC_DIR
)
$(
MISC_DIR
)
/unit_test_http_server.py
$(
PORT
)
-1
True
$(
PUBLIC_DIR
)
run-qunit
:
test
run-qunit
:
test
$(
foreach
exec
, firefox Xvfb xwd,
\
$(
foreach
exec
, firefox Xvfb xwd,
\
...
@@ -155,7 +155,7 @@ cp-ext:
...
@@ -155,7 +155,7 @@ cp-ext:
cp-ext-test
:
cp-ext-test
:
for
f
in
$(
wildcard
$(
TEST_EXT_DIR
)
/js/
*
)
;
do
\
for
f
in
$(
wildcard
$(
TEST_EXT_DIR
)
/js/
*
)
;
do
\
echo
"y"
|
cp
-i
-r
"
$$
f"
$(
PUBLIC_DIR
)
/js/
;
\
echo
"y"
|
cp
-i
-r
"
$$
f"
$(
PUBLIC_DIR
)
/js/
;
\
sed
-i
"/JS_EXTENSIONS/a
\<
xsl:element name=
\"
script
\"
><xsl:attribute name=
\"
src
\"
><xsl:value-of select=
\"
concat
\(\$
$basepath
, 'webinterface/
${
BUILD_NUMBER
}$${
f#
$(
TEST
_EXT_DIR
)}
'
\)\"
/></xsl:attribute></xsl:element>"
$(
PUBLIC_DIR
)
/xsl/main.xsl
;
\
sed
-i
"/JS_EXTENSIONS/a
\<
xsl:element name=
\"
script
\"
><xsl:attribute name=
\"
src
\"
><xsl:value-of select=
\"
concat
\(\$
$basepath
, 'webinterface/
${
BUILD_NUMBER
}$${
f#
$(
SRC
_EXT_DIR
)}
'
\)\"
/></xsl:attribute></xsl:element>"
$(
PUBLIC_DIR
)
/xsl/main.xsl
;
\
done
done
mkdir
-p
$(
PUBLIC_DIR
)
/html
mkdir
-p
$(
PUBLIC_DIR
)
/html
for
f
in
$(
wildcard
$(
TEST_EXT_DIR
)
/html/
*
)
;
do
\
for
f
in
$(
wildcard
$(
TEST_EXT_DIR
)
/html/
*
)
;
do
\
...
...
This diff is collapsed.
Click to expand it.
misc/unit_test_http_server.py
+
7
−
3
View file @
545ed256
...
@@ -115,7 +115,7 @@ class UnitTestHTTPServer(HTTPServer):
...
@@ -115,7 +115,7 @@ class UnitTestHTTPServer(HTTPServer):
def
__init__
(
self
,
server_address
,
timeout
,
ignore_done
):
def
__init__
(
self
,
server_address
,
timeout
,
ignore_done
):
super
(
UnitTestHTTPServer
,
self
).
__init__
(
server_address
,
super
(
UnitTestHTTPServer
,
self
).
__init__
(
server_address
,
UnitTestsHandler
)
UnitTestsHandler
)
self
.
timeout
=
timeout
self
.
timeout
=
timeout
if
timeout
>
0
else
None
self
.
ignore_done
=
ignore_done
self
.
ignore_done
=
ignore_done
self
.
_keep_running
=
True
self
.
_keep_running
=
True
self
.
_exit_message
=
None
self
.
_exit_message
=
None
...
@@ -139,8 +139,12 @@ class UnitTestHTTPServer(HTTPServer):
...
@@ -139,8 +139,12 @@ class UnitTestHTTPServer(HTTPServer):
Start the server and handle request until the `done` resource is being
Start the server and handle request until the `done` resource is being
called or a timeout occurs.
called or a timeout occurs.
"""
"""
print
((
"
starting UnitTestHTTPServer on {address} with {t}s
"
timeout_str
=
"
.
"
"
timeout.
"
).
format
(
address
=
self
.
server_address
,
t
=
self
.
timeout
))
if
self
.
timeout
is
not
None
:
timeout_str
=
"
with {}s timeout.
"
.
format
(
self
.
timeout
)
print
((
"
starting UnitTestHTTPServer on {address}
"
"
{timeout_str}
"
).
format
(
address
=
self
.
server_address
,
timeout_str
=
timeout_str
))
self
.
_keep_running
=
True
self
.
_keep_running
=
True
while
self
.
_keep_running
:
while
self
.
_keep_running
:
self
.
handle_request
()
self
.
handle_request
()
...
...
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