aboutsummaryrefslogtreecommitdiff
path: root/docs/config.rst
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2021-02-26 14:49:49 +0100
committerCharles Cabergs <me@cacharle.xyz>2021-02-26 14:52:48 +0100
commitc2ca0d297b8e067c5e315500fb2f35f50ff6af8a (patch)
tree18c16c0f0ffdb08698c1ba76efc7dc78909beea8 /docs/config.rst
parentad7233a4a5f45be6f991ed38a7351a6ef826356b (diff)
downloadminishell_test-c2ca0d297b8e067c5e315500fb2f35f50ff6af8a.tar.gz
minishell_test-c2ca0d297b8e067c5e315500fb2f35f50ff6af8a.tar.bz2
minishell_test-c2ca0d297b8e067c5e315500fb2f35f50ff6af8a.zip
Added docs draft
Diffstat (limited to 'docs/config.rst')
-rw-r--r--docs/config.rst133
1 files changed, 133 insertions, 0 deletions
diff --git a/docs/config.rst b/docs/config.rst
new file mode 100644
index 0000000..edd88d5
--- /dev/null
+++ b/docs/config.rst
@@ -0,0 +1,133 @@
+.. bt in -*- rst -*- mode!
+
+Configuration
+=============
+
+Configuration file
+------------------
+
+It looks for a ``minishell_test.cfg`` file in your project directory.
+
+Global
+------
+
+Global settings are defined under the ``minishell_test`` section:
+
+.. code-block:: cfg
+
+ [minishell_test]
+ bonus = true
+
+.. conf:: bonus
+
+ :type: true|false
+ :default: false
+
+ Run the bonus tests
+
+.. conf:: exec_name
+
+ :type: PATH
+ :default: minishell
+
+ Minishell executable name
+
+.. conf:: make
+
+ :type: true|false
+ :default: true
+
+ Run ``make`` in your project directory before the test
+
+.. conf:: pager
+
+ :type: NAME
+ :default: less
+
+ Pager to use when viewing your results
+
+.. conf:: log_path
+
+ :type: PATH
+ :default: minishell_test.log
+
+ File where to put the test results
+
+.. conf:: cache_path
+
+ :type: PATH
+ :default: $XDG_CACHE_HOME/minishell_test ^ ~/.cache/minishell_test
+
+
+Shell
+-----
+
+Shell settings are defined under the ``shell`` section:
+
+.. code-block:: cfg
+
+ [shell]
+ available_commands = ls,cat
+
+.. conf:: available_commands
+
+ :type: LIST
+ :default: rmdir env cat touch ls grep sh head
+
+ Commands available in test
+
+.. conf:: path_variable
+
+ :type: LIST
+ :default: {cache:executables_path}
+
+ ``$PATH`` environment variable passed to the shell
+
+Reference
++++++++++
+
+Reference shell settings are defined under the ``shell:reference`` section:
+
+.. code-block:: cfg
+
+ [shell:reference]
+ path = /bin/sh
+
+.. conf:: path
+
+ :type: PATH
+ :default: /bin/bash
+
+ Path to reference shell (shell which will be compared minishell)
+ has to support the ``-c`` option (``sh``, ``bash`` and ``zsh`` support it)
+
+.. conf:: args
+
+ :type: ARGV
+
+ Supplementary arguments to the reference shell
+ (e.g ``--posix`` can be used with bash for a more posix complient behavior)
+
+Timeout
+-------
+
+Timeout settings are defined under the ``timeout`` section:
+
+.. code-block:: cfg
+
+ [timeout]
+ leaks = 60
+
+.. conf:: test
+
+ :type: FLOAT
+ :default: 0.5
+
+ Time before a timeout occurs on a regular test (in seconds)
+
+.. conf:: leaks
+
+ :type: FLOAT
+ :default: 10
+
+ Time before a timeout occurs on a leak test (with valgrind) (in seconds)