-
Notifications
You must be signed in to change notification settings - Fork 386
Open
Description
Hi All,
I would like to exit simAVR with a non-zero exit code, for instance if a byte in the atMega is non-zero. This would allow me to remotely run unit tests in a simulated atMega32, and have failed reports be reported back to me. Maybe this can be done by defining a new simAVR command like SIMAVR_CMD_TERMINATE_NONZERO.
Here's the workflow I'm trying to setup. Step 9 does not work, as simAVR always terminates with a zero exit code.
- On a windows PC, I write a source code in C for my atMega32 microcontroller.
- I push the source code to a Gitlab server
- The gitlab server parses a special file in the root of the source code (.gitlab-ci.yml), starts a docker container, and runs the test script in the docker container.
- In the docker container, the test script compiles the source code into an atMega32 program.
- In the docker container, the test script runs simAVR. simAVR runs the atMega32 program.
- In simAVR, the atMega program runs a series of unit tests, and reports to the serial port. simAVR forwards the data from the atMega program to it's standard output.
- When the atMega program is finished, it calls sleep_cpu(); This causes simAVR also to close.
- the test script also ends, the output from the test script is send back to the Gitlab server, and the docker container is destroyed.
- If the test script ends with a non-zero exit code, the Gitlab server considers the test as failed, and sends an e-mail to me with the output from the test script.
I'm using the current version of simavr, commit ab4c17c
https://github.com/buserror/simavr/tree/ab4c17cad37f33e956d625178a9904fc7c3056c2
Cheers,
Cedric de Wijs
aykevl
Metadata
Metadata
Assignees
Labels
No labels