Skip to content

viruskizz/42bangkok-piscinec-scripts

Repository files navigation


42Bangkok Piscine C Test Script

Logo

This repository is use for help pisciner to test thier own code in C-Project. There are single test script for individual exercise while coding and automate evaluate-c script for evaluate other piscine. Also there other utility file for example vim setup gitignore suggested template

The automate script will compile all code and file test execise in ONE-CLICK.

Thank you to nsmitsom(Best) for supporting test file in main.c

updated at 2021-12-02

Getting Started

You can download or copy the separate file or clone entire project.

  • c0x meant to working c-project directory that include exercise file (ft_**) and or working file
  • check_c0x meant to test c-project directory that include only main.c
  • .vimrc.template meant to vim settup template
  • .gitignore.template meant to gitignore file suggestion

Testing Project Directory

📋 Araiva Tester

  • 📂 test_c02
  • 📂 test_c03
  • 📂 test_c04
  • 📂 test_c05

📋 nsmitsom Tester (100%)

  • 📂 check_c00
  • 📂 check_c01
  • 📂 check_c02
  • 📂 check_c03
  • 📂 check_c04
  • 📂 check_c05
  • 📂 check_c07

Fully Installation

Install by git

clone script project into your root dir (Recommended)

git clone https://github.com/viruskizz/42bangkok-piscinec-scripts.git ~/

Setup Single test runner

copy evaluate-c.sh into root directory

cp ~/42bangkok-piscinec-scripts/test-c.sh ~/test-c.sh

grant permission to script file

chmod +x ~/test-c.sh

Setup Evaluate script

copy evaluate-c.sh into root directory

cp ~/42bangkok-piscinec-scripts/evaluate-c.sh ~/evaluate-c.sh

grant permission to script file

chmod +x ~/evaluate-c.sh

Vim Setup

move and rename template file to working file as .vimrc in root directory

cp ~/42bangkok-piscinec-scripts/.vimrc.template ~/.vimrc

Alternate Solution with downloading

You also can download main.c testing in release asset on Github following by this link Stable-Release select your c subject as you wish and copy it into your root working directory. by the way, you can use http download into your directoy instead.

  1. Download
curl https://github.com/.../check_c00.tar.gz -OL check_c00.tar.gz
  1. Ungzip
tar -xvzf check_c00.tar.gz

Testing file url

Change url in curl command curl <url> -OL filename.tar.gz

Usage

Not spcial use for vim and gitignore. You can learn more about vim editor and gitignore file to configuration futher as you need.

Run a single test

change to your exercise directory and execute script and your file

cd c04/ex00/
~/test-c.sh ~/42bangkok-piscinec-scripts/check_c04/ex00/main.c ft_example.c

To Evaluating your friend

change to your root directory and run script with your exercise (including with main.c ready for test) or using check_c0x and your friend friend exercise that would be evaluated.

Step

clone your friend project

git clone http://git-x-x.com/xxxxx/ c00

run automate test ~/evaluate-c.sh <test_dir> <evaluated_dir>

~/evaluate-c.sh ~/42bangkok-piscinec-scripts/check_c00 c00

~ขอให้โชคดีกับการ Piscine ครับ GoodLuck xD~

Contact

Araiva