Skip to content

Commit

Permalink
Tests: Renamed test/ to tests/
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Pedersen <ctx.xda@gmail.com>
  • Loading branch information
CTXz committed Jun 22, 2024
1 parent 5a86d2c commit 86ec2b2
Show file tree
Hide file tree
Showing 79 changed files with 10 additions and 8 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
dist/
__pycache__
test/build
build/
example/build
tests/build*
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ COPY . /root/
RUN pip3 install /root/ --break-system-packages

# Set the entrypoint to /bin/bash
ENTRYPOINT ["/usr/bin/bash", "/root/test/test.sh", "--ACK"]
ENTRYPOINT ["/usr/bin/bash", "/root/tests/test.sh", "--ACK"]
12 changes: 6 additions & 6 deletions test/README.md → tests/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Tests

This directory contains tests for the stm8dce tool, divided into two main parts:
This directory contains tests for the stm8dce tool. Testing is divided into two main parts:

1. **test.py**: Contains unit tests to verify the functionality of the stm8dce tool. These tests use a set of tailored C files (`main.c`, `_main.c`, `extra.c`) to rigorously check various features and ensure the tool behaves as expected. The unit tests validate the returned lists of excluded and kept functions and constants against predefined expected outputs.
1. **test.py**: Contains unit tests to verify the functionality of the stm8dce tool. These tests use a set of tailored C files (`main.c`, `_main.c`, `extra.c` and `rel.c`) to test various features and ensure the tool behaves as expected. The unit tests validate the returned lists of excluded and kept functions and constants against predefined expected outputs.

2. **test_project**: A test project designed to evaluate the stm8dce tool's performance on a real project. This project is based on the ["Dampflog Interface Board Firmware"](https://github.com/TuDo-Makerspace/Dampflog). It aims to identify potential issues that might not be covered by the unit tests. The test project is only tested for successful compilation.
2. **test_project**: A test project designed to evaluate if stm8dce works on a real project. This project is based on the ["Dampflog Interface Board Firmware"](https://github.com/TuDo-Makerspace/Dampflog). It aims to identify potential issues that may have slipped past the unit tests. The test project is only tested for successful compilation.

These tests are ran accross multiple SDCC version to ensure broader compatibility. Currently, the tests are run on the following SDCC versions:

Expand All @@ -22,7 +22,7 @@ Older versions than 3.8.0 are not tested since these are not available as precom

### Full test

The full test is intended to be run in a Docker container. The root directory of the stm8dce repository provides a Dockerfile that runs the tests on all supported SDCC versions. To build the Docker image, run the following command:
The full test is intended to be run in a Docker container. The root directory of the stm8dce repository provides a Dockerfile that runs the tests on all above listed SDCC versions. To build the Docker image, run the following command:

```bash
docker build -t stm8dce-test .
Expand All @@ -34,9 +34,9 @@ To run the tests, execute the following command:
docker run stm8dce-test
```

The Docker container will run the tests on all supported SDCC versions and output the results to the console.
The Docker container will run the tests on all above listed SDCC versions and output the results to the console.

It is not recommended to run the full test without docker, as it will clutter your system with multiple SDCC versions and other test-relevant dependencies.
It is not recommended to run the full test outside of docker, as it will clutter your system with multiple SDCC versions and other test-relevant dependencies.

### Unit test only

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 86ec2b2

Please sign in to comment.