Advertisement
Guest User

Untitled

a guest
Oct 20th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.89 KB | None | 0 0
  1. ##### Copyright 2019 Darius Neatu (neatudarius@gmail.com)
  2. # README check
  3.  
  4. ## View as webpage
  5. ```
  6. sudo pip3 install grip
  7. grip README.check.md
  8. # open http://localhost:6419/
  9. ```
  10.  
  11. ## Description
  12. This is the checker used to automatically grade homeworks at PC CA.
  13.  
  14. The name of the checker is `check`. It is written in `Python 3.6`.
  15.  
  16.  
  17. ## What does it do?
  18. It will do the multiples steps.
  19.  
  20. All steps marked with `[STOP]` are required. If one failed the checker will stop.
  21. All steps marked with `[OPTIONAL]` are optional and can be disabled from config.
  22.  
  23. 1. `deps`: Check if all dependencies are installed on local system in order to build/run/grade the homerwork.
  24.  
  25. 2. `build`: Build homework.
  26. 2.1. [STOP] `Makefile`: Check if `Makefile` exists.
  27. 2.2. [STOP] `make`: Run `make build` in order to build all binaries.
  28. 2.3. [OPT]`warnings`: If warnings are detected, a penalty to final grade is applied.
  29.  
  30. 3. `run`: Run all tests for specified tasks (all or one).
  31. 3.1 [STOP] `run`: Run task for current test. Continue iff the program exited successfully.
  32. 3.2 [STOP] `check`: Check if the solution is correction. Continue iff the program found solution for task/at least one subtask.
  33. 3.3 [OPT ] `valgrind`: Check for memory leaks and errors. If valgrind found problems, the test grade is 0.
  34.  
  35. `Note`: This stage is using an explained `legend`:
  36. 1. `UPS`: Ups, program crashed
  37. e.g null pointer dereference, negative or to big array/matrix indices
  38. 2. `TLE`: Time Limit Exceed
  39. e.g. infinit loop or too slow
  40. 3. `MLE`: Memory Limit Exceed
  41. e.g. too much allocated memory (in total or for some segments)
  42. 3. `MEM_UPS`: Memory leaks or errors
  43. e.g. invalid memory access, unfreed dynamic-allocated arrays
  44. 4. `WA`: Wrong Answer (wrong or partial output)
  45. e.g. output is missing or has other value
  46. 5. `OK`: Everything is OK.
  47.  
  48. 4. `style`: Run coding style checker to automatically report most common mistakes.
  49.  
  50. 5. `README`: Basic check for reminding students to put a readme file before final submission.
  51. `Note`: If the `README` is missing, a penalty to final grade is applied.
  52.  
  53. 6. `clean`: Remove all generated files by running the `make clean` command.
  54.  
  55. 7. `grade`: Prin final grade (which is always non-negative).
  56.  
  57.  
  58. ## Installation
  59.  
  60. The `install` script can be used to install all dependencies for `check`.
  61.  
  62. Note: Please inspect the script to see which are the requirements.
  63.  
  64. ```
  65. sudo ./install
  66. ```
  67.  
  68. ## Usage
  69.  
  70. - help
  71.  
  72. ```
  73. usage: check [-h] [--task {ninel,vectsecv,codeinvim,nomogram}]
  74. [--legend {True,False}]
  75.  
  76. check homework
  77.  
  78. optional arguments:
  79. -h, --help show this help message and exit
  80. --task {ninel,vectsecv,codeinvim,nomogram}
  81. task name
  82. --legend {True,False}
  83. print legend
  84. ```
  85.  
  86. - run entire homework
  87.  
  88. ```
  89. ./check
  90. ```
  91.  
  92. - run only one task
  93.  
  94. ```
  95. ./check --task <task_name>
  96. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement