Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
EvaP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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
CourseEval
EvaP
Commits
be518cde
Unverified
Commit
be518cde
authored
3 years ago
by
Johannes Linke
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Make typescript commands fail properly on test failures (#1709)
parent
df4cfea6
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
evap/evaluation/management/commands/ts.py
+6
-5
6 additions, 5 deletions
evap/evaluation/management/commands/ts.py
with
6 additions
and
5 deletions
evap/evaluation/management/commands/ts.py
+
6
−
5
View file @
be518cde
import
argparse
import
argparse
import
os
import
os
import
subprocess
# nosec
import
subprocess
# nosec
import
sys
import
unittest
import
unittest
from
django.conf
import
settings
from
django.conf
import
settings
from
django.core.management
import
call_command
from
django.core.management
import
call_command
from
django.core.management.base
import
BaseCommand
from
django.core.management.base
import
BaseCommand
,
CommandError
from
django.test.runner
import
DiscoverRunner
from
django.test.runner
import
DiscoverRunner
...
@@ -59,8 +58,8 @@ class Command(BaseCommand):
...
@@ -59,8 +58,8 @@ class Command(BaseCommand):
print
(
f
"
Could not find
{
command
[
0
]
}
command
"
,
file
=
self
.
stderr
)
print
(
f
"
Could not find
{
command
[
0
]
}
command
"
,
file
=
self
.
stderr
)
except
KeyboardInterrupt
:
except
KeyboardInterrupt
:
pass
pass
except
subprocess
.
CalledProcessError
as
e
rror
:
except
subprocess
.
CalledProcessError
as
e
:
sys
.
exit
(
error
.
returncode
)
raise
CommandError
(
"
Error during command execution
"
,
returncode
=
e
.
returncode
)
from
e
def
compile
(
self
,
watch
=
False
,
fresh
=
False
,
**
_options
):
def
compile
(
self
,
watch
=
False
,
fresh
=
False
,
**
_options
):
static_directory
=
settings
.
STATICFILES_DIRS
[
0
]
static_directory
=
settings
.
STATICFILES_DIRS
[
0
]
...
@@ -93,4 +92,6 @@ class Command(BaseCommand):
...
@@ -93,4 +92,6 @@ class Command(BaseCommand):
# Enable debug mode as otherwise a collectstatic beforehand would be necessary,
# Enable debug mode as otherwise a collectstatic beforehand would be necessary,
# as missing static files would result into an error.
# as missing static files would result into an error.
test_runner
=
RenderPagesRunner
(
debug_mode
=
True
)
test_runner
=
RenderPagesRunner
(
debug_mode
=
True
)
test_runner
.
run_tests
([])
failed_tests
=
test_runner
.
run_tests
([])
if
failed_tests
>
0
:
raise
CommandError
(
"
Failures during render_pages
"
)
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