Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Task autotest
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Jiří Kalvoda
Task autotest
Commits
162b8b38
Commit
162b8b38
authored
1 year ago
by
Daniel Skýpala
Browse files
Options
Downloads
Patches
Plain Diff
Add pisek testing
parent
1ce5e083
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
task_autotest/test.py
+14
-1
14 additions, 1 deletion
task_autotest/test.py
with
14 additions
and
1 deletion
task_autotest/test.py
+
14
−
1
View file @
162b8b38
...
@@ -7,7 +7,7 @@ import task_autotest.config as config
...
@@ -7,7 +7,7 @@ import task_autotest.config as config
def
test_task_commit
(
task_path
,
commit
,
workdir
=
"
_test
"
):
def
test_task_commit
(
task_path
,
commit
,
workdir
=
"
_test
"
):
start_time
=
time
.
time
()
start_time
=
time
.
time
()
wd
=
config
.
REPO_DIR
+
"
/
"
+
workdir
wd
=
os
.
path
.
join
(
config
.
REPO_DIR
,
workdir
)
subprocess
.
run
([
"
git
"
,
"
checkout
"
,
commit
],
cwd
=
wd
,
check
=
True
)
subprocess
.
run
([
"
git
"
,
"
checkout
"
,
commit
],
cwd
=
wd
,
check
=
True
)
outdir
=
config
.
DATA_DIR
+
"
/tests/
"
+
task_path
.
replace
(
'
/
'
,
'
_
'
)
+
'
/
'
+
commit
+
'
/
'
outdir
=
config
.
DATA_DIR
+
"
/tests/
"
+
task_path
.
replace
(
'
/
'
,
'
_
'
)
+
'
/
'
+
commit
+
'
/
'
...
@@ -19,3 +19,16 @@ def test_task_commit(task_path, commit, workdir="_test"):
...
@@ -19,3 +19,16 @@ def test_task_commit(task_path, commit, workdir="_test"):
os
.
mkdir
(
outdir
)
os
.
mkdir
(
outdir
)
with
open
(
outdir
+
"
time
"
,
"
w
"
)
as
f
:
with
open
(
outdir
+
"
time
"
,
"
w
"
)
as
f
:
f
.
write
(
str
(
int
(
start_time
)))
f
.
write
(
str
(
int
(
start_time
)))
def
run_pisek
(
args
,
output
):
return
subprocess
.
run
(
[
"
pisek
"
]
+
args
,
stdout
=
open
(
os
.
path
.
join
(
outdir
,
output
),
"
w
"
),
stderr
=
subprocess
.
STDOUT
,
text
=
True
,
cwd
=
os
.
path
.
join
(
config
.
REPO_DIR
,
workdir
,
task_path
),
)
run_pisek
([
"
--output
"
,
"
--plain
"
],
"
output
"
)
run_pisek
([
"
--strict
"
,
"
--output
"
,
"
--plain
"
],
"
strict_output
"
)
open
(
os
.
path
.
join
(
outdir
,
"
complete
"
),
"
w
"
).
close
()
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