Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
grady-test-runner
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Grady Corp.
grady-test-runner
Commits
2bae38a7
Commit
2bae38a7
authored
5 years ago
by
robinwilliam.hundt
Browse files
Options
Downloads
Patches
Plain Diff
Removed tqdm
parent
60a2008e
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
requirements.txt
+0
-1
0 additions, 1 deletion
requirements.txt
test.py
+4
-6
4 additions, 6 deletions
test.py
with
4 additions
and
7 deletions
requirements.txt
deleted
100644 → 0
+
0
−
1
View file @
60a2008e
tqdm
~=4.31
\ No newline at end of file
This diff is collapsed.
Click to expand it.
test.py
+
4
−
6
View file @
2bae38a7
...
@@ -6,8 +6,6 @@ import shutil
...
@@ -6,8 +6,6 @@ import shutil
import
subprocess
import
subprocess
import
tempfile
import
tempfile
from
tqdm
import
tqdm
log
=
logging
.
getLogger
(
__name__
)
log
=
logging
.
getLogger
(
__name__
)
...
@@ -106,7 +104,7 @@ class CompileTest(Test):
...
@@ -106,7 +104,7 @@ class CompileTest(Test):
def
run_test
(
self
,
submission_obj
,
**
kwargs
):
def
run_test
(
self
,
submission_obj
,
**
kwargs
):
ret
=
run_cmd
(
ret
=
run_cmd
(
f
"
gcc -Wall -c -x c -std=c11 -I
{
kwargs
[
'
header
'
]
}
-o code.o -
"
,
"
gcc -Wall -c -x c -std=c11 -I {
} -o code.o -
"
.
format
(
kwargs
[
'
header
'
]
)
,
submission_obj
[
'
code
'
])
submission_obj
[
'
code
'
])
return
not
ret
.
returncode
,
ret
.
stderr
return
not
ret
.
returncode
,
ret
.
stderr
...
@@ -121,15 +119,15 @@ def process(submissions, header, highest_test):
...
@@ -121,15 +119,15 @@ def process(submissions, header, highest_test):
# Get something disposable
# Get something disposable
if
highest_test
!=
EmptyTest
.
__name__
:
if
highest_test
!=
EmptyTest
.
__name__
:
path
=
tempfile
.
mkdtemp
()
path
=
tempfile
.
mkdtemp
()
run_cmd
(
f
'
cp -r
{
header
}
{
path
}
'
)
run_cmd
(
'
cp -r {
} {}
'
.
format
(
header
,
path
)
)
os
.
chdir
(
path
)
os
.
chdir
(
path
)
def
iterate_submissions
():
def
iterate_submissions
():
yield
from
(
obj
yield
from
(
obj
for
student
in
tqdm
(
submissions_json
[
'
students
'
]
)
for
student
in
submissions_json
[
'
students
'
]
for
obj
in
student
[
'
submissions
'
])
for
obj
in
student
[
'
submissions
'
])
for
submission_obj
in
tqdm
(
iterate_submissions
()
)
:
for
submission_obj
in
iterate_submissions
():
highest_test_class
(
submission_obj
,
header
=
header
)
highest_test_class
(
submission_obj
,
header
=
header
)
if
highest_test
!=
EmptyTest
.
__name__
:
if
highest_test
!=
EmptyTest
.
__name__
:
run_cmd
(
'
rm code*
'
)
run_cmd
(
'
rm code*
'
)
...
...
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