dantonik / 42-philosophers-tester

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

42 Philosophers Tester

Tester for the Dininig Philosophers Problem project at 42 Schools

Installation

Clone the repo into your philosophers folder.

git clone https://github.com/dantonik/42-philosophers-tester.git

You must have the following file structure:

├─ philo/
│  ├─ *.*
│  ├─ 42-philosophers-tester/
│  │  ├─test.sh

Usage

Run ./test.sh when inside the repo's directory.

cd 42-philosophers-tester
./test.sh

Usage optional

You can add the path to your philo executable as an argument if your folder structure looks differently.

./test.sh /path/to/philo

[-i iterations]

./test.sh -i 10

[-t times_to_eat]

./test.sh -t 10

Failed tests

The output of your failed test(s) get saved in the 'fails' folder for further inspection.

Screenshots

Start

Example

Valgrind

A simple docker Valgrind setup.

cd docker
./build.sh
./run.sh

Visualizer

Experimental integration with a Philosophers Visualizer.

Why

Because the Lazy Philosophers Tester is a bit tedious and only semiautomatic.

Ressources

Introduction to Parallel Computing

POSIX Threads Programming

Future ideas

  • Leak checking
  • Visualizer
  • Data race checking
  • Death lock checking
  • Wiki How-To Philo

About


Languages

Language:Shell 85.8%Language:Python 7.3%Language:Makefile 6.2%Language:Dockerfile 0.7%