GithubHelp home page GithubHelp logo

mini-moulinette's Introduction

Mini-moulinette

mini-moulinette

Mini-moulinette is a test runner for 42 assignments, providing automated tests for whole assignment with one command. The goal is to make thorough checking before submitting the assignments, with ease.

Introduction

This is now day 11 of piscine. I have wasted so many hours getting evaluated, doing evaluation, waiting for evaluation, only to come back redoing it again because I kept making silly mistakes. I wish I can check my code thoroughly before submitting, but that too, will take a lot of my time. This is why I build this so I can stop wasting my time and many others, and shut moulinette up with just a single submission.

How Does It Work?

screenshot

  • Mini moulinette runs through all the tests cases automatically, and checks if the test conditions are met.
  • It will then output the result.
  • The scores are based on 42's practice, where if easier/earlier questions are incorrect, the rest won't count.

Updating

Mini moulinette is updated daily, to update:

cd ~/mini-moulinette
git pull

Get Started

Warning Mini moulinette is not 100% accurate, the tests may not cover every edge cases like moulinette. Use with caution.

  1. Go to your root ~ directory.
cd ~
  1. Clone the git there.
git clone https://github.com/khairulhaaziq/mini-moulinette.git
  1. Now create an alias for it.
  • zsh:
echo "alias mini='~/mini-moulinette/mini-moul.sh'" >> ~/.zshrc && source ~/.zshrc
  • bash:
echo "alias mini='~/mini-moulinette/mini-moul.sh'" >> ~/.bashrc && source ~/.bashrc
  1. Go to your assignment directory where you want to test: e.g: C02 directory
cd C02
  1. Run using command mini with assignment number as argument. e.g: C02.
mini C02

e.g: C03

mini C03
  1. You can now run it for every assignment directory, where tests are provided. Have fun!

Debugging

The error/success messages should be explicit enough. However sometimes you will get segmentation fault or your code doesn't compile

If your code doesn't compile

  • Check the headers
  • Check if it contains main inside
  • Check if your function name is similar to a function from standard library, if it is then it will have problem

If you receive segmentation fault

  • You need to find the test cases, go here:
cd ~/mini-moulinette/mini-moul/tests

The current directory contains all the test cases. Every test is in the file that is the same name as the function/program it is testing, e.g. C05/ex00/ft_iterative_factorial.c will contain test for C05 > ex00 > ft_iterative_factorial.c.

The test cases are usually put in a list of array in this structure, e.g. for ft_iterative_factorial test:

 t_test tests[] = {
        {
            .desc = "Factorial of 0",
            .n = 0,
            .expected = 1,
        },
        {
            .desc = "Factorial of 1",
            .n = 1,
            .expected = 1,
        },
        {
            .desc = "Factorial of 2",
            .n = 2,
            .expected = 2,
        },
        {
            .desc = "Factorial of 10",
            .n = 10,
            .expected = 3628800,
        },
        {
            .desc = "Factorial of a negative number",
            .n = -5,
            .expected = 0,
        },
 }

Customizing

See the above, you can add more tests here. You need to manage your customization yourself when you pull for updates though.

Status

Assignment Coverage Accuracy Remarks
C00 9/9 Not yet rated
C01 9/9 Not yet rated
C02 12/13 Not yet rated
C03 6/6 Not yet rated
C04 6/6 Not yet rated
C05 8/9 Not yet rated ex05, ex06, ex07 tests doesn't cover all edge cases
C06 4/4 Not yet rated
C07 6/6 Not yet rated ex02, ex03 tests doesn't cover all edge cases
C08 6/6 Not yet rated every tests mostly just cover compilation
C09 0/3 Not yet rated WIP
C10 0/4 Not yet rated WIP
C11 0/8 Not yet rated WIP
C12 0/18 Not yet rated
C13 0/8 Not yet rated

Contributing

We welcome contributions to mini-moulinette! Here are a few ways you can help out:

  • Testing: We rely on community feedback to ensure our tests are comprehensive and accurate. If you notice an error in one of our tests or have an idea for a new test case, please let us know! You can contact us via email at [email address] or on Discord at [Discord username]. We would greatly appreciate any feedback or suggestions you have.
  • Code: If you're interested in contributing to the codebase itself, we'd be happy to review any pull requests you submit. We have a few guidelines to ensure that our code is readable and maintainable, so please take a look at our contributing guidelines before you get started.
  • Features: Do you have an idea for a new feature that you think would be useful for mini-moulinette? We'd love to hear it! Please create an issue on our GitHub repository to start a discussion.
  • Feedback: If you've used mini-moulinette and have some feedback or suggestions for improvement, please let us know! Your input is valuable to us, and we're always looking for ways to make our test runner better.

When contributing to mini-moulinette, please be sure to follow our code of conduct and our guidelines for submitting contributions. Thank you for your interest in our project, and we look forward to working with you!

Authors

Khairul Haaziq

Contributors

chatGPT

License

MIT. Copyright 2023 Khairul Haaziq.

mini-moulinette's People

Contributors

k11q avatar bertocode avatar matthias1590 avatar nachat-ayoub avatar forsy avatar

Stargazers

David Malášek avatar Jan Hauck avatar uzeyir-yariz avatar  avatar Icaro Bezerra avatar Javier CG. avatar SLAMI YASSINE avatar  avatar Mr. White avatar  avatar Javier Lopez avatar Damián Rodriguez avatar MeiChayanin avatar Eliam avatar JHVH avatar Jéssica Da Silva Soares avatar Matheus de Souza avatar  avatar  avatar Plamen Dzhelepov avatar Adnane Saber avatar  avatar Leonardo La Rocque avatar sarah avatar  avatar  avatar Vinicius Lopes avatar André Ferreira (Marley) avatar  avatar Balázs Orbán avatar  avatar  avatar man g0dlike avatar Amin Ullah Kàsi & Barak © avatar Jessica Slusark avatar Mahamadou Nouridine avatar  avatar  avatar Yiyuan Li avatar Emaryllis avatar Igor Sysoev avatar Rashidellø avatar neto avatar P A Verghese avatar soulninja avatar Frytos avatar  avatar Benjamin avatar Ali Krkya avatar Yyuno avatar iostreamC avatar Eisuke (ace) Esaki avatar Erik Allas avatar Kornpong Methawanitpong avatar Valeriano Filipe avatar Majid Ramzi avatar  avatar Nelson Matenda avatar  avatar Tansel Bayraktaroglu avatar Anjo Baiju avatar  avatar  avatar ogor ~/21/e¿8. avatar Meryem YAVUZ avatar Fatima avatar  avatar  avatar Tomáš Dinh avatar Nixoff avatar duelker avatar  avatar  avatar ABDURRAHMAN avatar Mohamed KARIM avatar Anas TIOUR avatar Blackangoo avatar  avatar  avatar  avatar ABDELILAH AKHMIM avatar  avatar  avatar  avatar Ludo  avatar  avatar Daphne Aw avatar lunly avatar Pewrie Bontal avatar  avatar  avatar Kongrith Komasatid avatar roaguilla avatar Roman avatar João Gonçalves avatar Nigel Tan Jin Chun avatar 莉山礼司 / Reiji Rizan avatar Mukhammad aziz avatar Soo Rong Jie avatar

Watchers

 avatar  avatar Jan Hauck avatar

mini-moulinette's Issues

Issue report

so i was trying to check C00 ex06 using mini C00, the code in ex06 was giving the correct input of the exercice in other compilers. however, the moulinette says that it was expecting something else..

the code is :

#include <unistd.h>

void fputchar(char c);

void ft_print_comb2(void) {
  int a = 0;
  int b;

  while (a <= 98) 
  {

    b = a +1;
    while (b <= 99) 
    {
    
      fputchar((a /10)+ '0');
      fputchar((a % 10)+ '0');
      fputchar(' ');
      fputchar((b / 10)+ '0');
      fputchar((b % 10)+ '0');
      
      if (a != 98) 
      {
        write(1, ", ", 2);
      }
    b++; 
    }
    a++;
  }
  }


void fputchar(char c)
{
   write(1, &c, 1);
}

Add invalid base test case for C07 ft_convert_base

= Test 19 ==================================================
$> ./ocs2dx1714sag6mdj026xrkt '--01234' '01234567899' '01'
$> diff -U 3 user_output_test19 test19.output | cat -e
--- user_output_test19 2024-06-19 13:25:41.216471835 +0000$
+++ test19.output 2024-06-19 13:25:41.196472101 +0000$
@@ -1 +1 @@$
-11001001010$
\ No newline at end of file$
+(null)$
\ No newline at end of file$

Diff KO :(
Grade: 0

dsdd

safsfs
a
asfafas

Oubli dans la mini moulinette.

La mini moulinette a oublie de verifier l'ajout du caractere nul a la fin du C03 ex02 et elle me l'a valide alors que la moulinette me l'a refuse

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.