diff --git a/README.md b/README.md index 1e70546af5a46cb16e42ff62cf109b5b22cbc308..1e16d8a63955b857faff055a5b247187c7b3278e 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# README +# Guide for using the test infrastructure ## Setup 1. Login into your gitlab accout using the UPB login at https://gitlab.cs.pub.ro/users/sign_in 2. Make a **private** fork of this repository. In the right corner you can find the fork button. -After clicking it you, the following should be prompted at you: +After clicking it, the following should be prompted at you:  @@ -18,48 +18,75 @@ $ git clone <remote_of_your_private_fork> ## Working on the assignment Start the assignment from the skeleton inside the `src/` directory. -The first option is to code in the `src/` and run the checker using the command: +The first option is to code in the `src/` and run the checker using the following command: ``` -./local.sh checker 0-list +$ ./local.sh checker 0-list ``` This will start the docker, start the SO2 VM inside the docker and run the checher for you inside the VM. +If your run on Linux you can add the `--privileged` argument to the previous command and the checker will run with KVM support. The second and recommended option is to connect to the docker interactively and then to the VM and run the checker manually. 1. Connect to the docker ``` -./local.sh docker interactive +$ ./local.sh docker interactive ``` If you use native Linux you can benefit from KVM superpowers using the `--privileged` argument. -Thus the container will be started in privileged mode and we have access to KVM. +Thus the container will be started in privileged mode and you have access to KVM. After executing the last command you should get a prompter in the docker. -When running in interactive mode the `src/` directory is mounted to the `/linux/tools/labs/skels/assignments/0-list`. -So any change in one would affect the other. +When running in interactive mode the `src/` directory is mounted to the `/linux/tools/labs/skels/assignments/0-list` directory inside the docker. The previous directory is shared with the VM as well in `skels/assignments/0-list`. +So any change in one would affect the other. **Be careful not to delete your code!**. -We encourage you to make as many commits as possible on gitlab! +We encourage you to make as many commits as possible on your **private** gitlab repo! 2. Build your assignment: ``` -# you should be in /linux/tools/labs -make build +# you should be in /linux/tools/labs inside the docker +$ make build ``` 3. You can start the VM with the following command: ``` -make console +# you should be in /linux/tools/labs inside the docker +$ make console ``` After this command you should get a prompter inside the VM -4. Copy the *.ko into the skels/assginments/0-list-checker +4. Copy the `*.ko` into the `skels/assginments/0-list-checker` directory ``` -cd skels/assignments/0-list-checker -cp ../0-list/list.ko . +# you should be in /home/root inside the VM +$ cd skels/assignments/0-list-checker +$ cp ../0-list/list.ko . ``` 5. Run the checker ``` -# you should be in skels/assignments/0-list-checker +# you should be in skels/assignments/0-list-checker inside the VM sh _checker ``` -# Submiting the assignment -TODO \ No newline at end of file +## Submiting the assignment +### Option I +1. Create a `*.zip` archive containing all the source files and headers of your solution and a `Kbuild` file that results in the `list.ko` module. +2. Upload the archive on moodle in the section corresponding to the assignment. +3. After a few minutes, you can see the checker results on the submission page, like in the following image. + + +### Option II +The second option will automatically create the archive from your **private** repo on gitlab. +More precisely from the `src` directory of your repo. +1. From your **private** repo go to `Settings->Access Tokens`. +Generate a token that has `api` and `read_api` scopes and `owner` role. +Copy the token. + + +2. Take the project id of your **private** repo. + + +3. Fill in the form on moodle with the details and click `Submit`. + +  + +4. After that you can go to the assignment page and see the already created archive. +After a few minutes you will be able to see the feedback of the checker. + +Find the complete procedure for using `vmchecker-next` [here](https://github.com/systems-cs-pub-ro/vmchecker-next/wiki/Student-Handbook) \ No newline at end of file diff --git a/img/feedback.png b/img/feedback.png new file mode 100644 index 0000000000000000000000000000000000000000..4fd2b415fdf48290600e2e578768f21ebc2f8e2e Binary files /dev/null and b/img/feedback.png differ diff --git a/img/form.png b/img/form.png new file mode 100644 index 0000000000000000000000000000000000000000..df5c45a5d851cdda0db99aba507f33199a07dc1a Binary files /dev/null and b/img/form.png differ diff --git a/img/project_id.png b/img/project_id.png new file mode 100644 index 0000000000000000000000000000000000000000..c54811a8288dd6fc1fd3b8a86d79a61b1d690a73 Binary files /dev/null and b/img/project_id.png differ diff --git a/img/token.png b/img/token.png new file mode 100644 index 0000000000000000000000000000000000000000..47ee5c96f03ddf7540a43f066f0d802ff6fd36b9 Binary files /dev/null and b/img/token.png differ