Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
3
3-raid
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Issue analytics
Insights
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
SO2
3-raid
Commits
216e1a26
Commit
216e1a26
authored
1 year ago
by
Dragoș-Iulian ARGINT (94922)
Browse files
Options
Downloads
Patches
Plain Diff
make checker.sh output the running time
Signed-off-by:
Dragoș-Iulian ARGINT
<
dragos.argint@stud.acs.upb.ro
>
parent
07763ecb
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#20142
passed
1 year ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
checker/checker.sh
+14
-3
14 additions, 3 deletions
checker/checker.sh
with
14 additions
and
3 deletions
checker/checker.sh
+
14
−
3
View file @
216e1a26
#!/bin/bash
TIMEOUT
=
300
# 5 min
SO2_WORKSPACE
=
/linux/tools/labs
ASSIGNMENT0_TIMEOUT
=
300
# 5 min
ASSIGNMENT0_MOD
=
list.ko
ASSIGNMENT0_DIR
=
${
SO2_WORKSPACE
}
/skels/assignments/0-list
ASSIGNMENT0_CHECKER_LOCAL_DIR
=
checker/0-list-checker
...
...
@@ -10,6 +11,7 @@ ASSIGNMENT0_CHECKER_DIR=${SO2_WORKSPACE}/skels/assignments/0-list-checker
ASSIGNMENT0_OUTPUT
=
${
SO2_WORKSPACE
}
/skels/0-list-output
ASSIGNMENT0_FINISHED
=
${
SO2_WORKSPACE
}
/skels/0-list-finished
ASSIGNMENT1_TIMEOUT
=
300
# 5 min
ASSIGNMENT1_MOD
=
tracer.ko
ASSIGNMENT1_DIR
=
${
SO2_WORKSPACE
}
/skels/assignments/1-tracer
ASSIGNMENT1_CHECKER_LOCAL_DIR
=
checker/1-tracer-checker
...
...
@@ -19,6 +21,7 @@ ASSIGNMENT1_FINISHED=${SO2_WORKSPACE}/skels/1-tracer-finished
ASSIGNMENT1_HEADER_OVERWRITE
=
${
SO2_WORKSPACE
}
/templates/assignments/1-tracer/tracer.h
ASSIGNMENT1_CHECKER_AUX_LIST
=
"
${
ASSIGNMENT1_CHECKER_DIR
}
/_helper/tracer_helper.ko"
ASSIGNMENT2_TIMEOUT
=
300
# 5 min
ASSIGNMENT2_MOD
=
uart16550.ko
ASSIGNMENT2_DIR
=
${
SO2_WORKSPACE
}
/skels/assignments/2-uart
ASSIGNMENT2_CHECKER_LOCAL_DIR
=
checker/2-uart-checker
...
...
@@ -28,6 +31,7 @@ ASSIGNMENT2_FINISHED=${SO2_WORKSPACE}/skels/2-uart-finished
ASSIGNMENT2_HEADER_OVERWRITE
=
${
SO2_WORKSPACE
}
/templates/assignments/2-uart/uart16550.h
ASSIGNMENT2_CHECKER_AUX_LIST
=
"
${
ASSIGNMENT2_CHECKER_DIR
}
/_test/solution.ko"
ASSIGNMENT3_TIMEOUT
=
300
# 5 min
ASSIGNMENT3_MOD
=
ssr.ko
ASSIGNMENT3_DIR
=
${
SO2_WORKSPACE
}
/skels/assignments/3-raid
ASSIGNMENT3_CHECKER_LOCAL_DIR
=
checker/3-raid-checker
...
...
@@ -98,8 +102,10 @@ compute_total()
dump_output
()
{
local
output
=
$1
local timeout
=
$2
echo
"<VMCK_NEXT_BEGIN>"
cat
$output
echo
"Running time
$timeout
/
$TIMEOUT
"
}
...
...
@@ -190,7 +196,8 @@ run_checker()
fi
LINUX_ADD_CMDLINE
=
"so2=
$assignment
"
make checker &> /dev/null &
timeout
=
0
echo
-n
"CHECKER IS RUNNING"
while
[
!
-f
$finished
]
do
...
...
@@ -207,25 +214,29 @@ run_checker()
echo
-n
.
done
echo
""
dump_output
$output
dump_output
$output
$timeout
compute_total
$output
popd
&> /dev/null
}
case
$1
in
0-list
)
TIMEOUT
=
$ASSIGNMENT0_TIMEOUT
RECOVER_GRADE_TIMEOUT
=
0
# If set to 1, in case of a timeout, will calculate the total grade based on the output directory
run_checker
$ASSIGNMENT0_MOD
$ASSIGNMENT0_DIR
$ASSIGNMENT0_CHECKER_LOCAL_DIR
$ASSIGNMENT0_CHECKER_DIR
$ASSIGNMENT0_OUTPUT
$ASSIGNMENT0_FINISHED
$1
;;
1-tracer
)
TIMEOUT
=
$ASSIGNMENT1_TIMEOUT
RECOVER_GRADE_TIMEOUT
=
0
# If set to 1, in case of a timeout, will calculate the total grade based on the output directory
run_checker
$ASSIGNMENT1_MOD
$ASSIGNMENT1_DIR
$ASSIGNMENT1_CHECKER_LOCAL_DIR
$ASSIGNMENT1_CHECKER_DIR
$ASSIGNMENT1_OUTPUT
$ASSIGNMENT1_FINISHED
$1
$ASSIGNMENT1_HEADER_OVERWRITE
$ASSIGNMENT1_CHECKER_AUX_LIST
;;
2-uart
)
TIMEOUT
=
$ASSIGNMENT2_TIMEOUT
RECOVER_GRADE_TIMEOUT
=
1
# If set to 1, in case of a timeout, will calculate the total grade based on the output directory
run_checker
$ASSIGNMENT2_MOD
$ASSIGNMENT2_DIR
$ASSIGNMENT2_CHECKER_LOCAL_DIR
$ASSIGNMENT2_CHECKER_DIR
$ASSIGNMENT2_OUTPUT
$ASSIGNMENT2_FINISHED
$1
$ASSIGNMENT2_HEADER_OVERWRITE
$ASSIGNMENT2_CHECKER_AUX_LIST
;;
3-raid
)
TIMEOUT
=
$ASSIGNMENT3_TIMEOUT
RECOVER_GRADE_TIMEOUT
=
0
# If set to 1, in case of a timeout, will calculate the total grade based on the output directory
run_checker
$ASSIGNMENT3_MOD
$ASSIGNMENT3_DIR
$ASSIGNMENT3_CHECKER_LOCAL_DIR
$ASSIGNMENT3_CHECKER_DIR
$ASSIGNMENT3_OUTPUT
$ASSIGNMENT3_FINISHED
$1
$ASSIGNMENT3_HEADER_OVERWRITE
$ASSIGNMENT3_CHECKER_AUX_LIST
;;
...
...
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